alistair23-linux/arch/powerpc
Anju T Sudhakar ad2b6e0102 powerpc/perf/imc: Fix nest-imc cpuhotplug callback failure
Oops is observed during boot:

  Faulting instruction address: 0xc000000000248340
  cpu 0x0: Vector: 380 (Data Access Out of Range) at [c000000ff66fb850]
      pc: c000000000248340: event_function_call+0x50/0x1f0
      lr: c00000000024878c: perf_remove_from_context+0x3c/0x100
      sp: c000000ff66fbad0
     msr: 9000000000009033
     dar: 7d20e2a6f92d03c0
    pid = 14, comm = cpuhp/0

While registering the cpuhotplug callbacks for nest-imc, if we fail in
the cpuhotplug online path for any random node in a multi node
system (because the opal call to stop nest-imc counters fails for that
node), ppc_nest_imc_cpu_offline() will get invoked for other nodes who
successfully returned from cpuhotplug online path.

This call trace is generated since in the ppc_nest_imc_cpu_offline()
path we are trying to migrate the event context, when nest-imc
counters are not even initialized.

Patch to add a check to ensure that nest-imc is registered before
migrating the event context.

Fixes: 885dcd709b ("powerpc/perf: Add nest IMC PMU support")
Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-12-13 20:36:53 +11:00
..
boot powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
configs powerpc/configs: Enable I2C_CHARDEV for pseries and powernv 2017-10-22 12:08:31 +02:00
crypto License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
include Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier" 2017-12-05 23:21:46 +11:00
kernel powerpc/64s: Initialize ISAv3 MMU registers before setting partition table 2017-12-06 23:32:43 +11:00
kvm * x86 bugfixes: APIC, nested virtualization, IOAPIC 2017-11-30 08:15:19 -08:00
lib powerpc fixes for 4.15 #2 2017-11-24 19:40:12 -10:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc fixes for 4.15 #3 2017-12-01 08:40:17 -05:00
net powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
oprofile treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
perf powerpc/perf/imc: Fix nest-imc cpuhotplug callback failure 2017-12-13 20:36:53 +11:00
platforms Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier" 2017-12-05 23:21:46 +11:00
purgatory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysdev powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xmon powerpc/xmon: Don't print hashed pointers in xmon 2017-12-07 00:27:01 +11:00
Kconfig powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
Kconfig.debug powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
Makefile
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00