linux/arch/powerpc/platforms
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
..
8xx powerpc/8xx: Implement support of hugepages 2016-12-09 22:49:07 -06:00
40x powerpc updates for 4.10 2016-12-16 09:26:42 -08:00
44x powerpc/4xx: Make sam440ep_setup_rtc() init 2017-03-31 23:09:40 +11:00
52xx powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
82xx powerpc/e8248e: Select PHYLIB only if NETDEVICES is enabled 2016-09-24 23:59:47 -05:00
83xx sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
85xx powerpc: Change the doorbell IPI calling convention 2017-04-13 23:34:33 +10:00
86xx powerpc: Convert fsl_rstcr_restart to a reset handler 2016-09-25 02:38:50 -05:00
512x powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
amigaone powerpc: Move 32-bit probe() machine to later in the boot process 2016-07-21 19:06:42 +10:00
cell powerpc: Create asm/debugfs.h and move powerpc_debugfs_root there 2017-04-11 07:46:03 +10:00
chrp Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
embedded6xx powerpc: Add support for relative exception tables 2016-11-14 11:11:51 +11:00
maple powerpc: Move isa bridge definitions to separate include 2017-01-31 13:54:17 +11:00
pasemi treewide: Move dma_ops from struct dev_archdata into struct device 2017-01-24 12:23:35 -05:00
powermac powerpc: Change the doorbell IPI calling convention 2017-04-13 23:34:33 +10:00
powernv powerpc/powernv: Fix oops on P9 DD1 in cause_ipi() 2017-04-26 23:28:12 +10:00
ps3 treewide: Move dma_ops from struct dev_archdata into struct device 2017-01-24 12:23:35 -05:00
pseries powerpc/pseries: Fix of_node_put() underflow during DLPAR remove 2017-04-25 00:24:59 +10:00
fsl_uli1575.c of/irq: Refactor interrupt-map parsing 2013-10-24 11:43:04 +01:00
Kconfig powerpc/pseries: Move ibmebus.c into platforms pseries 2016-11-18 23:02:18 +11:00
Kconfig.cputype powerpc/64s: Remove ICSWX feature from Power9 2017-04-19 20:21:50 +10:00
Makefile powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00