* [PATCH] powerpc: Fix _PAGE_CHG_MASK
@ 2009-02-12 22:18 Philippe Gerum
2009-02-13 2:49 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2009-02-12 22:18 UTC (permalink / raw)
To: linuxppc-dev
Fix _PAGE_CHG_MASK so that pte_modify() does not affect the _PAGE_SPECIAL bit.
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
--
arch/powerpc/include/asm/pgtable-4k.h | 2 +-
arch/powerpc/include/asm/pgtable-64k.h | 2 +-
arch/powerpc/include/asm/pgtable-ppc32.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include/asm/pgtable-4k.h b/arch/powerpc/include/asm/pgtable-4k.h
index 6b18ba9..1dbca4e 100644
--- a/arch/powerpc/include/asm/pgtable-4k.h
+++ b/arch/powerpc/include/asm/pgtable-4k.h
@@ -60,7 +60,7 @@
/* It should be preserving the high 48 bits and then specifically */
/* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
- _PAGE_HPTEFLAGS)
+ _PAGE_HPTEFLAGS | _PAGE_SPECIAL)
/* Bits to mask out from a PMD to get to the PTE page */
#define PMD_MASKED_BITS 0
diff --git a/arch/powerpc/include/asm/pgtable-64k.h b/arch/powerpc/include/asm/pgtable-64k.h
index 07b0d8f..7389003 100644
--- a/arch/powerpc/include/asm/pgtable-64k.h
+++ b/arch/powerpc/include/asm/pgtable-64k.h
@@ -114,7 +114,7 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
* pgprot changes
*/
#define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
- _PAGE_ACCESSED)
+ _PAGE_ACCESSED | _PAGE_SPECIAL)
/* Bits to mask out from a PMD to get to the PTE page */
#define PMD_MASKED_BITS 0x1ff
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h
index 75dded6..8298afc 100644
--- a/arch/powerpc/include/asm/pgtable-ppc32.h
+++ b/arch/powerpc/include/asm/pgtable-ppc32.h
@@ -428,8 +428,8 @@ extern int icache_44x_need_flush;
#define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
#endif
-#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_SPECIAL)
-
+#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
+ _PAGE_SPECIAL)
#define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
_PAGE_WRITETHRU | _PAGE_ENDIAN | \
--
Philippe.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Fix _PAGE_CHG_MASK
2009-02-12 22:18 [PATCH] powerpc: Fix _PAGE_CHG_MASK Philippe Gerum
@ 2009-02-13 2:49 ` Benjamin Herrenschmidt
2009-02-13 5:46 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-13 2:49 UTC (permalink / raw)
To: rpm; +Cc: linuxppc-dev
On Thu, 2009-02-12 at 23:18 +0100, Philippe Gerum wrote:
> Fix _PAGE_CHG_MASK so that pte_modify() does not affect the _PAGE_SPECIAL bit.
>
> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Good catch ! Thanks !
Ben.
> --
>
> arch/powerpc/include/asm/pgtable-4k.h | 2 +-
> arch/powerpc/include/asm/pgtable-64k.h | 2 +-
> arch/powerpc/include/asm/pgtable-ppc32.h | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/pgtable-4k.h b/arch/powerpc/include/asm/pgtable-4k.h
> index 6b18ba9..1dbca4e 100644
> --- a/arch/powerpc/include/asm/pgtable-4k.h
> +++ b/arch/powerpc/include/asm/pgtable-4k.h
> @@ -60,7 +60,7 @@
> /* It should be preserving the high 48 bits and then specifically */
> /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */
> #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
> - _PAGE_HPTEFLAGS)
> + _PAGE_HPTEFLAGS | _PAGE_SPECIAL)
>
> /* Bits to mask out from a PMD to get to the PTE page */
> #define PMD_MASKED_BITS 0
> diff --git a/arch/powerpc/include/asm/pgtable-64k.h b/arch/powerpc/include/asm/pgtable-64k.h
> index 07b0d8f..7389003 100644
> --- a/arch/powerpc/include/asm/pgtable-64k.h
> +++ b/arch/powerpc/include/asm/pgtable-64k.h
> @@ -114,7 +114,7 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
> * pgprot changes
> */
> #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
> - _PAGE_ACCESSED)
> + _PAGE_ACCESSED | _PAGE_SPECIAL)
>
> /* Bits to mask out from a PMD to get to the PTE page */
> #define PMD_MASKED_BITS 0x1ff
> diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h
> index 75dded6..8298afc 100644
> --- a/arch/powerpc/include/asm/pgtable-ppc32.h
> +++ b/arch/powerpc/include/asm/pgtable-ppc32.h
> @@ -428,8 +428,8 @@ extern int icache_44x_need_flush;
> #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
> #endif
>
> -#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_SPECIAL)
> -
> +#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
> + _PAGE_SPECIAL)
>
> #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
> _PAGE_WRITETHRU | _PAGE_ENDIAN | \
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Fix _PAGE_CHG_MASK
2009-02-13 2:49 ` Benjamin Herrenschmidt
@ 2009-02-13 5:46 ` Benjamin Herrenschmidt
2009-02-13 10:01 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-13 5:46 UTC (permalink / raw)
To: rpm; +Cc: linuxppc-dev
On Fri, 2009-02-13 at 13:49 +1100, Benjamin Herrenschmidt wrote:
> > diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h
> > index 75dded6..8298afc 100644
> > --- a/arch/powerpc/include/asm/pgtable-ppc32.h
> > +++ b/arch/powerpc/include/asm/pgtable-ppc32.h
> > @@ -428,8 +428,8 @@ extern int icache_44x_need_flush;
> > #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
> > #endif
> >
> > -#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_SPECIAL)
> > -
> > +#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
> > + _PAGE_SPECIAL)
> >
> > #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
> > _PAGE_WRITETHRU | _PAGE_ENDIAN | \
> >
BTW. That part of the patch looks bad (ie, the original line isn't what
is upstream). I've fixed up locally.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Fix _PAGE_CHG_MASK
2009-02-13 5:46 ` Benjamin Herrenschmidt
@ 2009-02-13 10:01 ` Philippe Gerum
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2009-02-13 10:01 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
Benjamin Herrenschmidt wrote:
> On Fri, 2009-02-13 at 13:49 +1100, Benjamin Herrenschmidt wrote:
>
>>> diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h
>>> index 75dded6..8298afc 100644
>>> --- a/arch/powerpc/include/asm/pgtable-ppc32.h
>>> +++ b/arch/powerpc/include/asm/pgtable-ppc32.h
>>> @@ -428,8 +428,8 @@ extern int icache_44x_need_flush;
>>> #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
>>> #endif
>>>
>>> -#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_SPECIAL)
>>> -
>>> +#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \
>>> + _PAGE_SPECIAL)
>>>
>>> #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
>>> _PAGE_WRITETHRU | _PAGE_ENDIAN | \
>>>
>
> BTW. That part of the patch looks bad (ie, the original line isn't what
> is upstream). I've fixed up locally.
>
Sorry for this. I forgot to rebase my patch on mainline.
> Cheers,
> Ben.
>
>
>
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-13 10:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12 22:18 [PATCH] powerpc: Fix _PAGE_CHG_MASK Philippe Gerum
2009-02-13 2:49 ` Benjamin Herrenschmidt
2009-02-13 5:46 ` Benjamin Herrenschmidt
2009-02-13 10:01 ` Philippe Gerum
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).