Merge tag 'powerpc-6.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

- Fix softlockup/crash when using hcall tracing

- Fix pte_access_permitted() for PAGE_NONE on 8xx

- Fix inverted pte_young() test in __ptep_test_and_clear_young()
on 64-bit BookE

- Fix unhandled math emulation exception on 85xx

- Fix kernel crash on syscall return on 476

Thanks to Athira Rajeev, Christophe Leroy, Eddie James, and Naveen N
Rao.

* tag 'powerpc-6.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/47x: Fix 47x syscall return crash
powerpc/85xx: Fix math emulation exception
powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()
powerpc/8xx: Fix pte_access_permitted() for PAGE_NONE
powerpc/pseries: Remove unused r0 in the hcall tracing code
powerpc/pseries: Fix STK_PARAM access in the hcall tracing code

Changed files
+17 -12
arch
powerpc
include
asm
kernel
platforms
pseries
+7
arch/powerpc/include/asm/nohash/32/pte-8xx.h
··· 94 94 95 95 #define pte_wrprotect pte_wrprotect 96 96 97 + static inline int pte_read(pte_t pte) 98 + { 99 + return (pte_val(pte) & _PAGE_RO) != _PAGE_NA; 100 + } 101 + 102 + #define pte_read pte_read 103 + 97 104 static inline int pte_write(pte_t pte) 98 105 { 99 106 return !(pte_val(pte) & _PAGE_RO);
+1 -1
arch/powerpc/include/asm/nohash/64/pgtable.h
··· 197 197 { 198 198 unsigned long old; 199 199 200 - if (pte_young(*ptep)) 200 + if (!pte_young(*ptep)) 201 201 return 0; 202 202 old = pte_update(mm, addr, ptep, _PAGE_ACCESSED, 0, 0); 203 203 return (old & _PAGE_ACCESSED) != 0;
+2
arch/powerpc/include/asm/nohash/pgtable.h
··· 25 25 return pte_val(pte) & _PAGE_RW; 26 26 } 27 27 #endif 28 + #ifndef pte_read 28 29 static inline int pte_read(pte_t pte) { return 1; } 30 + #endif 29 31 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } 30 32 static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; } 31 33 static inline int pte_none(pte_t pte) { return (pte_val(pte) & ~_PTE_NONE_MASK) == 0; }
+5 -3
arch/powerpc/kernel/entry_32.S
··· 137 137 lis r4,icache_44x_need_flush@ha 138 138 lwz r5,icache_44x_need_flush@l(r4) 139 139 cmplwi cr0,r5,0 140 - bne- 2f 140 + bne- .L44x_icache_flush 141 141 #endif /* CONFIG_PPC_47x */ 142 + .L44x_icache_flush_return: 142 143 kuep_unlock 143 144 lwz r4,_LINK(r1) 144 145 lwz r5,_CCR(r1) ··· 173 172 b 1b 174 173 175 174 #ifdef CONFIG_44x 176 - 2: li r7,0 175 + .L44x_icache_flush: 176 + li r7,0 177 177 iccci r0,r0 178 178 stw r7,icache_44x_need_flush@l(r4) 179 - b 1b 179 + b .L44x_icache_flush_return 180 180 #endif /* CONFIG_44x */ 181 181 182 182 .globl ret_from_fork
+1 -1
arch/powerpc/kernel/head_85xx.S
··· 395 395 #ifdef CONFIG_PPC_FPU 396 396 FP_UNAVAILABLE_EXCEPTION 397 397 #else 398 - EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, unknown_exception) 398 + EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, emulation_assist_interrupt) 399 399 #endif 400 400 401 401 /* System Call Interrupt */
+1 -7
arch/powerpc/platforms/pseries/hvCall.S
··· 184 184 plpar_hcall_trace: 185 185 HCALL_INST_PRECALL(R5) 186 186 187 - std r4,STK_PARAM(R4)(r1) 188 - mr r0,r4 189 - 190 187 mr r4,r5 191 188 mr r5,r6 192 189 mr r6,r7 ··· 193 196 194 197 HVSC 195 198 196 - ld r12,STK_PARAM(R4)(r1) 199 + ld r12,STACK_FRAME_MIN_SIZE+STK_PARAM(R4)(r1) 197 200 std r4,0(r12) 198 201 std r5,8(r12) 199 202 std r6,16(r12) ··· 292 295 #ifdef CONFIG_TRACEPOINTS 293 296 plpar_hcall9_trace: 294 297 HCALL_INST_PRECALL(R5) 295 - 296 - std r4,STK_PARAM(R4)(r1) 297 - mr r0,r4 298 298 299 299 mr r4,r5 300 300 mr r5,r6