Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'fixes' into next

Merge our fixes branch, primarily to bring in the ebb selftests build
fix and the pkey fix, which is a dependency for some future work.

+21 -18
+1 -1
Documentation/powerpc/vas-api.rst
··· 213 213 updating CSB with the following data: 214 214 215 215 csb.flags = CSB_V; 216 - csb.cc = CSB_CC_TRANSLATION; 216 + csb.cc = CSB_CC_FAULT_ADDRESS; 217 217 csb.ce = CSB_CE_TERMINATION; 218 218 csb.address = fault_address; 219 219
+2
arch/powerpc/include/asm/icswx.h
··· 77 77 #define CSB_CC_CHAIN (37) 78 78 #define CSB_CC_SEQUENCE (38) 79 79 #define CSB_CC_HW (39) 80 + /* P9 DD2 NX Workbook 3.2 (Table 4-36): Address translation fault */ 81 + #define CSB_CC_FAULT_ADDRESS (250) 80 82 81 83 #define CSB_SIZE (0x10) 82 84 #define CSB_ALIGN CSB_SIZE
+1 -1
arch/powerpc/kernel/exceptions-64s.S
··· 2551 2551 INT_DEFINE_BEGIN(denorm_exception) 2552 2552 IVEC=0x1500 2553 2553 IHSRR=1 2554 - IBRANCH_COMMON=0 2554 + IBRANCH_TO_COMMON=0 2555 2555 IKVM_REAL=1 2556 2556 INT_DEFINE_END(denorm_exception) 2557 2557
+1 -1
arch/powerpc/kernel/paca.c
··· 94 94 * This is very early in boot, so no harm done if the kernel crashes at 95 95 * this point. 96 96 */ 97 - BUG_ON(shared_lppaca_size >= shared_lppaca_total_size); 97 + BUG_ON(shared_lppaca_size > shared_lppaca_total_size); 98 98 99 99 return ptr; 100 100 }
+2 -1
arch/powerpc/kvm/book3s_64_mmu_radix.c
··· 40 40 /* Can't access quadrants 1 or 2 in non-HV mode, call the HV to do it */ 41 41 if (kvmhv_on_pseries()) 42 42 return plpar_hcall_norets(H_COPY_TOFROM_GUEST, lpid, pid, eaddr, 43 - __pa(to), __pa(from), n); 43 + (to != NULL) ? __pa(to): 0, 44 + (from != NULL) ? __pa(from): 0, n); 44 45 45 46 quadrant = 1; 46 47 if (!pid)
+7 -8
arch/powerpc/mm/book3s64/pkeys.c
··· 353 353 int pkey_shift; 354 354 u64 amr; 355 355 356 - if (!is_pkey_enabled(pkey)) 357 - return true; 358 - 359 356 pkey_shift = pkeyshift(pkey); 360 - if (execute && !(read_iamr() & (IAMR_EX_BIT << pkey_shift))) 361 - return true; 357 + if (execute) 358 + return !(read_iamr() & (IAMR_EX_BIT << pkey_shift)); 362 359 363 - amr = read_amr(); /* Delay reading amr until absolutely needed */ 364 - return ((!write && !(amr & (AMR_RD_BIT << pkey_shift))) || 365 - (write && !(amr & (AMR_WR_BIT << pkey_shift)))); 360 + amr = read_amr(); 361 + if (write) 362 + return !(amr & (AMR_WR_BIT << pkey_shift)); 363 + 364 + return !(amr & (AMR_RD_BIT << pkey_shift)); 366 365 } 367 366 368 367 bool arch_pte_access_permitted(u64 pte, bool write, bool execute)
+1
arch/powerpc/mm/nohash/kaslr_booke.c
··· 14 14 #include <linux/memblock.h> 15 15 #include <linux/libfdt.h> 16 16 #include <linux/crash_core.h> 17 + #include <asm/cacheflush.h> 17 18 #include <asm/pgalloc.h> 18 19 #include <asm/prom.h> 19 20 #include <asm/kdump.h>
+1 -1
arch/powerpc/platforms/powernv/vas-fault.c
··· 79 79 csb_addr = (void __user *)be64_to_cpu(crb->csb_addr); 80 80 81 81 memset(&csb, 0, sizeof(csb)); 82 - csb.cc = CSB_CC_TRANSLATION; 82 + csb.cc = CSB_CC_FAULT_ADDRESS; 83 83 csb.ce = CSB_CE_TERMINATION; 84 84 csb.cs = 0; 85 85 csb.count = 0;
+2 -2
tools/testing/selftests/powerpc/nx-gzip/gunz_test.c
··· 698 698 699 699 switch (cc) { 700 700 701 - case ERR_NX_TRANSLATION: 701 + case ERR_NX_AT_FAULT: 702 702 703 703 /* We touched the pages ahead of time. In the most common case 704 704 * we shouldn't be here. But may be some pages were paged out. 705 705 * Kernel should have placed the faulting address to fsaddr. 706 706 */ 707 - NXPRT(fprintf(stderr, "ERR_NX_TRANSLATION %p\n", 707 + NXPRT(fprintf(stderr, "ERR_NX_AT_FAULT %p\n", 708 708 (void *)cmdp->crb.csb.fsaddr)); 709 709 710 710 if (pgfault_retries == NX_MAX_FAULTS) {
+2 -2
tools/testing/selftests/powerpc/nx-gzip/gzfht_test.c
··· 306 306 lzcounts, cmdp, handle); 307 307 308 308 if (cc != ERR_NX_OK && cc != ERR_NX_TPBC_GT_SPBC && 309 - cc != ERR_NX_TRANSLATION) { 309 + cc != ERR_NX_AT_FAULT) { 310 310 fprintf(stderr, "nx error: cc= %d\n", cc); 311 311 exit(-1); 312 312 } 313 313 314 314 /* Page faults are handled by the user code */ 315 - if (cc == ERR_NX_TRANSLATION) { 315 + if (cc == ERR_NX_AT_FAULT) { 316 316 NXPRT(fprintf(stderr, "page fault: cc= %d, ", cc)); 317 317 NXPRT(fprintf(stderr, "try= %d, fsa= %08llx\n", 318 318 fault_tries,
+1 -1
tools/testing/selftests/powerpc/pmu/ebb/Makefile
··· 7 7 # The EBB handler is 64-bit code and everything links against it 8 8 CFLAGS += -m64 9 9 10 - TMPOUT = $(OUTPUT)/ 10 + TMPOUT = $(OUTPUT)/TMPDIR/ 11 11 # Toolchains may build PIE by default which breaks the assembly 12 12 no-pie-option := $(call try-run, echo 'int main() { return 0; }' | \ 13 13 $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -no-pie -x c - -o "$$TMP", -no-pie)