# git rev-parse -q --verify 1ccd25030612c37a86f574e71c4f5b0ac246c183^{commit} 1ccd25030612c37a86f574e71c4f5b0ac246c183 already have revision, skipping fetch # git checkout -q -f -B kisskb 1ccd25030612c37a86f574e71c4f5b0ac246c183 # git clean -qxdf # < git log -1 # commit 1ccd25030612c37a86f574e71c4f5b0ac246c183 # Author: Nicholas Piggin # Date: Wed Aug 15 00:10:22 2018 +1000 # # powerpc/64s/hash: convert SLB miss handlers to C # # This patch moves SLB miss handlers completely to C, using the standard # exception handler macros to set up the stack and branch to C. # # This can be done because the segment containing the kernel stack is # always bolted, so accessing it with relocation on will not cause an # SLB exception. # # Arbitrary kernel memory may not be accessed when handling kernel space # SLB misses, so care should be taken there. However user SLB misses can # access any kernel memory, which can be used to move some fields out of # the paca (in later patches). # # User SLB misses could quite easily reconcile IRQs and set up a first # class kernel environment and exit via ret_from_except, however that # doesn't seem to be necessary at the moment, so we only do that if a # bad fault is encountered. # # [ Credit to Aneesh for bug fixes, error checks, and improvements to bad # address handling, etc ] # # Signed-off-by: Nicholas Piggin # # Since RFC: # - Added MSR[RI] handling # - Fixed up a register loss bug exposed by irq tracing (Aneesh) # - Reject misses outside the defined kernel regions (Aneesh) # - Added several more sanity checks and error handling (Aneesh), we may # look at consolidating these tests and tightenig up the code but for # a first pass we decided it's better to check carefully. # # Since v1: # - Fixed SLB cache corruption (Aneesh) # - Fixed untidy SLBE allocation "leak" in get_vsid error case # - Now survives some stress testing on real hardware # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < git log --format=%s --max-count=1 1ccd25030612c37a86f574e71c4f5b0ac246c183 # < make -s -j 10 ARCH=powerpc O=/kisskb/build/npiggin_mpc85xx_smp_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- mpc85xx_smp_defconfig # make -s -j 10 ARCH=powerpc O=/kisskb/build/npiggin_mpc85xx_smp_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/cgroup/cgroup-v1.c: In function 'cgroup1_mount': /kisskb/src/kernel/cgroup/cgroup-v1.c:1256:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2511:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1833:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:186:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/soc/codecs/wm8960.c: In function 'wm8960_configure_clocking': /kisskb/src/sound/soc/codecs/wm8960.c:803:70: warning: 'j' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/soc/codecs/wm8960.c:800:68: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/mm/hugetlb.c: In function 'alloc_pool_huge_page': /kisskb/src/mm/hugetlb.c:1433:5: warning: 'page' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/i2c/i2c-core-base.c: In function 'i2c_generic_scl_recovery': /kisskb/src/drivers/i2c/i2c-core-base.c:235:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:341:21: note: 'pdeo' was declared here /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /kisskb/src/fs/udf/unicode.c: In function 'udf_name_conv_char': /kisskb/src/fs/udf/unicode.c:132:8: warning: 'c' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:251:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:231:19: note: 'i' was declared here 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) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xbff0ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5832758 Bytes = 5696.05 KiB = 5.56 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5857142 Bytes = 5719.87 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00288 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5856714 Bytes = 5719.45 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5858230 Bytes = 5720.93 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5857657 Bytes = 5720.37 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5857565 Bytes = 5720.28 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5856673 Bytes = 5719.41 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5856709 Bytes = 5719.44 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5858236 Bytes = 5720.93 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5856942 Bytes = 5719.67 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc0f86c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:52 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5856633 Bytes = 5719.37 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00288 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:53 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5857187 Bytes = 5719.91 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:53 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5857139 Bytes = 5719.86 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00248 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:53 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5856624 Bytes = 5719.36 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00288 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:53 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5856634 Bytes = 5719.37 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00288 Image Name: Linux-4.18.0-g1ccd25030612c Created: Tue Aug 28 18:51:53 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5857099 Bytes = 5719.82 KiB = 5.59 MiB Load Address: 00d00000 Entry Point: 00d00288 Completed OK # rm -rf /kisskb/build/npiggin_mpc85xx_smp_defconfig_powerpc # Build took: 0:02:56.786916