linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/book3s64: fix dump_linuxpagetables "present" flag
@ 2018-10-15  6:37 Christophe Leroy
  2018-10-15 12:55 ` Aneesh Kumar K.V
  2018-10-22  9:38 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe Leroy @ 2018-10-15  6:37 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linux-kernel, linuxppc-dev

Since commit bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to
mark pte temporarily invalid."), _PAGE_PRESENT doesn't mean exactly
that a page is present. A page is also considered preset when
_PAGE_INVALID is set.

This patch changes the meaning of "present" and adds a status "valid"
associated to the _PAGE_PRESENT flag.

Fixes: bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/mm/dump_linuxpagetables-book3s64.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/mm/dump_linuxpagetables-book3s64.c b/arch/powerpc/mm/dump_linuxpagetables-book3s64.c
index a637e612b205..ed6fcf78256e 100644
--- a/arch/powerpc/mm/dump_linuxpagetables-book3s64.c
+++ b/arch/powerpc/mm/dump_linuxpagetables-book3s64.c
@@ -38,8 +38,13 @@ static const struct flag_info flag_array[] = {
 	}, {
 		.mask	= _PAGE_PRESENT,
 		.val	= _PAGE_PRESENT,
-		.set	= "present",
-		.clear	= "       ",
+		.set	= "valid",
+		.clear	= "     ",
+	}, {
+		.mask	= _PAGE_PRESENT | _PAGE_INVALID,
+		.val	= 0,
+		.set	= "       ",
+		.clear	= "present",
 	}, {
 		.mask	= H_PAGE_HASHPTE,
 		.val	= H_PAGE_HASHPTE,
-- 
2.13.3


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

* Re: [PATCH] powerpc/book3s64: fix dump_linuxpagetables "present" flag
  2018-10-15  6:37 [PATCH] powerpc/book3s64: fix dump_linuxpagetables "present" flag Christophe Leroy
@ 2018-10-15 12:55 ` Aneesh Kumar K.V
  2018-10-22  9:38 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Aneesh Kumar K.V @ 2018-10-15 12:55 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman
  Cc: linux-kernel, linuxppc-dev

On 10/15/18 12:07 PM, Christophe Leroy wrote:
> Since commit bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to
> mark pte temporarily invalid."), _PAGE_PRESENT doesn't mean exactly
> that a page is present. A page is also considered preset when
> _PAGE_INVALID is set.
> 
> This patch changes the meaning of "present" and adds a status "valid"
> associated to the _PAGE_PRESENT flag.
> 

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

> Fixes: bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.")
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
>   arch/powerpc/mm/dump_linuxpagetables-book3s64.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/mm/dump_linuxpagetables-book3s64.c b/arch/powerpc/mm/dump_linuxpagetables-book3s64.c
> index a637e612b205..ed6fcf78256e 100644
> --- a/arch/powerpc/mm/dump_linuxpagetables-book3s64.c
> +++ b/arch/powerpc/mm/dump_linuxpagetables-book3s64.c
> @@ -38,8 +38,13 @@ static const struct flag_info flag_array[] = {
>   	}, {
>   		.mask	= _PAGE_PRESENT,
>   		.val	= _PAGE_PRESENT,
> -		.set	= "present",
> -		.clear	= "       ",
> +		.set	= "valid",
> +		.clear	= "     ",
> +	}, {
> +		.mask	= _PAGE_PRESENT | _PAGE_INVALID,
> +		.val	= 0,
> +		.set	= "       ",
> +		.clear	= "present",
>   	}, {
>   		.mask	= H_PAGE_HASHPTE,
>   		.val	= H_PAGE_HASHPTE,
> 


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

* Re: powerpc/book3s64: fix dump_linuxpagetables "present" flag
  2018-10-15  6:37 [PATCH] powerpc/book3s64: fix dump_linuxpagetables "present" flag Christophe Leroy
  2018-10-15 12:55 ` Aneesh Kumar K.V
@ 2018-10-22  9:38 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2018-10-22  9:38 UTC (permalink / raw)
  To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

On Mon, 2018-10-15 at 06:37:41 UTC, Christophe Leroy wrote:
> Since commit bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to
> mark pte temporarily invalid."), _PAGE_PRESENT doesn't mean exactly
> that a page is present. A page is also considered preset when
> _PAGE_INVALID is set.
> 
> This patch changes the meaning of "present" and adds a status "valid"
> associated to the _PAGE_PRESENT flag.
> 
> Fixes: bd0dbb73e013 ("powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.")
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/3ff38e1874863827374b02b4f31c73

cheers

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

end of thread, other threads:[~2018-10-22  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15  6:37 [PATCH] powerpc/book3s64: fix dump_linuxpagetables "present" flag Christophe Leroy
2018-10-15 12:55 ` Aneesh Kumar K.V
2018-10-22  9:38 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).