# git rev-parse -q --verify 75ecfb49516c53da00c57b9efe48fa3f5504a791^{commit} 75ecfb49516c53da00c57b9efe48fa3f5504a791 already have revision, skipping fetch # git checkout -q -f -B kisskb 75ecfb49516c53da00c57b9efe48fa3f5504a791 # git clean -qxdf # < git log -1 # commit 75ecfb49516c53da00c57b9efe48fa3f5504a791 # Author: Mahesh Salgaonkar # Date: Mon Apr 23 10:29:27 2018 +0530 # # powerpc/mce: Fix a bug where mce loops on memory UE. # # The current code extracts the physical address for UE errors and then # hooks it up into memory failure infrastructure. On successful # extraction of physical address it wrongly sets "handled = 1" which # means this UE error has been recovered. Since MCE handler gets return # value as handled = 1, it assumes that error has been recovered and # goes back to same NIP. This causes MCE interrupt again and again in a # loop leading to hard lockup. # # Also, initialize phys_addr to ULONG_MAX so that we don't end up # queuing undesired page to hwpoison. # # Without this patch we see: # Severe Machine check interrupt [Recovered] # NIP: [000000001002588c] PID: 7109 Comm: find # Initiator: CPU # Error type: UE [Load/Store] # Effective address: 00007fffd2755940 # Physical address: 000020181a080000 # ... # Severe Machine check interrupt [Recovered] # NIP: [000000001002588c] PID: 7109 Comm: find # Initiator: CPU # Error type: UE [Load/Store] # Effective address: 00007fffd2755940 # Physical address: 000020181a080000 # Severe Machine check interrupt [Recovered] # NIP: [000000001002588c] PID: 7109 Comm: find # Initiator: CPU # Error type: UE [Load/Store] # Effective address: 00007fffd2755940 # Physical address: 000020181a080000 # Memory failure: 0x20181a08: recovery action for dirty LRU page: Recovered # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # Memory failure: 0x20181a08: already hardware poisoned # ... # Watchdog CPU:38 Hard LOCKUP # # After this patch we see: # # Severe Machine check interrupt [Not recovered] # NIP: [00007fffaae585f4] PID: 7168 Comm: find # Initiator: CPU # Error type: UE [Load/Store] # Effective address: 00007fffaafe28ac # Physical address: 00002017c0bd0000 # find[7168]: unhandled signal 7 at 00007fffaae585f4 nip 00007fffaae585f4 lr 00007fffaae585e0 code 4 # Memory failure: 0x2017c0bd: recovery action for dirty LRU page: Recovered # # Fixes: 01eaac2b0591 ("powerpc/mce: Hookup ierror (instruction) UE errors") # Fixes: ba41e1e1ccb9 ("powerpc/mce: Hookup derror (load/store) UE errors") # Cc: stable@vger.kernel.org # v4.15+ # Signed-off-by: Mahesh Salgaonkar # Signed-off-by: Balbir Singh # Reviewed-by: Balbir Singh # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < git log --format=%s --max-count=1 75ecfb49516c53da00c57b9efe48fa3f5504a791 # < make -s -j 10 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # make -s -j 10 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:10:0, 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:77: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)) ^ arch/powerpc/boot/mpc8541cds.dtb: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) arch/powerpc/boot/mpc8555cds.dtb: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) arch/powerpc/boot/mpc8548cds_32b.dtb: Warning (pci_bridge): /pcie@e000a000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/mpc8548cds_32b.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' arch/powerpc/boot/mpc8568mds.dtb: Warning (pci_bridge): /pcie@e000a000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/mpc8568mds.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' arch/powerpc/boot/mpc8544ds.dtb: Warning (pci_bridge): /pcie@e0009000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/mpc8544ds.dtb: Warning (pci_bridge): /pcie@e000a000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/mpc8544ds.dtb: Warning (pci_bridge): /pcie@e000b000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/mpc8544ds.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' arch/powerpc/boot/mpc8572ds.dtb: Warning (pci_bridge): /pcie@ffe08000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/mpc8572ds.dtb: Warning (pci_bridge): /pcie@ffe09000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/mpc8572ds.dtb: Warning (pci_bridge): /pcie@ffe0a000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/mpc8572ds.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' arch/powerpc/boot/tqm8548.dtb: Warning (pci_bridge): /pcie@e000a000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/tqm8548.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' arch/powerpc/boot/sbc8548.dtb: Warning (pci_bridge): /pcie@e000a000/pcie@0: missing bus-range for PCI bridge arch/powerpc/boot/sbc8548.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbd8eb4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5869281 Bytes = 5731.72 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5867458 Bytes = 5729.94 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5867994 Bytes = 5730.46 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5867969 Bytes = 5730.44 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5867781 Bytes = 5730.25 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5867996 Bytes = 5730.46 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe966c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5868212 Bytes = 5730.68 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5843565 Bytes = 5706.61 kB = 5.57 MB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5868695 Bytes = 5731.15 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:02 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5868269 Bytes = 5730.73 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:05 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5868187 Bytes = 5730.65 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:05 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5868171 Bytes = 5730.64 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:05 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5867735 Bytes = 5730.21 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:05 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5867894 Bytes = 5730.37 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:05 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5867734 Bytes = 5730.21 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.17.0-rc2-g75ecfb4 Created: Tue Apr 24 15:34:05 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5868925 Bytes = 5731.37 kB = 5.60 MB Load Address: 00c00000 Entry Point: 00c0020c Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-5.3 # Build took: 0:02:10.778849