Commit 758a2e31 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Borislav Petkov

x86/irq/64: Rename irq_stack_ptr to hardirq_stack_ptr

Preparatory patch to share code with 32bit.

No functional changes.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "Chang S. Bae" <chang.seok.bae@intel.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nicolai Stange <nstange@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Pingfan Liu <kernelfans@gmail.com>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190414160145.912584074@linutronix.de
parent a754fe2b
...@@ -431,7 +431,7 @@ END(irq_entries_start) ...@@ -431,7 +431,7 @@ END(irq_entries_start)
*/ */
movq \old_rsp, PER_CPU_VAR(irq_stack_union + IRQ_STACK_SIZE - 8) movq \old_rsp, PER_CPU_VAR(irq_stack_union + IRQ_STACK_SIZE - 8)
movq PER_CPU_VAR(irq_stack_ptr), %rsp movq PER_CPU_VAR(hardirq_stack_ptr), %rsp
#ifdef CONFIG_DEBUG_ENTRY #ifdef CONFIG_DEBUG_ENTRY
/* /*
......
...@@ -396,7 +396,7 @@ static inline unsigned long cpu_kernelmode_gs_base(int cpu) ...@@ -396,7 +396,7 @@ static inline unsigned long cpu_kernelmode_gs_base(int cpu)
return (unsigned long)per_cpu(irq_stack_union.gs_base, cpu); return (unsigned long)per_cpu(irq_stack_union.gs_base, cpu);
} }
DECLARE_PER_CPU(char *, irq_stack_ptr); DECLARE_PER_CPU(char *, hardirq_stack_ptr);
DECLARE_PER_CPU(unsigned int, irq_count); DECLARE_PER_CPU(unsigned int, irq_count);
extern asmlinkage void ignore_sysret(void); extern asmlinkage void ignore_sysret(void);
......
...@@ -1510,7 +1510,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned = ...@@ -1510,7 +1510,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned =
&init_task; &init_task;
EXPORT_PER_CPU_SYMBOL(current_task); EXPORT_PER_CPU_SYMBOL(current_task);
DEFINE_PER_CPU(char *, irq_stack_ptr) = DEFINE_PER_CPU(char *, hardirq_stack_ptr) =
init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE; init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE;
DEFINE_PER_CPU(unsigned int, irq_count) __visible = -1; DEFINE_PER_CPU(unsigned int, irq_count) __visible = -1;
......
...@@ -120,7 +120,7 @@ static bool in_exception_stack(unsigned long *stack, struct stack_info *info) ...@@ -120,7 +120,7 @@ static bool in_exception_stack(unsigned long *stack, struct stack_info *info)
static bool in_irq_stack(unsigned long *stack, struct stack_info *info) static bool in_irq_stack(unsigned long *stack, struct stack_info *info)
{ {
unsigned long *end = (unsigned long *)this_cpu_read(irq_stack_ptr); unsigned long *end = (unsigned long *)this_cpu_read(hardirq_stack_ptr);
unsigned long *begin = end - (IRQ_STACK_SIZE / sizeof(long)); unsigned long *begin = end - (IRQ_STACK_SIZE / sizeof(long));
/* /*
......
...@@ -56,7 +56,7 @@ static inline void stack_overflow_check(struct pt_regs *regs) ...@@ -56,7 +56,7 @@ static inline void stack_overflow_check(struct pt_regs *regs)
regs->sp <= curbase + THREAD_SIZE) regs->sp <= curbase + THREAD_SIZE)
return; return;
irq_stack_top = (u64)__this_cpu_read(irq_stack_ptr); irq_stack_top = (u64)__this_cpu_read(hardirq_stack_ptr);
irq_stack_bottom = irq_stack_top - IRQ_STACK_SIZE + STACK_MARGIN; irq_stack_bottom = irq_stack_top - IRQ_STACK_SIZE + STACK_MARGIN;
if (regs->sp >= irq_stack_bottom && regs->sp <= irq_stack_top) if (regs->sp >= irq_stack_bottom && regs->sp <= irq_stack_top)
return; return;
......
...@@ -245,7 +245,7 @@ void __init setup_per_cpu_areas(void) ...@@ -245,7 +245,7 @@ void __init setup_per_cpu_areas(void)
early_per_cpu_map(x86_cpu_to_logical_apicid, cpu); early_per_cpu_map(x86_cpu_to_logical_apicid, cpu);
#endif #endif
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
per_cpu(irq_stack_ptr, cpu) = per_cpu(hardirq_stack_ptr, cpu) =
per_cpu(irq_stack_union.irq_stack, cpu) + per_cpu(irq_stack_union.irq_stack, cpu) +
IRQ_STACK_SIZE; IRQ_STACK_SIZE;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment