powerpc/mm: Introduce _PAGE_NA

Today, PAGE_NONE is defined as a page not having _PAGE_USER.
In some circunstances, when the CPU supports it, it might be
better to be able to flag a page with NO ACCESS.

In a following patch, the 8xx will switch user access being flagged
in the PMD, therefore it will not be possible anymore to use
_PAGE_USER as a way to flag a page with no access.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Christophe Leroy
2018-01-12 13:45:29 +01:00
committed by Michael Ellerman
parent 812fadcb94
commit 351750331f
4 changed files with 18 additions and 10 deletions

View File

@@ -117,16 +117,20 @@ static const struct flag_info flag_array[] = {
.set = "user",
.clear = " ",
}, {
#if _PAGE_RO == 0
.mask = _PAGE_RW,
.mask = _PAGE_RW | _PAGE_RO | _PAGE_NA,
.val = _PAGE_RW,
#else
.mask = _PAGE_RO,
.val = 0,
#endif
.set = "rw",
.clear = "ro",
}, {
.mask = _PAGE_RW | _PAGE_RO | _PAGE_NA,
.val = _PAGE_RO,
.set = "ro",
}, {
#if _PAGE_NA != 0
.mask = _PAGE_RW | _PAGE_RO | _PAGE_NA,
.val = _PAGE_RO,
.set = "na",
}, {
#endif
.mask = _PAGE_EXEC,
.val = _PAGE_EXEC,
.set = " X ",