]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
powerpc/mm: Fix missing page attributes in page table dump
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 14 Apr 2017 05:45:16 +0000 (07:45 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 27 Apr 2017 12:20:27 +0000 (22:20 +1000)
On some targets, _PAGE_RW is 0 and this is _PAGE_RO which is used.
There is also _PAGE_SHARED that is missing.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/powerpc/mm/dump_linuxpagetables.c

index fb8380a2d8d551d60a7974a9340065cc65033b19..85bc9875c3be5f66c1a7339e769413ac7e870391 100644 (file)
@@ -13,6 +13,7 @@
 #define _PAGE_BIT_SWAP_TYPE    0
 
 #define _PAGE_RO               0
+#define _PAGE_SHARED           0
 
 #define _PAGE_EXEC             0x00001 /* execute permission */
 #define _PAGE_WRITE            0x00002 /* write access allowed */
index bb136ac6ac55398a992cf5330ec03280c3b0ba12..ec490699472695bfaa01144fc49d19c607448a91 100644 (file)
@@ -121,8 +121,13 @@ static const struct flag_info flag_array[] = {
                .set    = "user",
                .clear  = "    ",
        }, {
+#if _PAGE_RO == 0
                .mask   = _PAGE_RW,
                .val    = _PAGE_RW,
+#else
+               .mask   = _PAGE_RO,
+               .val    = 0,
+#endif
                .set    = "rw",
                .clear  = "ro",
        }, {
@@ -222,6 +227,10 @@ static const struct flag_info flag_array[] = {
                .mask   = _PAGE_SPECIAL,
                .val    = _PAGE_SPECIAL,
                .set    = "special",
+       }, {
+               .mask   = _PAGE_SHARED,
+               .val    = _PAGE_SHARED,
+               .set    = "shared",
        }
 };