Commit 7306e83c authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc: Don't use CURRENT_THREAD_INFO to find the stack

A few places use CURRENT_THREAD_INFO, or the C version, to find the
stack. This will no longer work with THREAD_INFO_IN_TASK so change
them to find the stack in other ways.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
[mpe: Split out of larger patch]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 1e35f29c
...@@ -689,7 +689,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S) ...@@ -689,7 +689,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S)
2: 2:
#endif /* CONFIG_PPC_BOOK3S_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
CURRENT_THREAD_INFO(r7, r8) /* base of new stack */ clrrdi r7, r8, THREAD_SHIFT /* base of new stack */
/* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE
because we don't need to leave the 288-byte ABI gap at the because we don't need to leave the 288-byte ABI gap at the
top of the kernel stack. */ top of the kernel stack. */
......
...@@ -663,7 +663,7 @@ void do_IRQ(struct pt_regs *regs) ...@@ -663,7 +663,7 @@ void do_IRQ(struct pt_regs *regs)
struct thread_info *curtp, *irqtp, *sirqtp; struct thread_info *curtp, *irqtp, *sirqtp;
/* Switch to the irq stack to handle this */ /* Switch to the irq stack to handle this */
curtp = current_thread_info(); curtp = (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1));
irqtp = hardirq_ctx[raw_smp_processor_id()]; irqtp = hardirq_ctx[raw_smp_processor_id()];
sirqtp = softirq_ctx[raw_smp_processor_id()]; sirqtp = softirq_ctx[raw_smp_processor_id()];
......
...@@ -603,7 +603,7 @@ EXPORT_SYMBOL(__bswapdi2) ...@@ -603,7 +603,7 @@ EXPORT_SYMBOL(__bswapdi2)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
_GLOBAL(start_secondary_resume) _GLOBAL(start_secondary_resume)
/* Reset stack */ /* Reset stack */
CURRENT_THREAD_INFO(r1, r1) rlwinm r1, r1, 0, 0, 31 - THREAD_SHIFT
addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
li r3,0 li r3,0
stw r3,0(r1) /* Zero the stack frame pointer */ stw r3,0(r1) /* Zero the stack frame pointer */
......
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