linux/arch/powerpc
Michael Ellerman 45b21cfeb2 powerpc/powernv: Fix oops on P9 DD1 in cause_ipi()
Recently we merged the native xive support for Power9, and then separately some
reworks for doorbell IPI support. In isolation both series were OK, but the
merged result had a bug in one case.

On P9 DD1 we use pnv_p9_dd1_cause_ipi() which tries to use doorbells, and then
falls back to the interrupt controller. However the fallback is implemented by
calling icp_ops->cause_ipi. But now that xive support is merged we might be
using xive, in which case icp_ops is not initialised, it's a xics specific
structure. This leads to an oops such as:

  Unable to handle kernel paging request for data at address 0x00000028
  Oops: Kernel access of bad area, sig: 11 [#1]
  NIP pnv_p9_dd1_cause_ipi+0x74/0xe0
  LR smp_muxed_ipi_message_pass+0x54/0x70

To fix it, rather than using icp_ops which might be NULL, have both xics and
xive set smp_ops->cause_ipi, and then in the powernv code we save that as
ic_cause_ipi before overriding smp_ops->cause_ipi. For paranoia add a WARN_ON()
to check if somehow smp_ops->cause_ipi is NULL.

Fixes: b866cc2199 ("powerpc: Change the doorbell IPI calling convention")
Tested-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-04-26 23:28:12 +10:00
..
boot powerpc/boot: Fix zImage TOC alignment 2017-03-08 10:39:32 +11:00
configs powerpc/configs: Re-enable POWER8 crc32c 2017-03-28 10:52:04 +11:00
crypto crypto: powerpc - Fix initialisation of crc32c context 2017-03-08 14:01:08 +08:00
include powerpc/mm: Ensure IRQs are off in switch_mm() 2017-04-25 00:24:59 +10:00
kernel powerpc/sysfs: Fix reference leak of cpu device_nodes present at boot 2017-04-25 00:24:59 +10:00
kvm Merge branch 'topic/xive' (early part) into next 2017-04-12 22:31:37 +10:00
lib powerpc/kprobes: Convert __kprobes to NOKPROBE_SYMBOL() 2017-04-23 20:32:25 +10:00
math-emu
mm powerpc/mm: Fix possible out-of-bounds shift in arch_mmap_rnd() 2017-04-26 15:35:01 +10:00
net
oprofile
perf powerpc/perf: Add Power8 mem_access event to sysfs 2017-04-19 20:00:23 +10:00
platforms powerpc/powernv: Fix oops on P9 DD1 in cause_ipi() 2017-04-26 23:28:12 +10:00
purgatory kexec, x86/purgatory: Unbreak it and clean it up 2017-03-10 20:55:09 +01:00
scripts
sysdev powerpc/powernv: Fix oops on P9 DD1 in cause_ipi() 2017-04-26 23:28:12 +10:00
xmon powerpc/xmon: Deindent the SLB dumping logic 2017-04-25 00:24:59 +10:00
Kconfig Merge branch 'topic/kprobes' into next 2017-04-25 00:24:04 +10:00
Kconfig.debug
Makefile powerpc: Fix compiling a BE kernel with a powerpc64le toolchain 2017-03-03 11:24:50 +11:00
relocs_check.sh