Skip to content

Commit b0dd00a

Browse files
committed
powerpc/cell: Fix crash in iic_setup_cpu() after per_cpu changes
The conversion from __get_cpu_var() to this_cpu_ptr() in iic_setup_cpu() is wrong. It causes an oops at boot. We need the per-cpu address of struct cpu_iic, not cpu_iic.regs->prio. Sparse noticed this, because we pass a non-iomem pointer to out_be64(), but we obviously don't check the sparse results often enough. Fixes: 69111ba ("powerpc: Replace __get_cpu_var uses") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 7e862d7 commit b0dd00a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/powerpc/platforms/cell/interrupt.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static unsigned int iic_get_irq(void)
163163

164164
void iic_setup_cpu(void)
165165
{
166-
out_be64(this_cpu_ptr(&cpu_iic.regs->prio), 0xff);
166+
out_be64(&this_cpu_ptr(&cpu_iic)->regs->prio, 0xff);
167167
}
168168

169169
u8 iic_get_target_id(int cpu)

0 commit comments

Comments
 (0)