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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:01:57 +0000 (22:01 +0200)
commite20179f27bbe7beea759c4567d2ae8db8fb8a57a
tree6948a59aee26aa12f5948ac5d4346456404ec1f4
parent0a814e8a843c9fa505c0d7fe204934b44b8c8915
powerpc/cell: Fix crash in iic_setup_cpu() after per_cpu changes

commit b0dd00addc5035f87ec9c5820dacc1ebc7fcb3e6 upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/cell/interrupt.c