summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/dump_linuxpagetables.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2018-01-12 13:45:29 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-16 13:47:14 +0100
commit351750331fc1580cdb60d2efef04238f5faa89fe (patch)
treefab5ee5e236ff91fd63640f27f142bee3b691cbb /arch/powerpc/mm/dump_linuxpagetables.c
parentpowerpc/mm: extend _PAGE_PRIVILEGED to all CPUs (diff)
downloadlinux-351750331fc1580cdb60d2efef04238f5faa89fe.tar.xz
linux-351750331fc1580cdb60d2efef04238f5faa89fe.zip
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>
Diffstat (limited to 'arch/powerpc/mm/dump_linuxpagetables.c')
-rw-r--r--arch/powerpc/mm/dump_linuxpagetables.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/powerpc/mm/dump_linuxpagetables.c b/arch/powerpc/mm/dump_linuxpagetables.c
index d87ab2cabaa6..876e2a3c79f2 100644
--- a/arch/powerpc/mm/dump_linuxpagetables.c
+++ b/arch/powerpc/mm/dump_linuxpagetables.c
@@ -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 ",