* [PATCH] Re: [405EX] Bad page map in process ...
@ 2009-09-22 9:29 Weirich, Bernhard
2009-09-22 10:07 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Weirich, Bernhard @ 2009-09-22 9:29 UTC (permalink / raw)
To: linuxppc-dev@lists.ozlabs.org
Hello,
I found the cause of the problem.
My architecture does not define the _PAGE_SPECIAL macro, thus in pte-common=
.h line 32, it is defined as 0
And then in line 180, since _PAGE_SPECIAL is defined, the macro __HAVE_ARCH=
_PTE_SPECIAL is erroneously defined.
This makes any ppc architecture to act as if it has a pte special bit!
I suggest the following simple patch to fix this.
Bernhard WEIRICH
Software Development
Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net>
--- linux/arch/powerpc/include/asm/pte-common.h 2009-09-16 11:23:44.0000000=
00 +0200
+++ linux/arch/powerpc/include/asm/pte-common.h 2009-09-22 11:13:08.0000000=
00 +0200
@@ -176,7 +176,7 @@
#define HAVE_PAGE_AGP
=20
/* Advertise support for _PAGE_SPECIAL */
-#ifdef _PAGE_SPECIAL
+#if _PAGE_SPECIAL !=3D 0
#define __HAVE_ARCH_PTE_SPECIAL
#endif
=20
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Re: [405EX] Bad page map in process ...
2009-09-22 9:29 [PATCH] Re: [405EX] Bad page map in process Weirich, Bernhard
@ 2009-09-22 10:07 ` Benjamin Herrenschmidt
2009-09-22 10:13 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2009-09-22 10:07 UTC (permalink / raw)
To: Weirich, Bernhard; +Cc: linuxppc-dev@lists.ozlabs.org
On Tue, 2009-09-22 at 11:29 +0200, Weirich, Bernhard wrote:
> Hello,
>
> I found the cause of the problem.
> My architecture does not define the _PAGE_SPECIAL macro, thus in pte-common.h line 32, it is defined as 0
> And then in line 180, since _PAGE_SPECIAL is defined, the macro __HAVE_ARCH_PTE_SPECIAL is erroneously defined.
> This makes any ppc architecture to act as if it has a pte special bit!
> I suggest the following simple patch to fix this.
Thank ! That looks indeed like a bug.
Note that with 2.6.32, we should be able to use 0x20 as _PAGE_SPECIAL on
40x which would improve performances in some areas.
Cheers,
Ben.
> Bernhard WEIRICH
> Software Development
>
>
> Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net>
> --- linux/arch/powerpc/include/asm/pte-common.h 2009-09-16 11:23:44.000000000 +0200
> +++ linux/arch/powerpc/include/asm/pte-common.h 2009-09-22 11:13:08.000000000 +0200
> @@ -176,7 +176,7 @@
> #define HAVE_PAGE_AGP
>
> /* Advertise support for _PAGE_SPECIAL */
> -#ifdef _PAGE_SPECIAL
> +#if _PAGE_SPECIAL != 0
> #define __HAVE_ARCH_PTE_SPECIAL
> #endif
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Re: [405EX] Bad page map in process ...
2009-09-22 10:07 ` Benjamin Herrenschmidt
@ 2009-09-22 10:13 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2009-09-22 10:13 UTC (permalink / raw)
To: Weirich, Bernhard; +Cc: linuxppc-dev@lists.ozlabs.org
On Tue, 2009-09-22 at 20:07 +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2009-09-22 at 11:29 +0200, Weirich, Bernhard wrote:
> > Hello,
> >
> > I found the cause of the problem.
> > My architecture does not define the _PAGE_SPECIAL macro, thus in pte-common.h line 32, it is defined as 0
> > And then in line 180, since _PAGE_SPECIAL is defined, the macro __HAVE_ARCH_PTE_SPECIAL is erroneously defined.
> > This makes any ppc architecture to act as if it has a pte special bit!
> > I suggest the following simple patch to fix this.
>
> Thank ! That looks indeed like a bug.
>
> Note that with 2.6.32, we should be able to use 0x20 as _PAGE_SPECIAL on
> 40x which would improve performances in some areas.
I had a quick look at it seems like 2.6.30 also has that bit free. In
fact, 8xx also appears to have a few bits free.
Maybe we should just define _PAGE_SPECIAL for all the "missing"
processor types (I think that's really the only 2 ones) and remove
the condition around #define __HAVE_ARCH_PTE_SPECIAL
Care to send a patch ? :-)
Cheers,
Ben.
> Cheers,
> Ben.
>
> > Bernhard WEIRICH
> > Software Development
> >
> >
> > Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net>
> > --- linux/arch/powerpc/include/asm/pte-common.h 2009-09-16 11:23:44.000000000 +0200
> > +++ linux/arch/powerpc/include/asm/pte-common.h 2009-09-22 11:13:08.000000000 +0200
> > @@ -176,7 +176,7 @@
> > #define HAVE_PAGE_AGP
> >
> > /* Advertise support for _PAGE_SPECIAL */
> > -#ifdef _PAGE_SPECIAL
> > +#if _PAGE_SPECIAL != 0
> > #define __HAVE_ARCH_PTE_SPECIAL
> > #endif
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-22 10:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-22 9:29 [PATCH] Re: [405EX] Bad page map in process Weirich, Bernhard
2009-09-22 10:07 ` Benjamin Herrenschmidt
2009-09-22 10:13 ` Benjamin Herrenschmidt
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).