@@ -871,8 +871,8 @@ DEFINE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack)
void panic_bad_stack(struct pt_regs *regs, unsigned long esr, unsigned long far)
{
unsigned long tsk_stk = (unsigned long)current->stack;
- unsigned long irq_stk = (unsigned long)this_cpu_read(irq_stack_ptr);
- unsigned long ovf_stk = (unsigned long)this_cpu_ptr(overflow_stack);
+ unsigned long irq_stk = (unsigned long)raw_cpu_read(irq_stack_ptr);
+ unsigned long ovf_stk = (unsigned long)raw_cpu_ptr(overflow_stack);
console_verbose();
pr_emerg("Insufficient stack space to handle exception!");
The hardware automatically disable the IRQ interrupt before jumping to the interrupt or exception vector. Therefore, the preempt_disable() operation in this_cpu_read() after macro expansion is unnecessary for exception handler. Use raw_cpu_* instead of this_cpu_* can reduce a few lines of assembly code. To be honest, the fewer unnecessary operations in exception handler, the better. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- arch/arm64/kernel/traps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)