OSDN Git Service

powerpc/32s: reorder Linux PTE bits to better match Hash PTE bits.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 10 Mar 2020 17:29:12 +0000 (17:29 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Mar 2020 01:09:27 +0000 (12:09 +1100)
commit697ece78f8f749aeea40f2711389901f0974017a
tree9fa49406f4fab3d95af9d8376f9c0fe63753fc0a
parentaf92bad615be75c6c0d1b1c5b48178360250a187
powerpc/32s: reorder Linux PTE bits to better match Hash PTE bits.

Reorder Linux PTE bits to (almost) match Hash PTE bits.

RW Kernel : PP = 00
RO Kernel : PP = 00
RW User   : PP = 01
RO User   : PP = 11

So naturally, we should have
_PAGE_USER = 0x001
_PAGE_RW   = 0x002

Today 0x001 and 0x002 and _PAGE_PRESENT and _PAGE_HASHPTE which
both are software only bits.

Switch _PAGE_USER and _PAGE_PRESET
Switch _PAGE_RW and _PAGE_HASHPTE

This allows to remove a few insns.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/c4d6c18a7f8d9d3b899bc492f55fbc40ef38896a.1583861325.git.christophe.leroy@c-s.fr
arch/powerpc/include/asm/book3s/32/hash.h
arch/powerpc/kernel/head_32.S
arch/powerpc/mm/book3s32/hash_low.S