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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'powerpc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
"Two fixes for nasty kexec/kdump crashes in certain configurations.

A couple of minor fixes for the new TIDR code.

A fix for an oops in a CXL error handling path.

Thanks to: Andrew Donnellan, Christophe Lombard, David Gibson, Mahesh
Salgaonkar, Vaibhav Jain"

* tag 'powerpc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc: Do not assign thread.tidr if already assigned
powerpc: Avoid signed to unsigned conversion in set_thread_tidr()
powerpc/kexec: Fix kexec/kdump in P9 guest kernels
powerpc/powernv: Fix kexec crashes caused by tlbie tracing
cxl: Check if vphb exists before iterating over AFU devices

+33 -8
+2
arch/powerpc/kernel/misc_64.S
··· 623 623 * NOTE, we rely on r0 being 0 from above. 624 624 */ 625 625 mtspr SPRN_IAMR,r0 626 + BEGIN_FTR_SECTION_NESTED(42) 626 627 mtspr SPRN_AMOR,r0 628 + END_FTR_SECTION_NESTED_IFSET(CPU_FTR_HVMODE, 42) 627 629 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) 628 630 629 631 /* save regs for local vars on new stack.
+9 -3
arch/powerpc/kernel/process.c
··· 1569 1569 */ 1570 1570 int set_thread_tidr(struct task_struct *t) 1571 1571 { 1572 + int rc; 1573 + 1572 1574 if (!cpu_has_feature(CPU_FTR_ARCH_300)) 1573 1575 return -EINVAL; 1574 1576 1575 1577 if (t != current) 1576 1578 return -EINVAL; 1577 1579 1578 - t->thread.tidr = assign_thread_tidr(); 1579 - if (t->thread.tidr < 0) 1580 - return t->thread.tidr; 1580 + if (t->thread.tidr) 1581 + return 0; 1581 1582 1583 + rc = assign_thread_tidr(); 1584 + if (rc < 0) 1585 + return rc; 1586 + 1587 + t->thread.tidr = rc; 1582 1588 mtspr(SPRN_TIDR, t->thread.tidr); 1583 1589 1584 1590 return 0;
+12 -3
arch/powerpc/mm/hash_native_64.c
··· 47 47 48 48 DEFINE_RAW_SPINLOCK(native_tlbie_lock); 49 49 50 - static inline void __tlbie(unsigned long vpn, int psize, int apsize, int ssize) 50 + static inline unsigned long ___tlbie(unsigned long vpn, int psize, 51 + int apsize, int ssize) 51 52 { 52 53 unsigned long va; 53 54 unsigned int penc; ··· 101 100 : "memory"); 102 101 break; 103 102 } 104 - trace_tlbie(0, 0, va, 0, 0, 0, 0); 103 + return va; 104 + } 105 + 106 + static inline void __tlbie(unsigned long vpn, int psize, int apsize, int ssize) 107 + { 108 + unsigned long rb; 109 + 110 + rb = ___tlbie(vpn, psize, apsize, ssize); 111 + trace_tlbie(0, 0, rb, 0, 0, 0, 0); 105 112 } 106 113 107 114 static inline void __tlbiel(unsigned long vpn, int psize, int apsize, int ssize) ··· 661 652 if (hpte_v & HPTE_V_VALID) { 662 653 hpte_decode(hptep, slot, &psize, &apsize, &ssize, &vpn); 663 654 hptep->v = 0; 664 - __tlbie(vpn, psize, apsize, ssize); 655 + ___tlbie(vpn, psize, apsize, ssize); 665 656 } 666 657 } 667 658
+10 -2
drivers/misc/cxl/pci.c
··· 2083 2083 /* There should only be one entry, but go through the list 2084 2084 * anyway 2085 2085 */ 2086 + if (afu->phb == NULL) 2087 + return result; 2088 + 2086 2089 list_for_each_entry(afu_dev, &afu->phb->bus->devices, bus_list) { 2087 2090 if (!afu_dev->driver) 2088 2091 continue; ··· 2127 2124 * Tell the AFU drivers; but we don't care what they 2128 2125 * say, we're going away. 2129 2126 */ 2130 - if (afu->phb != NULL) 2131 - cxl_vphb_error_detected(afu, state); 2127 + cxl_vphb_error_detected(afu, state); 2132 2128 } 2133 2129 return PCI_ERS_RESULT_DISCONNECT; 2134 2130 } ··· 2267 2265 if (cxl_afu_select_best_mode(afu)) 2268 2266 goto err; 2269 2267 2268 + if (afu->phb == NULL) 2269 + continue; 2270 + 2270 2271 list_for_each_entry(afu_dev, &afu->phb->bus->devices, bus_list) { 2271 2272 /* Reset the device context. 2272 2273 * TODO: make this less disruptive ··· 2331 2326 */ 2332 2327 for (i = 0; i < adapter->slices; i++) { 2333 2328 afu = adapter->afu[i]; 2329 + 2330 + if (afu->phb == NULL) 2331 + continue; 2334 2332 2335 2333 list_for_each_entry(afu_dev, &afu->phb->bus->devices, bus_list) { 2336 2334 if (afu_dev->driver && afu_dev->driver->err_handler &&