# 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_mpc512x_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- mpc512x_defconfig # make -s -j 8 ARCH=powerpc O=/kisskb/build/npiggin_mpc512x_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/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/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 INFO: Uncompressed kernel (size 0x5d93ec) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) Image Name: Linux-4.18.0-g1ccd25030612 Created: Tue Aug 28 18:53:46 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2980051 Bytes = 2910.21 KiB = 2.84 MiB Load Address: 00000000 Entry Point: 00000000 Completed OK # rm -rf /kisskb/build/npiggin_mpc512x_defconfig_powerpc # Build took: 0:01:14.880420