# 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_ppc6xx_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ppc6xx_defconfig # make -s -j 8 ARCH=powerpc O=/kisskb/build/npiggin_ppc6xx_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/arch/powerpc/kernel/trace/ftrace.c: In function 'prepare_ftrace_return': /kisskb/src/arch/powerpc/kernel/trace/ftrace.c:746:3: error: 'local_paca' undeclared (first use in this function) /kisskb/src/arch/powerpc/kernel/trace/ftrace.c:746:3: note: each undeclared identifier is reported only once for each function it appears in /kisskb/src/arch/powerpc/kernel/trace/ftrace.c:746:32: error: 'PACA_IRQ_HARD_DIS' undeclared (first use in this function) /kisskb/src/arch/powerpc/kernel/trace/ftrace.c:747:10: error: implicit declaration of function 'irq_soft_mask_set' [-Werror=implicit-function-declaration] /kisskb/src/arch/powerpc/kernel/trace/ftrace.c:747:28: error: 'IRQS_ENABLED' undeclared (first use in this function) cc1: all warnings being treated as errors make[3]: *** [/kisskb/src/scripts/Makefile.build:307: arch/powerpc/kernel/trace/ftrace.o] Error 1 make[2]: *** [/kisskb/src/scripts/Makefile.build:548: arch/powerpc/kernel/trace] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/kisskb/src/Makefile:1053: arch/powerpc/kernel] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:146: sub-make] Error 2 Command 'make -s -j 8 ARCH=powerpc O=/kisskb/build/npiggin_ppc6xx_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/npiggin_ppc6xx_defconfig_powerpc # Build took: 0:00:11.184174