powerpc/e500: Introduce _PAGE_READ and remove _PAGE_USER
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 25 Sep 2023 18:31:44 +0000 (20:31 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Oct 2023 06:12:46 +0000 (17:12 +1100)
commit48cf93bb168d506a8278a6fb25c2f88c1c93ce6e
tree5243af9b8254b0bccfdd9a5a6d64d4c3a332c0ed
parent8e9bd41e4ce1001f5b89e4c9a69f870f39d56c12
powerpc/e500: Introduce _PAGE_READ and remove _PAGE_USER

e500 MMU has 6 page protection bits:
- R, W, X for supervisor
- R, W, X for user

It means that it can support X without R.

To do that, _PAGE_READ flag is needed.

With 32 bits PTE there is no bit available for it in PTE. On the
other hand the only real use of _PAGE_USER is to implement PAGE_NONE
by clearing _PAGE_USER. As _PAGE_NONE can also be implemented by
clearing _PAGE_READ, remove _PAGE_USER and add _PAGE_READ. Move
_PAGE_PRESENT into bit 30 so that _PAGE_READ can match SR bit.

With 64 bits PTE _PAGE_USER is already the combination of SR and UR
so all we need to do is to rename it _PAGE_READ.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/0849ab6bf7ae2af23f94b0457fa40d0ea3983fe4.1695659959.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/nohash/32/pte-85xx.h
arch/powerpc/include/asm/nohash/pte-e500.h
arch/powerpc/kernel/head_85xx.S