* [PATCH] powerpc: Fix PowerPC 750CL CPU features
@ 2007-04-12 12:49 Josh Boyer
2007-04-12 13:49 ` Milton Miller
2007-04-12 16:41 ` Segher Boessenkool
0 siblings, 2 replies; 10+ messages in thread
From: Josh Boyer @ 2007-04-12 12:49 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
PowerPC 750CL has high BATs. The patch below sets cpu_features to match that.
Without it, the original firmware mappings in the high BATs aren't cleared
which can cause "odd" address translations to occur.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
arch/powerpc/kernel/cputable.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.orig/arch/powerpc/kernel/cputable.c
+++ linux-2.6/arch/powerpc/kernel/cputable.c
@@ -562,12 +562,12 @@ static struct cpu_spec cpu_specs[] = {
.pvr_mask = 0xfffff0f0,
.pvr_value = 0x00087010,
.cpu_name = "750CL",
- .cpu_features = CPU_FTRS_750,
+ .cpu_features = CPU_FTRS_750GX,
.cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
.icache_bsize = 32,
.dcache_bsize = 32,
.num_pmcs = 4,
- .cpu_setup = __setup_cpu_750cx,
+ .cpu_setup = __setup_cpu_750fx,
.platform = "ppc750",
},
{ /* 745/755 */
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-12 12:49 [PATCH] powerpc: Fix PowerPC 750CL CPU features Josh Boyer
@ 2007-04-12 13:49 ` Milton Miller
2007-04-12 13:53 ` Josh Boyer
2007-04-12 16:41 ` Segher Boessenkool
1 sibling, 1 reply; 10+ messages in thread
From: Milton Miller @ 2007-04-12 13:49 UTC (permalink / raw)
To: Josh Boyer; +Cc: ppcdev, Paul Mackerras
On Thu Apr 12 22:49:06 EST 2007, Josh Boyer wrote:
> PowerPC 750CL has high BATs. The patch below sets cpu_features to
> match that.
> Without it, the original firmware mappings in the high BATs aren't
> cleared
> which can cause "odd" address translations to occur.
Lets say what it does: which continue to override the linux
translations.
milton
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-12 13:49 ` Milton Miller
@ 2007-04-12 13:53 ` Josh Boyer
0 siblings, 0 replies; 10+ messages in thread
From: Josh Boyer @ 2007-04-12 13:53 UTC (permalink / raw)
To: Milton Miller; +Cc: ppcdev, Paul Mackerras
On Thu, 2007-04-12 at 08:49 -0500, Milton Miller wrote:
> On Thu Apr 12 22:49:06 EST 2007, Josh Boyer wrote:
> > PowerPC 750CL has high BATs. The patch below sets cpu_features to
> > match that.
> > Without it, the original firmware mappings in the high BATs aren't
> > cleared
> > which can cause "odd" address translations to occur.
>
> Lets say what it does: which continue to override the linux
> translations.
Sure, that's exactly what it does since without the HIGH_BATS feature
Linux doesn't know about them and therefore can't clear them.
josh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-12 12:49 [PATCH] powerpc: Fix PowerPC 750CL CPU features Josh Boyer
2007-04-12 13:49 ` Milton Miller
@ 2007-04-12 16:41 ` Segher Boessenkool
2007-04-12 17:06 ` Kumar Gala
` (2 more replies)
1 sibling, 3 replies; 10+ messages in thread
From: Segher Boessenkool @ 2007-04-12 16:41 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, paulus
> PowerPC 750CL has high BATs. The patch below sets cpu_features to
> match that.
> Without it, the original firmware mappings in the high BATs aren't
> cleared
> which can cause "odd" address translations to occur.
> - .cpu_features = CPU_FTRS_750,
> + .cpu_features = CPU_FTRS_750GX,
The difference between these two is
#define CPU_FTRS_750GX (CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS)
#define CPU_FTRS_750 (CPU_FTR_COMMON)
750GX excludes COMMON, which seems like a bug. With
your change, 750CL uses DUAL_PLL_750FX; does it actually
have that feature?
Either way, it seems a good idea to create a CPU_FTRS_750CL,
the CL is an evolution of the CX, not the FX/GX (in name
at least, dunno about the gory details).
> - .cpu_setup = __setup_cpu_750cx,
> + .cpu_setup = __setup_cpu_750fx,
Same thing here. Are you sure 750CL doesn't need
the NAP workaround? [Is anyone sure the 750CX
actually needs it -- the comment in cpu_setup_6xx.S
doesn't instill much confidence.]
Segher
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-12 16:41 ` Segher Boessenkool
@ 2007-04-12 17:06 ` Kumar Gala
2007-04-12 17:11 ` Josh Boyer
2007-04-12 17:10 ` Josh Boyer
2007-04-13 2:28 ` Benjamin Herrenschmidt
2 siblings, 1 reply; 10+ messages in thread
From: Kumar Gala @ 2007-04-12 17:06 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, paulus
On Apr 12, 2007, at 11:41 AM, Segher Boessenkool wrote:
>> PowerPC 750CL has high BATs. The patch below sets cpu_features to
>> match that.
>> Without it, the original firmware mappings in the high BATs aren't
>> cleared
>> which can cause "odd" address translations to occur.
>
>> - .cpu_features = CPU_FTRS_750,
>> + .cpu_features = CPU_FTRS_750GX,
>
> The difference between these two is
>
> #define CPU_FTRS_750GX (CPU_FTR_DUAL_PLL_750FX |
> CPU_FTR_HAS_HIGH_BATS)
> #define CPU_FTRS_750 (CPU_FTR_COMMON)
>
> 750GX excludes COMMON, which seems like a bug. With
> your change, 750CL uses DUAL_PLL_750FX; does it actually
> have that feature?
I agree the 750GX should include COMMON, we probably don't notice
since its never in a SMP system.
- k
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-12 16:41 ` Segher Boessenkool
2007-04-12 17:06 ` Kumar Gala
@ 2007-04-12 17:10 ` Josh Boyer
2007-04-12 19:24 ` Segher Boessenkool
2007-04-13 2:28 ` Benjamin Herrenschmidt
2 siblings, 1 reply; 10+ messages in thread
From: Josh Boyer @ 2007-04-12 17:10 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, paulus
On Thu, 2007-04-12 at 18:41 +0200, Segher Boessenkool wrote:
> > PowerPC 750CL has high BATs. The patch below sets cpu_features to
> > match that.
> > Without it, the original firmware mappings in the high BATs aren't
> > cleared
> > which can cause "odd" address translations to occur.
>
> > - .cpu_features = CPU_FTRS_750,
> > + .cpu_features = CPU_FTRS_750GX,
>
> The difference between these two is
>
> #define CPU_FTRS_750GX (CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS)
> #define CPU_FTRS_750 (CPU_FTR_COMMON)
>
> 750GX excludes COMMON, which seems like a bug. With
CPU_FTR_COMMON is actually a nop in this case anyway. It should
probably be listed for "completeness", but it's defined to be 0 so it
doesn't really do anything.
> your change, 750CL uses DUAL_PLL_750FX; does it actually
> have that feature?
No, it doesn't, I missed that in the GX feature list. Good catch.
>
> Either way, it seems a good idea to create a CPU_FTRS_750CL,
> the CL is an evolution of the CX, not the FX/GX (in name
> at least, dunno about the gory details).
I can do that, or I can just do:
CPU_FTRS_750 | CPU_FTR_HAS_HIGH_BATS
>
> > - .cpu_setup = __setup_cpu_750cx,
> > + .cpu_setup = __setup_cpu_750fx,
>
> Same thing here. Are you sure 750CL doesn't need
> the NAP workaround? [Is anyone sure the 750CX
> actually needs it -- the comment in cpu_setup_6xx.S
> doesn't instill much confidence.]
This should be fine.
I'll send out a newer version, and fixup the description with the
comment Milton made.
josh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-12 17:06 ` Kumar Gala
@ 2007-04-12 17:11 ` Josh Boyer
0 siblings, 0 replies; 10+ messages in thread
From: Josh Boyer @ 2007-04-12 17:11 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, paulus
On Thu, 2007-04-12 at 12:06 -0500, Kumar Gala wrote:
> On Apr 12, 2007, at 11:41 AM, Segher Boessenkool wrote:
>
> >> PowerPC 750CL has high BATs. The patch below sets cpu_features to
> >> match that.
> >> Without it, the original firmware mappings in the high BATs aren't
> >> cleared
> >> which can cause "odd" address translations to occur.
> >
> >> - .cpu_features = CPU_FTRS_750,
> >> + .cpu_features = CPU_FTRS_750GX,
> >
> > The difference between these two is
> >
> > #define CPU_FTRS_750GX (CPU_FTR_DUAL_PLL_750FX |
> > CPU_FTR_HAS_HIGH_BATS)
> > #define CPU_FTRS_750 (CPU_FTR_COMMON)
> >
> > 750GX excludes COMMON, which seems like a bug. With
> > your change, 750CL uses DUAL_PLL_750FX; does it actually
> > have that feature?
>
> I agree the 750GX should include COMMON, we probably don't notice
> since its never in a SMP system.
I'll send a separate patch to fix that.
josh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-12 17:10 ` Josh Boyer
@ 2007-04-12 19:24 ` Segher Boessenkool
0 siblings, 0 replies; 10+ messages in thread
From: Segher Boessenkool @ 2007-04-12 19:24 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, paulus
>> The difference between these two is
>>
>> #define CPU_FTRS_750GX (CPU_FTR_DUAL_PLL_750FX |
>> CPU_FTR_HAS_HIGH_BATS)
>> #define CPU_FTRS_750 (CPU_FTR_COMMON)
>>
>> 750GX excludes COMMON, which seems like a bug. With
>
> CPU_FTR_COMMON is actually a nop in this case anyway. It should
> probably be listed for "completeness", but it's defined to be 0 so it
> doesn't really do anything.
Well you *can* have SMP 750 systems. Not that Linux can
handle them but... ;-)
>> Either way, it seems a good idea to create a CPU_FTRS_750CL,
>> the CL is an evolution of the CX, not the FX/GX (in name
>> at least, dunno about the gory details).
>
> I can do that, or I can just do:
>
> CPU_FTRS_750 | CPU_FTR_HAS_HIGH_BATS
Yeah, you can #define CPU_FTRS_750CL that way too.
Most current defines should be like that if you ask me,
it's a whole lot of copy'n'waste right now.
>>> - .cpu_setup = __setup_cpu_750cx,
>>> + .cpu_setup = __setup_cpu_750fx,
>>
>> Same thing here. Are you sure 750CL doesn't need
>> the NAP workaround? [Is anyone sure the 750CX
>> actually needs it -- the comment in cpu_setup_6xx.S
>> doesn't instill much confidence.]
>
> This should be fine.
Okay. The name isn't fine though.
Segher
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-12 16:41 ` Segher Boessenkool
2007-04-12 17:06 ` Kumar Gala
2007-04-12 17:10 ` Josh Boyer
@ 2007-04-13 2:28 ` Benjamin Herrenschmidt
2007-04-13 10:52 ` Josh Boyer
2 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2007-04-13 2:28 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Paul Mackerras
> The difference between these two is
>
> #define CPU_FTRS_750GX (CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS)
> #define CPU_FTRS_750 (CPU_FTR_COMMON)
>
> 750GX excludes COMMON, which seems like a bug. With
> your change, 750CL uses DUAL_PLL_750FX; does it actually
> have that feature?
Looks indeed like that lack of COMMON in the GX entry is a bug...
Josh, care to fix that too while at it ? :-)
> Either way, it seems a good idea to create a CPU_FTRS_750CL,
> the CL is an evolution of the CX, not the FX/GX (in name
> at least, dunno about the gory details).
Agreed.
> > - .cpu_setup = __setup_cpu_750cx,
> > + .cpu_setup = __setup_cpu_750fx,
>
> Same thing here. Are you sure 750CL doesn't need
> the NAP workaround? [Is anyone sure the 750CX
> actually needs it -- the comment in cpu_setup_6xx.S
> doesn't instill much confidence.]
Agreed too.
Ben.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] powerpc: Fix PowerPC 750CL CPU features
2007-04-13 2:28 ` Benjamin Herrenschmidt
@ 2007-04-13 10:52 ` Josh Boyer
0 siblings, 0 replies; 10+ messages in thread
From: Josh Boyer @ 2007-04-13 10:52 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras
On Fri, Apr 13, 2007 at 12:28:30PM +1000, Benjamin Herrenschmidt wrote:
> > The difference between these two is
> >
> > #define CPU_FTRS_750GX (CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS)
> > #define CPU_FTRS_750 (CPU_FTR_COMMON)
> >
> > 750GX excludes COMMON, which seems like a bug. With
> > your change, 750CL uses DUAL_PLL_750FX; does it actually
> > have that feature?
>
> Looks indeed like that lack of COMMON in the GX entry is a bug...
>
> Josh, care to fix that too while at it ? :-)
I did. See patch version 2. :)
josh
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-04-13 10:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12 12:49 [PATCH] powerpc: Fix PowerPC 750CL CPU features Josh Boyer
2007-04-12 13:49 ` Milton Miller
2007-04-12 13:53 ` Josh Boyer
2007-04-12 16:41 ` Segher Boessenkool
2007-04-12 17:06 ` Kumar Gala
2007-04-12 17:11 ` Josh Boyer
2007-04-12 17:10 ` Josh Boyer
2007-04-12 19:24 ` Segher Boessenkool
2007-04-13 2:28 ` Benjamin Herrenschmidt
2007-04-13 10:52 ` Josh Boyer
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).