powerpc/8xx: Reverse order entries are written by __set_pte_at()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 28 Sep 2022 06:29:22 +0000 (08:29 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2022 12:31:48 +0000 (23:31 +1100)
commit0b4721815c5328e08c3acdee4a53890e012d830b
treeaf635473cf28efb9e983358ac3f95941b3f90b2a
parentf2c45962cc618c12f69fd46e6ebc20b9cd7f15ac
powerpc/8xx: Reverse order entries are written by __set_pte_at()

At the time being, with 16k pages __set_pte_at() writes table entries
in reverse order:

 294: 91 49 00 0c  stw     r10,12(r9)
 298: 91 49 00 08  stw     r10,8(r9)
 29c: 91 49 00 04  stw     r10,4(r9)
 2a0: 91 49 00 00  stw     r10,0(r9)

Allthough there should be no impact at all as it stays in a single
cacheline, reverse the writing in a more natural order.

 288: 91 49 00 0c  stw     r10,0(r9)
 28c: 91 49 00 08  stw     r10,4(r9)
 290: 91 49 00 04  stw     r10,8(r9)
 294: 91 49 00 00  stw     r10,12(r9)

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/67c3b5d44edfec054234ea9b4d05fc4b4f7f8a0e.1664346554.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/nohash/pgtable.h