Messages in this thread Patch in this message | | | From | Christophe Leroy <> | Subject | [PATCH v2 3/3] powerpc/irq: don't use current_stack_pointer() in do_IRQ() | Date | Fri, 24 Jan 2020 07:07:54 +0000 (UTC) |
| |
Until commit 7306e83ccf5c ("powerpc: Don't use CURRENT_THREAD_INFO to find the stack"), the current stack base address was obtained by calling current_thread_info(). That inline function was simply masking out the value of r1.
In that commit, it was changed to using current_stack_pointer(), which is an heavier function as it is an outline assembly function which cannot be inlined and which reads the content of the stack at 0(r1)
Revert to just using get_sp() for geting r1 and masking out its value to obtain the base address of the stack pointer as before.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Fixes: 7306e83ccf5c ("powerpc: Don't use CURRENT_THREAD_INFO to find the stack") --- v2: New in this series. Using get_sp() --- arch/powerpc/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 9333e115418f..193c2b64ce37 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -647,7 +647,7 @@ void do_IRQ(struct pt_regs *regs) void *cursp, *irqsp, *sirqsp; /* Switch to the irq stack to handle this */ - cursp = (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1)); + cursp = (void *)(get_sp() & ~(THREAD_SIZE - 1)); irqsp = hardirq_ctx[raw_smp_processor_id()]; sirqsp = softirq_ctx[raw_smp_processor_id()]; -- 2.25.0
| |