The placeholder for instruction selection should use the second argument's operand, which is %1, not %0. This could generate incorrect assembly code if the instruction selection for argument %0 ever differs from argument %1.
Fixes: 9bf2b5cdc5fe ("powerpc: Fixes for CONFIG_PTE_64BIT for SMP support") Signed-off-by: Mathieu Desnoyers mathieu.desnoyers@efficios.com Cc: Christophe Leroy christophe.leroy@csgroup.eu Cc: Kumar Gala galak@kernel.crashing.org Cc: Michael Ellerman mpe@ellerman.id.au Cc: Benjamin Herrenschmidt benh@kernel.crashing.org Cc: Paul Mackerras paulus@samba.org Cc: linuxppc-dev@lists.ozlabs.org Cc: stable@vger.kernel.org # v2.6.28+ --- arch/powerpc/include/asm/book3s/32/pgtable.h | 2 +- arch/powerpc/include/asm/nohash/pgtable.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h index 224912432821..f1467b3c417a 100644 --- a/arch/powerpc/include/asm/book3s/32/pgtable.h +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h @@ -529,7 +529,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, __asm__ __volatile__("\ stw%U0%X0 %2,%0\n\ eieio\n\ - stw%U0%X0 %L2,%1" + stw%U1%X1 %L2,%1" : "=m" (*ptep), "=m" (*((unsigned char *)ptep+4)) : "r" (pte) : "memory");
diff --git a/arch/powerpc/include/asm/nohash/pgtable.h b/arch/powerpc/include/asm/nohash/pgtable.h index 4b7c3472eab1..a00e4c1746d6 100644 --- a/arch/powerpc/include/asm/nohash/pgtable.h +++ b/arch/powerpc/include/asm/nohash/pgtable.h @@ -199,7 +199,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, __asm__ __volatile__("\ stw%U0%X0 %2,%0\n\ eieio\n\ - stw%U0%X0 %L2,%1" + stw%U1%X1 %L2,%1" : "=m" (*ptep), "=m" (*((unsigned char *)ptep+4)) : "r" (pte) : "memory"); return;
Hi
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag fixing commit: 9bf2b5cdc5fe ("powerpc: Fixes for CONFIG_PTE_64BIT for SMP support").
The bot has tested the following trees: v5.7.8, v5.4.51, v4.19.132, v4.14.188, v4.9.230, v4.4.230.
v5.7.8: Build OK! v5.4.51: Build OK! v4.19.132: Build OK! v4.14.188: Failed to apply! Possible dependencies: 45201c8794693 ("powerpc/nohash: Remove hash related code from nohash headers.") 4e003747043d5 ("powerpc/64s: Replace CONFIG_PPC_STD_MMU_64 with CONFIG_PPC_BOOK3S_64") d5808ffaec817 ("powerpc/nohash: Use IS_ENABLED() to simplify __set_pte_at()")
v4.9.230: Failed to apply! Possible dependencies: 45201c8794693 ("powerpc/nohash: Remove hash related code from nohash headers.") 4546561551106 ("powerpc/asm: Use OFFSET macro in asm-offsets.c") 4e003747043d5 ("powerpc/64s: Replace CONFIG_PPC_STD_MMU_64 with CONFIG_PPC_BOOK3S_64") 5d451a87e5ebb ("powerpc/64: Retrieve number of L1 cache sets from device-tree") 7c5b06cadf274 ("KVM: PPC: Book3S HV: Adapt TLB invalidations to work on POWER9") 83677f551e0a6 ("KVM: PPC: Book3S HV: Adjust host/guest context switch for POWER9") 902e06eb86cd6 ("powerpc/32: Change the stack protector canary value per task") a3d96f70c1477 ("powerpc/64s: Fix system reset vs general interrupt reentrancy") bd067f83b0840 ("powerpc/64: Fix naming of cache block vs. cache line") d5808ffaec817 ("powerpc/nohash: Use IS_ENABLED() to simplify __set_pte_at()") e2827fe5c1566 ("powerpc/64: Clean up ppc64_caches using a struct per cache") e9cf1e085647b ("KVM: PPC: Book3S HV: Add new POWER9 guest-accessible SPRs") f4c51f841d2ac ("KVM: PPC: Book3S HV: Modify guest entry/exit paths to handle radix guests")
v4.4.230: Failed to apply! Possible dependencies: 1ca7212932862 ("powerpc/mm: Move PTE bits from generic functions to hash64 functions.") 26b6a3d9bb48f ("powerpc/mm: move pte headers to book3s directory") 371352ca0e7f3 ("powerpc/mm: Move hash64 PTE bits from book3s/64/pgtable.h to hash.h") 3dfcb315d81e6 ("powerpc/mm: make a separate copy for book3s") ab537dca2f330 ("powerpc/mm: Move hash specific pte width and other defines to book3s") b0412ea94bcbd ("powerpc/mm: Drop pte-common.h from BOOK3S 64") cbbb8683fb632 ("powerpc/mm: Delete booke bits from book3s")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
linux-stable-mirror@lists.linaro.org