* [patch] powerpc: remove do-nothing cpu setup routines
@ 2006-05-06 0:00 Geoff Levand
2006-05-07 22:31 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 8+ messages in thread
From: Geoff Levand @ 2006-05-06 0:00 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann
Removes the processor specific do-nothing routines __setup_cpu_power3 and
__setup_cpu_power4 with the generic routine __setup_cpu_null.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Index: cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/cpu_setup_power4.S 2006-05-05 15:59:58.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S 2006-05-05 16:40:44.000000000 -0700
@@ -73,9 +73,6 @@
isync
blr
-_GLOBAL(__setup_cpu_power4)
- blr
-
_GLOBAL(__setup_cpu_ppc970)
mfspr r0,SPRN_HID0
li r11,5 /* clear DOZE and SLEEP */
Index: cell--alp--3/arch/powerpc/kernel/cputable.c
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/cputable.c 2006-05-05 16:29:06.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/cputable.c 2006-05-05 16:40:41.000000000 -0700
@@ -32,8 +32,6 @@
*/
#ifdef CONFIG_PPC64
extern void __setup_cpu_null(unsigned long offset, struct cpu_spec* spec);
-extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
-extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
#else
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
@@ -80,7 +78,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/power3",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "power3",
@@ -94,7 +92,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/power3",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "power3",
@@ -108,7 +106,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -122,7 +120,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -136,7 +134,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -150,7 +148,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -164,7 +162,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power4,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/power4",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power4",
@@ -178,7 +176,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power4,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/power4",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power4",
@@ -244,7 +242,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/power5",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power5",
@@ -258,7 +256,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
+ .cpu_setup = __setup_cpu_null,
.oprofile_cpu_type = "ppc64/power5+",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power5+",
@@ -285,7 +283,7 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
+ .cpu_setup = __setup_cpu_null,
.platform = "power4",
}
#endif /* CONFIG_PPC64 */
Index: cell--alp--3/arch/powerpc/kernel/misc_64.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/misc_64.S 2006-05-05 16:04:59.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/misc_64.S 2006-05-05 16:40:47.000000000 -0700
@@ -771,9 +771,6 @@
_GLOBAL(__setup_cpu_null)
blr
-_GLOBAL(__setup_cpu_power3)
- blr
-
_GLOBAL(execve)
li r0,__NR_execve
sc
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] powerpc: remove do-nothing cpu setup routines
2006-05-06 0:00 [patch] powerpc: remove do-nothing cpu setup routines Geoff Levand
@ 2006-05-07 22:31 ` Benjamin Herrenschmidt
2006-05-08 0:12 ` Segher Boessenkool
0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2006-05-07 22:31 UTC (permalink / raw)
To: Geoff Levand; +Cc: linuxppc-dev, Paul Mackerras, cbe-oss-dev, Arnd Bergmann
On Fri, 2006-05-05 at 17:00 -0700, Geoff Levand wrote:
> Removes the processor specific do-nothing routines __setup_cpu_power3 and
> __setup_cpu_power4 with the generic routine __setup_cpu_null.
Why not just change the caller to test for NULL ?
Cheers,
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] powerpc: remove do-nothing cpu setup routines
2006-05-07 22:31 ` Benjamin Herrenschmidt
@ 2006-05-08 0:12 ` Segher Boessenkool
2006-05-09 0:16 ` Geoff Levand
2006-05-09 2:36 ` Geoff Levand
0 siblings, 2 replies; 8+ messages in thread
From: Segher Boessenkool @ 2006-05-08 0:12 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Arnd Bergmann, linuxppc-dev, Paul Mackerras, cbe-oss-dev
>> Removes the processor specific do-nothing routines
>> __setup_cpu_power3 and
>> __setup_cpu_power4 with the generic routine __setup_cpu_null.
>
> Why not just change the caller to test for NULL ?
Yes, please do (as Paul suggested already).
Segher
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] powerpc: remove do-nothing cpu setup routines
2006-05-08 0:12 ` Segher Boessenkool
@ 2006-05-09 0:16 ` Geoff Levand
2006-05-09 0:28 ` Benjamin Herrenschmidt
2006-05-09 0:47 ` Segher Boessenkool
2006-05-09 2:36 ` Geoff Levand
1 sibling, 2 replies; 8+ messages in thread
From: Geoff Levand @ 2006-05-09 0:16 UTC (permalink / raw)
To: Segher Boessenkool
Cc: Levand, Geoffrey, Arnd Bergmann, linuxppc-dev, Paul Mackerras,
cbe-oss-dev
Segher Boessenkool wrote:
>>> Removes the processor specific do-nothing routines
>>> __setup_cpu_power3 and
>>> __setup_cpu_power4 with the generic routine __setup_cpu_null.
>>
>> Why not just change the caller to test for NULL ?
OK, I see the 32 bit version already does this, but I'm
wondering if there is some restriction on the instruction
sequence between the compare and the branch. Here's what's
there:
lwz r5,CPU_SPEC_SETUP(r4)
cmpi 0,r5,0
add r5,r5,r3
beqlr
mtctr r5
bctr
But, could this also be:
lwz r5,CPU_SPEC_SETUP(r4)
cmpi 0,r5,0
beqlr
add r5,r5,r3
mtctr r5
bctr
-Geoff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] powerpc: remove do-nothing cpu setup routines
2006-05-09 0:16 ` Geoff Levand
@ 2006-05-09 0:28 ` Benjamin Herrenschmidt
2006-05-09 0:47 ` Segher Boessenkool
1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2006-05-09 0:28 UTC (permalink / raw)
To: Geoff Levand; +Cc: Arnd Bergmann, linuxppc-dev, Paul Mackerras, cbe-oss-dev
On Mon, 2006-05-08 at 17:16 -0700, Geoff Levand wrote:
> Segher Boessenkool wrote:
> >>> Removes the processor specific do-nothing routines
> >>> __setup_cpu_power3 and
> >>> __setup_cpu_power4 with the generic routine __setup_cpu_null.
> >>
> >> Why not just change the caller to test for NULL ?
>
> OK, I see the 32 bit version already does this, but I'm
> wondering if there is some restriction on the instruction
> sequence between the compare and the branch. Here's what's
> there:
>
> lwz r5,CPU_SPEC_SETUP(r4)
> cmpi 0,r5,0
> add r5,r5,r3
> beqlr
> mtctr r5
> bctr
>
> But, could this also be:
>
> lwz r5,CPU_SPEC_SETUP(r4)
> cmpi 0,r5,0
> beqlr
> add r5,r5,r3
> mtctr r5
> bctr
Just an optimisation for a code path that doesn't really need any :)
Blame habits...
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] powerpc: remove do-nothing cpu setup routines
2006-05-09 0:16 ` Geoff Levand
2006-05-09 0:28 ` Benjamin Herrenschmidt
@ 2006-05-09 0:47 ` Segher Boessenkool
1 sibling, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2006-05-09 0:47 UTC (permalink / raw)
To: Geoff Levand; +Cc: Paul Mackerras, cbe-oss-dev, Arnd Bergmann, linuxppc-dev
> lwz r5,CPU_SPEC_SETUP(r4)
> cmpi 0,r5,0
> add r5,r5,r3
> beqlr
> mtctr r5
> bctr
>
> But, could this also be:
>
> lwz r5,CPU_SPEC_SETUP(r4)
> cmpi 0,r5,0
> beqlr
> add r5,r5,r3
> mtctr r5
> bctr
Sure. Except it should be cmpwi cr0,r5,0 or cmpwi r5,0 --
cmpi with three arguments is not valid PowerPC assembler code.
Segher
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] powerpc: remove do-nothing cpu setup routines
2006-05-08 0:12 ` Segher Boessenkool
2006-05-09 0:16 ` Geoff Levand
@ 2006-05-09 2:36 ` Geoff Levand
2006-05-09 2:49 ` Geoff Levand
1 sibling, 1 reply; 8+ messages in thread
From: Geoff Levand @ 2006-05-09 2:36 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Levand, Geoffrey, Arnd Bergmann, linuxppc-dev, cbe-oss-dev
Segher Boessenkool wrote:
>>> Removes the processor specific do-nothing routines
>>> __setup_cpu_power3 and
>>> __setup_cpu_power4 with the generic routine __setup_cpu_null.
>>
>> Why not just change the caller to test for NULL ?
>
> Yes, please do (as Paul suggested already).
Paul, here is an updated patch. This version makes my other
patch 'cell: remove broken __setup_cpu_be function', send by
Arnd, obsolete.
-Geoff
Removed the do-nothing routines __setup_cpu_power3 and
__setup_cpu_power4 and replaced them with a null pointer check
in the caller. Also removed the Cell processor specific
routine __setup_cpu_be which improperly accessed the
hypervisor page size configuration at SPR HID6.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
Index: cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/cpu_setup_power4.S 2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S 2006-05-08 18:51:55.000000000 -0700
@@ -73,23 +73,6 @@
isync
blr
-_GLOBAL(__setup_cpu_power4)
- blr
-
-_GLOBAL(__setup_cpu_be)
- /* Set large page sizes LP=0: 16MB, LP=1: 64KB */
- addi r3, 0, 0
- ori r3, r3, HID6_LB
- sldi r3, r3, 32
- nor r3, r3, r3
- mfspr r4, SPRN_HID6
- and r4, r4, r3
- addi r3, 0, 0x02000
- sldi r3, r3, 32
- or r4, r4, r3
- mtspr SPRN_HID6, r4
- blr
-
_GLOBAL(__setup_cpu_ppc970)
mfspr r0,SPRN_HID0
li r11,5 /* clear DOZE and SLEEP */
Index: cell--alp--3/arch/powerpc/kernel/cputable.c
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/cputable.c 2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/cputable.c 2006-05-08 18:51:55.000000000 -0700
@@ -30,11 +30,6 @@
* part of the cputable though. That has to be fixed for both ppc32
* and ppc64
*/
-#ifdef CONFIG_PPC64
-extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
-extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
-extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
-#else
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
@@ -43,7 +38,6 @@
extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
-#endif /* CONFIG_PPC32 */
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
/* This table only contains "desktop" CPUs, it need to be filled with embedded
@@ -80,7 +74,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/power3",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "power3",
@@ -94,7 +87,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/power3",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "power3",
@@ -108,7 +100,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -122,7 +113,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -136,7 +126,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -150,7 +139,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -164,7 +152,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power4",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power4",
@@ -178,7 +165,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power4",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power4",
@@ -244,7 +230,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power5",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power5",
@@ -258,7 +243,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power5+",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power5+",
@@ -273,7 +257,6 @@
PPC_FEATURE_SMT,
.icache_bsize = 128,
.dcache_bsize = 128,
- .cpu_setup = __setup_cpu_be,
.platform = "ppc-cell-be",
},
{ /* default match */
@@ -285,7 +268,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
.platform = "power4",
}
#endif /* CONFIG_PPC64 */
Index: cell--alp--3/arch/powerpc/kernel/misc_32.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/misc_32.S 2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/misc_32.S 2006-05-08 18:57:44.000000000 -0700
@@ -216,7 +216,7 @@
lwz r4,0(r4)
add r4,r4,r3
lwz r5,CPU_SPEC_SETUP(r4)
- cmpi 0,r5,0
+ cmpwi 0,r5,0
add r5,r5,r3
beqlr
mtctr r5
Index: cell--alp--3/arch/powerpc/kernel/misc_64.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/misc_64.S 2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/misc_64.S 2006-05-08 19:00:13.000000000 -0700
@@ -482,7 +482,9 @@
sub r0,r3,r5
std r0,0(r4)
ld r4,CPU_SPEC_SETUP(r3)
+ cmpdi 0,r4,0
add r4,r4,r5
+ beqlr
ld r4,0(r4)
add r4,r4,r5
mtctr r4
@@ -768,9 +770,6 @@
#endif /* CONFIG_ALTIVEC */
-_GLOBAL(__setup_cpu_power3)
- blr
-
_GLOBAL(execve)
li r0,__NR_execve
sc
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] powerpc: remove do-nothing cpu setup routines
2006-05-09 2:36 ` Geoff Levand
@ 2006-05-09 2:49 ` Geoff Levand
0 siblings, 0 replies; 8+ messages in thread
From: Geoff Levand @ 2006-05-09 2:49 UTC (permalink / raw)
To: Geoff Levand; +Cc: Arnd Bergmann, linuxppc-dev, Paul Mackerras, cbe-oss-dev
Sorry, the last patch accidentally removed the preprocessor
conditionals on the 32 bit declarations.
Updated patch below.
-Geoff
Removed the do-nothing routines __setup_cpu_power3 and
__setup_cpu_power4 and replaced them with a null pointer check
in the caller. Also removed the Cell processor specific
routine __setup_cpu_be which improperly accessed the
hypervisor page size configuration at SPR HID6.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
Index: cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/cpu_setup_power4.S 2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S 2006-05-08 19:18:45.000000000 -0700
@@ -73,23 +73,6 @@
isync
blr
-_GLOBAL(__setup_cpu_power4)
- blr
-
-_GLOBAL(__setup_cpu_be)
- /* Set large page sizes LP=0: 16MB, LP=1: 64KB */
- addi r3, 0, 0
- ori r3, r3, HID6_LB
- sldi r3, r3, 32
- nor r3, r3, r3
- mfspr r4, SPRN_HID6
- and r4, r4, r3
- addi r3, 0, 0x02000
- sldi r3, r3, 32
- or r4, r4, r3
- mtspr SPRN_HID6, r4
- blr
-
_GLOBAL(__setup_cpu_ppc970)
mfspr r0,SPRN_HID0
li r11,5 /* clear DOZE and SLEEP */
Index: cell--alp--3/arch/powerpc/kernel/cputable.c
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/cputable.c 2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/cputable.c 2006-05-08 19:43:37.000000000 -0700
@@ -30,11 +30,7 @@
* part of the cputable though. That has to be fixed for both ppc32
* and ppc64
*/
-#ifdef CONFIG_PPC64
-extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
-extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
-extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
-#else
+#ifdef CONFIG_PPC32
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
@@ -80,7 +76,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/power3",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "power3",
@@ -94,7 +89,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/power3",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "power3",
@@ -108,7 +102,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -122,7 +115,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -136,7 +128,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -150,7 +141,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power3,
.oprofile_cpu_type = "ppc64/rs64",
.oprofile_type = PPC_OPROFILE_RS64,
.platform = "rs64",
@@ -164,7 +154,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power4",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power4",
@@ -178,7 +167,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power4",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power4",
@@ -244,7 +232,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power5",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power5",
@@ -258,7 +245,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power5+",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power5+",
@@ -273,7 +259,6 @@
PPC_FEATURE_SMT,
.icache_bsize = 128,
.dcache_bsize = 128,
- .cpu_setup = __setup_cpu_be,
.platform = "ppc-cell-be",
},
{ /* default match */
@@ -285,7 +270,6 @@
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .cpu_setup = __setup_cpu_power4,
.platform = "power4",
}
#endif /* CONFIG_PPC64 */
Index: cell--alp--3/arch/powerpc/kernel/misc_32.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/misc_32.S 2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/misc_32.S 2006-05-08 19:18:45.000000000 -0700
@@ -216,7 +216,7 @@
lwz r4,0(r4)
add r4,r4,r3
lwz r5,CPU_SPEC_SETUP(r4)
- cmpi 0,r5,0
+ cmpwi 0,r5,0
add r5,r5,r3
beqlr
mtctr r5
Index: cell--alp--3/arch/powerpc/kernel/misc_64.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/misc_64.S 2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/misc_64.S 2006-05-08 19:18:45.000000000 -0700
@@ -482,7 +482,9 @@
sub r0,r3,r5
std r0,0(r4)
ld r4,CPU_SPEC_SETUP(r3)
+ cmpdi 0,r4,0
add r4,r4,r5
+ beqlr
ld r4,0(r4)
add r4,r4,r5
mtctr r4
@@ -768,9 +770,6 @@
#endif /* CONFIG_ALTIVEC */
-_GLOBAL(__setup_cpu_power3)
- blr
-
_GLOBAL(execve)
li r0,__NR_execve
sc
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-05-09 2:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-06 0:00 [patch] powerpc: remove do-nothing cpu setup routines Geoff Levand
2006-05-07 22:31 ` Benjamin Herrenschmidt
2006-05-08 0:12 ` Segher Boessenkool
2006-05-09 0:16 ` Geoff Levand
2006-05-09 0:28 ` Benjamin Herrenschmidt
2006-05-09 0:47 ` Segher Boessenkool
2006-05-09 2:36 ` Geoff Levand
2006-05-09 2:49 ` Geoff Levand
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.