1
0
Fork 0
alistair23-linux/arch/powerpc/platforms/pseries
Nathan Fontenot b2d3b5ee66 powerpc/pseries: Track LMB nid instead of using device tree
When removing memory we need to remove the memory from the node
it was added to instead of looking up the node it should be in
in the device tree.

During testing we have seen scenarios where the affinity for a
LMB changes due to a partition migration or PRRN event. In these
cases the node the LMB exists in may not match the node the device
tree indicates it belongs in. This can lead to a system crash
when trying to DLPAR remove the LMB after a migration or PRRN
event. The current code looks up the node in the device tree to
remove the LMB from, the crash occurs when we try to offline this
node and it does not have any data, i.e. node_data[nid] == NULL.

36:mon> e
cpu 0x36: Vector: 300 (Data Access) at [c0000001828b7810]
    pc: c00000000036d08c: try_offline_node+0x2c/0x1b0
    lr: c0000000003a14ec: remove_memory+0xbc/0x110
    sp: c0000001828b7a90
   msr: 800000000280b033
   dar: 9a28
 dsisr: 40000000
  current = 0xc0000006329c4c80
  paca    = 0xc000000007a55200   softe: 0        irq_happened: 0x01
    pid   = 76926, comm = kworker/u320:3

36:mon> t
[link register   ] c0000000003a14ec remove_memory+0xbc/0x110
[c0000001828b7a90] c00000000006a1cc arch_remove_memory+0x9c/0xd0 (unreliable)
[c0000001828b7ad0] c0000000003a14e0 remove_memory+0xb0/0x110
[c0000001828b7b20] c0000000000c7db4 dlpar_remove_lmb+0x94/0x160
[c0000001828b7b60] c0000000000c8ef8 dlpar_memory+0x7e8/0xd10
[c0000001828b7bf0] c0000000000bf828 handle_dlpar_errorlog+0xf8/0x160
[c0000001828b7c60] c0000000000bf8cc pseries_hp_work_fn+0x3c/0xa0
[c0000001828b7c90] c000000000128cd8 process_one_work+0x298/0x5a0
[c0000001828b7d20] c000000000129068 worker_thread+0x88/0x620
[c0000001828b7dc0] c00000000013223c kthread+0x1ac/0x1c0
[c0000001828b7e30] c00000000000b45c ret_from_kernel_thread+0x5c/0x80

To resolve this we need to track the node a LMB belongs to when
it is added to the system so we can remove it from that node instead
of the node that the device tree indicates it should belong to.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-04-29 22:27:16 +10:00
..
Kconfig Kconfig file consolidation for v4.21 2018-12-29 13:40:29 -08:00
Makefile powerpc/pseries: Add driver for PAPR SCM regions 2018-10-19 00:56:17 +11:00
cmm.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
dlpar.c powerpc/pseries: add of_node_put() in dlpar_detach_node() 2018-11-08 22:11:00 -08:00
dtl.c powerpc/pseries: Fix how we iterate over the DTL entries 2018-10-03 15:40:02 +10:00
eeh_pseries.c powerpc/eeh: Cleanup eeh_ops.wait_state() 2018-10-13 22:21:25 +11:00
event_sources.c powerpc/pseries: Use of_irq_get helper() in request_event_sources_irqs() 2018-10-03 15:40:01 +10:00
firmware.c powerpc/pseries: PAPR persistent memory support 2018-10-19 00:56:17 +11:00
hotplug-cpu.c powerpc/pseries: Perform full re-add of CPU for topology update post-migration 2019-01-30 23:28:56 +11:00
hotplug-memory.c powerpc/pseries: Track LMB nid instead of using device tree 2019-04-29 22:27:16 +10:00
hvCall.S jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00
hvCall_inst.c powerpc/pseries: hcall_exit tracepoint retval should be signed 2018-05-10 23:17:43 +10:00
hvconsole.c powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
hvcserver.c powerpc/pseries/hvcserver: don't memset pi_buff if it is null 2015-10-09 08:03:03 +11:00
ibmebus.c pseries: ibmebus.c: convert to use BUS_ATTR_WO 2019-01-22 14:25:26 +01:00
io_event_irq.c powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
iommu.c powerpc/pseries/iommu: Fix set but not used values 2019-04-20 22:02:26 +10:00
kexec.c powerpc/xive: Remove xive_kexec_teardown_cpu() 2018-08-07 21:49:28 +10:00
lpar.c powerpc/mm: move warning from resize_hpt_for_hotplug() 2019-04-20 22:02:26 +10:00
lparcfg.c powerpc/pseries: export timebase register sample in lparcfg 2019-02-22 00:10:15 +11:00
mobility.c powerpc/pseries/mobility: Extend start/stop topology update scope 2018-10-13 22:21:25 +11:00
msi.c powerpc/eeh: Cleanup list_head field names 2018-10-13 22:21:25 +11:00
nvram.c powerpc: Adopt nvram module for PPC64 2019-01-22 10:21:45 +01:00
of_helpers.c pseries/drc-info: Search DRC properties for CPU indexes 2018-01-21 16:21:46 +11:00
of_helpers.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
offline_states.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
papr_scm.c device-dax for 5.1 2019-03-16 13:05:32 -07:00
pci.c powerpc/pseries: Fix build break due to pnv_npu2_init() 2019-01-15 21:27:47 +11:00
pci_dlpar.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
pmem.c powerpc/pseries/pmem: Fix a set but not used value 2019-04-20 22:02:26 +10:00
power.c powerpc/sparse: Include headers containing prototypes 2016-06-16 22:40:19 +10:00
pseries.h powerpc/pseries: PAPR persistent memory support 2018-10-19 00:56:17 +11:00
pseries_energy.c powerpc/pseries/energy: Use OF accessor functions to read ibm,drc-indexes 2019-03-27 10:40:09 +11:00
ras.c powerpc/pseries: hwpoison the pages upon hitting UE 2019-04-20 22:02:35 +10:00
reconfig.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
rng.c powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* 2015-07-23 19:52:03 +10:00
scanlog.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
setup.c powerpc: prefer memblock APIs returning virtual address 2019-03-07 18:32:03 -08:00
smp.c Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
suspend.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
vio.c powerpc/dma: use the generic direct mapping bypass 2019-02-18 22:41:04 +11:00