linux_dsm_epyc7002/arch/powerpc/platforms
Nathan Lynch e610a466d1 powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration
It's common for the platform to replace the cache device nodes after a
migration. Since the cacheinfo code is never informed about this, it
never drops its references to the source system's cache nodes, causing
it to wind up in an inconsistent state resulting in warnings and oopses
as soon as CPU online/offline occurs after the migration, e.g.

  cache for /cpus/l3-cache@3113(Unified) refers to cache for /cpus/l2-cache@200d(Unified)
  WARNING: CPU: 15 PID: 86 at arch/powerpc/kernel/cacheinfo.c:176 release_cache+0x1bc/0x1d0
  [...]
  NIP release_cache+0x1bc/0x1d0
  LR  release_cache+0x1b8/0x1d0
  Call Trace:
    release_cache+0x1b8/0x1d0 (unreliable)
    cacheinfo_cpu_offline+0x1c4/0x2c0
    unregister_cpu_online+0x1b8/0x260
    cpuhp_invoke_callback+0x114/0xf40
    cpuhp_thread_fun+0x270/0x310
    smpboot_thread_fn+0x2c8/0x390
    kthread+0x1b8/0x1c0
    ret_from_kernel_thread+0x5c/0x68

Using device tree notifiers won't work since we want to rebuild the
hierarchy only after all the removals and additions have occurred and
the device tree is in a consistent state. Call cacheinfo_teardown()
before processing device tree updates, and rebuild the hierarchy
afterward.

Fixes: 410bccf978 ("powerpc/pseries: Partition migration in the kernel")
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-06-15 16:52:37 +10:00
..
4xx treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
8xx powerpc/8xx: Fix possible device node reference leak 2019-04-20 22:02:35 +10:00
40x treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
44x powerpc/44x: Force PCI on for CURRITUCK 2019-02-22 00:10:15 +11:00
52xx *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
82xx powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
83xx powerpc/83xx: Add missing of_node_put() after of_device_is_available() 2019-04-20 22:02:27 +10:00
85xx powerpc/dma: trim the fat from <asm/dma-mapping.h> 2019-02-18 22:41:04 +11:00
86xx powerpc/dma: use the generic direct mapping bypass 2019-02-18 22:41:04 +11:00
512x treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 40 2019-05-24 17:27:12 +02:00
amigaone treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cell treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
chrp treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
embedded6xx powerpc/embedded6xx: Remove unused functions holly_power_off and holly_halt 2019-04-20 22:02:12 +10:00
maple treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
pasemi treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
powermac treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
powernv powerpc/powernv/npu: Fix reference leak 2019-06-02 19:39:36 +10:00
ps3 treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
pseries powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration 2019-06-15 16:52:37 +10:00
fsl_uli1575.c of/irq: Refactor interrupt-map parsing 2013-10-24 11:43:04 +01:00
Kconfig Kconfig file consolidation for v4.21 2018-12-29 13:40:29 -08:00
Kconfig.cputype hugetlb: allow to free gigantic pages regardless of the configuration 2019-05-14 09:47:47 -07:00
Makefile powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00