# git rev-parse -q --verify 225db419ce6a7468e7b219eee8e7ecc1f80f75b2^{commit} 225db419ce6a7468e7b219eee8e7ecc1f80f75b2 already have revision, skipping fetch # git checkout -q -f -B kisskb 225db419ce6a7468e7b219eee8e7ecc1f80f75b2 # git clean -qxdf # < git log -1 # commit 225db419ce6a7468e7b219eee8e7ecc1f80f75b2 # Author: Aneesh Kumar K.V # Date: Mon Jul 29 15:21:28 2019 +0530 # # powerpc/nvdimm: Pick nearby online node if the device node is not online # # Currently, nvdimm subsystem expects the device numa node for SCM device to be # an online node. It also doesn't try to bring the device numa node online. Hence # if we use a non-online numa node as device node we hit crashes like below. This # is because we try to access uninitialized NODE_DATA in different code paths. # # cpu 0x0: Vector: 300 (Data Access) at [c0000000fac53170] # pc: c0000000004bbc50: ___slab_alloc+0x120/0xca0 # lr: c0000000004bc834: __slab_alloc+0x64/0xc0 # sp: c0000000fac53400 # msr: 8000000002009033 # dar: 73e8 # dsisr: 80000 # current = 0xc0000000fabb6d80 # paca = 0xc000000003870000 irqmask: 0x03 irq_happened: 0x01 # pid = 7, comm = kworker/u16:0 # Linux version 5.2.0-06234-g76bd729b2644 (kvaneesh@ltc-boston123) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #135 SMP Thu Jul 11 05:36:30 CDT 2019 # enter ? for help # [link register ] c0000000004bc834 __slab_alloc+0x64/0xc0 # [c0000000fac53400] c0000000fac53480 (unreliable) # [c0000000fac53500] c0000000004bc818 __slab_alloc+0x48/0xc0 # [c0000000fac53560] c0000000004c30a0 __kmalloc_node_track_caller+0x3c0/0x6b0 # [c0000000fac535d0] c000000000cfafe4 devm_kmalloc+0x74/0xc0 # [c0000000fac53600] c000000000d69434 nd_region_activate+0x144/0x560 # [c0000000fac536d0] c000000000d6b19c nd_region_probe+0x17c/0x370 # [c0000000fac537b0] c000000000d6349c nvdimm_bus_probe+0x10c/0x230 # [c0000000fac53840] c000000000cf3cc4 really_probe+0x254/0x4e0 # [c0000000fac538d0] c000000000cf429c driver_probe_device+0x16c/0x1e0 # [c0000000fac53950] c000000000cf0b44 bus_for_each_drv+0x94/0x130 # [c0000000fac539b0] c000000000cf392c __device_attach+0xdc/0x200 # [c0000000fac53a50] c000000000cf231c bus_probe_device+0x4c/0xf0 # [c0000000fac53a90] c000000000ced268 device_add+0x528/0x810 # [c0000000fac53b60] c000000000d62a58 nd_async_device_register+0x28/0xa0 # [c0000000fac53bd0] c0000000001ccb8c async_run_entry_fn+0xcc/0x1f0 # [c0000000fac53c50] c0000000001bcd9c process_one_work+0x46c/0x860 # [c0000000fac53d20] c0000000001bd4f4 worker_thread+0x364/0x5f0 # [c0000000fac53db0] c0000000001c7260 kthread+0x1b0/0x1c0 # [c0000000fac53e20] c00000000000b954 ret_from_kernel_thread+0x5c/0x68 # # The patch tries to fix this by picking the nearest online node as the SCM node. # This does have a problem of us losing the information that SCM node is # equidistant from two other online nodes. If applications need to understand these # fine-grained details we should express then like x86 does via # /sys/devices/system/node/nodeX/accessY/initiators/ # # With the patch we get # # # numactl -H # available: 2 nodes (0-1) # node 0 cpus: # node 0 size: 0 MB # node 0 free: 0 MB # node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 # node 1 size: 130865 MB # node 1 free: 129130 MB # node distances: # node 0 1 # 0: 10 20 # 1: 20 10 # # cat /sys/bus/nd/devices/region0/numa_node # 0 # # dmesg | grep papr_scm # [ 91.332305] papr_scm ibm,persistent-memory:ibm,pmemory@44104001: Region registered with target node 2 and online node 0 # # Signed-off-by: Aneesh Kumar K.V # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20190729095128.23707-1-aneesh.kumar@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 225db419ce6a7468e7b219eee8e7ecc1f80f75b2 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_defconfig # Added to kconfig CONFIG_PPC_E500MC=y # Added to kconfig CONFIG_VIRTUALIZATION=y # Added to kconfig CONFIG_KVM_E500MC=y # Added to kconfig # yes \n | make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- oldconfig yes: standard output: Broken pipe # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/drivers/crypto/talitos.c: In function 'talitos_remove': /kisskb/src/drivers/crypto/talitos.c:3142:4: warning: this statement may fall through [-Wimplicit-fallthrough=] crypto_unregister_aead(&t_alg->algt.alg.aead); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/crypto/talitos.c:3143:3: note: here case CRYPTO_ALG_TYPE_AHASH: ^~~~ /kisskb/src/drivers/dma/fsldma.c: In function 'fsl_dma_chan_probe': /kisskb/src/drivers/dma/fsldma.c:1165:26: warning: this statement may fall through [-Wimplicit-fallthrough=] chan->toggle_ext_pause = fsl_chan_toggle_ext_pause; ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/dma/fsldma.c:1166:2: note: here case FSL_DMA_IP_83XX: ^~~~ In file included from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:9, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^~~~~~~~~~~~ In file included from /kisskb/src/include/linux/acpi.h:15, from /kisskb/src/include/linux/i2c.h:13, from /kisskb/src/include/uapi/linux/fb.h:6, from /kisskb/src/include/linux/fb.h:6, from /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:20: /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c: In function 'fsl_diu_ioctl': /kisskb/src/include/linux/device.h:1501:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro 'dev_warn' dev_warn(info->dev, ^~~~~~~~ /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:1290:2: note: here case MFB_SET_PIXFMT: ^~~~ In file included from /kisskb/src/include/linux/acpi.h:15, from /kisskb/src/include/linux/i2c.h:13, from /kisskb/src/include/uapi/linux/fb.h:6, from /kisskb/src/include/linux/fb.h:6, from /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:20: /kisskb/src/include/linux/device.h:1501:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:1296:3: note: in expansion of macro 'dev_warn' dev_warn(info->dev, ^~~~~~~~ /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:1299:2: note: here case MFB_GET_PIXFMT: ^~~~ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xde2970) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xdd213c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:47 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548851 Bytes = 6395.36 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:47 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548538 Bytes = 6395.06 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:47 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548694 Bytes = 6395.21 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:47 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6513409 Bytes = 6360.75 KiB = 6.21 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:47 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6550196 Bytes = 6396.68 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:47 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548695 Bytes = 6395.21 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:47 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6549327 Bytes = 6395.83 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:48 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6549434 Bytes = 6395.93 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:48 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548180 Bytes = 6394.71 KiB = 6.24 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:48 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548598 Bytes = 6395.12 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:48 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548604 Bytes = 6395.12 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:48 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548695 Bytes = 6395.21 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:49 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6550418 Bytes = 6396.89 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:49 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548791 Bytes = 6395.30 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:50 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548643 Bytes = 6395.16 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.3.0-rc2-g225db419ce6a Created: Tue Jul 30 00:09:50 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6548852 Bytes = 6395.36 KiB = 6.25 MiB Load Address: 00e00000 Entry Point: 00e002b4 Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 # Build took: 0:02:40.811525