All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/mm: Fix missing page attributes in page table dump
@ 2017-04-14  5:45 Christophe Leroy
  2017-04-27 10:30 ` [v2] " Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2017-04-14  5:45 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Scott Wood, Rashmica Gupta
  Cc: linux-kernel, linuxppc-dev

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>
---
 v2: Unlike the 3 other pgtable.h, arch/powerpc/include/asm/book3s/64/pgtable.h
 doesn't include pte-common.h . Therefore, _PAGE_SHARED has to be defined
 explicitly there, just like _PAGE_RO is. (build issue reported by kbuild robot)

 arch/powerpc/include/asm/book3s/64/pgtable.h | 1 +
 arch/powerpc/mm/dump_linuxpagetables.c       | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index fb72ff6b98e6..fc9dc57a787b 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -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 */
diff --git a/arch/powerpc/mm/dump_linuxpagetables.c b/arch/powerpc/mm/dump_linuxpagetables.c
index 05109d7fa027..22d2433333f5 100644
--- a/arch/powerpc/mm/dump_linuxpagetables.c
+++ b/arch/powerpc/mm/dump_linuxpagetables.c
@@ -119,8 +119,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",
 	}, {
@@ -207,6 +212,10 @@ static const struct flag_info flag_array[] = {
 		.mask	= _PAGE_SPECIAL,
 		.val	= _PAGE_SPECIAL,
 		.set	= "special",
+	}, {
+		.mask	= _PAGE_SHARED,
+		.val	= _PAGE_SHARED,
+		.set	= "shared",
 	}
 };
 
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [v2] powerpc/mm: Fix missing page attributes in page table dump
  2017-04-14  5:45 [PATCH v2] powerpc/mm: Fix missing page attributes in page table dump Christophe Leroy
@ 2017-04-27 10:30 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-04-27 10:30 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
	Scott Wood, Rashmica Gupta
  Cc: linuxppc-dev, linux-kernel

On Fri, 2017-04-14 at 05:45:16 UTC, Christophe Leroy wrote:
> 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>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/c99317953323d6251245022cb3af54

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-27 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14  5:45 [PATCH v2] powerpc/mm: Fix missing page attributes in page table dump Christophe Leroy
2017-04-27 10:30 ` [v2] " Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.