powerpc/8xx: Manage _PAGE_ACCESSED through APG bits in L1 entry
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 12 Oct 2020 08:54:33 +0000 (08:54 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 5 Nov 2020 12:34:25 +0000 (23:34 +1100)
commit33fe43cfd9b1c20f6f9899b44bf04e91823ff1c9
tree7b59cf264092897fcef311841c33540604407040
parent29daf869cbab69088fe1755d9dd224e99ba78b56
powerpc/8xx: Manage _PAGE_ACCESSED through APG bits in L1 entry

When _PAGE_ACCESSED is not set, a minor fault is expected.
To do this, TLB miss exception ANDs _PAGE_PRESENT and _PAGE_ACCESSED
into the L2 entry valid bit.

To simplify the processing and reduce the number of instructions in
TLB miss exceptions, manage it as an APG bit and get it next to
_PAGE_GUARDED bit to allow a copy in one go. Then declare the
corresponding groups as handling all accesses as user accesses.
As the PP bits always define user as No Access, it will generate
a fault.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/80f488db230c6b0e7b3b990d72bd94a8a069e93e.1602492856.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/nohash/32/kup-8xx.h
arch/powerpc/include/asm/nohash/32/mmu-8xx.h
arch/powerpc/include/asm/nohash/32/pte-8xx.h
arch/powerpc/kernel/head_8xx.S