powerpc/cell: Fix crash in iic_setup_cpu() after per_cpu changes
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 3 Apr 2015 03:11:53 +0000 (14:11 +1100)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:14 +0000 (19:12 -0400)
commit74fb2a59b1b38109534ee73be457def9791124a3
tree12e4ff4d8b18d2e56a1ce8885ccd7629c01f023f
parent55b47182b6daf9f9ab6b02de8915524373747ce4
powerpc/cell: Fix crash in iic_setup_cpu() after per_cpu changes

[ Upstream commit b0dd00addc5035f87ec9c5820dacc1ebc7fcb3e6 ]

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: 69111bac42f5 ("powerpc: Replace __get_cpu_var uses")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/powerpc/platforms/cell/interrupt.c