# 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 8 ARCH=powerpc O=/kisskb/build/npiggin_mpc83xx_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- mpc83xx_defconfig # make -s -j 8 ARCH=powerpc O=/kisskb/build/npiggin_mpc83xx_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /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/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/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/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/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/mpc832x_rdb.dtb: Warning (interrupts_property): /qe@e0100000/mdio@3120/ethernet-phy@0:#interrupt-cells: size is (4), expected multiple of 8 arch/powerpc/boot/mpc832x_rdb.dtb: Warning (interrupts_property): /qe@e0100000/mdio@3120/ethernet-phy@4:#interrupt-cells: size is (4), expected multiple of 8 INFO: Uncompressed kernel (size 0x613770) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) INFO: Uncompressed kernel (size 0x613770) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) INFO: Uncompressed kernel (size 0x613770) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) INFO: Uncompressed kernel (size 0x613770) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) INFO: Uncompressed kernel (size 0x613770) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) INFO: Uncompressed kernel (size 0x613770) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) INFO: Uncompressed kernel (size 0x6030c4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) Image Name: Linux-4.18.0-g1ccd25030612 Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3041633 Bytes = 2970.34 KiB = 2.90 MiB Load Address: 00000000 Entry Point: 00000000 INFO: Uncompressed kernel (size 0x613770) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) Image Name: Linux-4.18.0-g1ccd25030612 Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3064956 Bytes = 2993.12 KiB = 2.92 MiB Load Address: 00700000 Entry Point: 00700230 Image Name: Linux-4.18.0-g1ccd25030612 Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3064954 Bytes = 2993.12 KiB = 2.92 MiB Load Address: 00700000 Entry Point: 00700230 Image Name: Linux-4.18.0-g1ccd25030612 Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3066036 Bytes = 2994.18 KiB = 2.92 MiB Load Address: 00700000 Entry Point: 00700230 Image Name: Linux-4.18.0-g1ccd25030612 Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3066016 Bytes = 2994.16 KiB = 2.92 MiB Load Address: 00700000 Entry Point: 00700230 Image Name: Linux-4.18.0-g1ccd25030612 Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3065566 Bytes = 2993.72 KiB = 2.92 MiB Load Address: 00700000 Entry Point: 00700230 Image Name: Linux-4.18.0-g1ccd25030612 Created: Tue Aug 28 18:51:50 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3065891 Bytes = 2994.03 KiB = 2.92 MiB Load Address: 00700000 Entry Point: 00700230 Completed OK # rm -rf /kisskb/build/npiggin_mpc83xx_defconfig_powerpc # Build took: 0:01:13.459763