]> err.no Git - linux-2.6/commitdiff
[PATCH] powerpc: remove do-nothing cpu setup routines
authorGeoff Levand <geoffrey.levand@am.sony.com>
Fri, 19 May 2006 04:24:18 +0000 (14:24 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 19 May 2006 04:24:18 +0000 (14:24 +1000)
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/cpu_setup_power4.S
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/misc_64.S

index b61d86e7ceb6059c7e838927dc66c25244441f1e..271418308d536de53601ae69a0c070ac24a11490 100644 (file)
@@ -73,23 +73,6 @@ _GLOBAL(__970_cpu_preinit)
        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 3f7182db9ed50cbafcc2992c0bb64fbb66a836e1..0c487ee4d4830fae96041dcfff56b0f53405e13a 100644 (file)
@@ -30,11 +30,7 @@ EXPORT_SYMBOL(cur_cpu_spec);
  * 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);
@@ -82,7 +78,6 @@ struct cpu_spec       cpu_specs[] = {
                .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",
@@ -96,7 +91,6 @@ struct cpu_spec       cpu_specs[] = {
                .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",
@@ -110,7 +104,6 @@ struct cpu_spec     cpu_specs[] = {
                .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",
@@ -124,7 +117,6 @@ struct cpu_spec     cpu_specs[] = {
                .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",
@@ -138,7 +130,6 @@ struct cpu_spec     cpu_specs[] = {
                .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",
@@ -152,7 +143,6 @@ struct cpu_spec     cpu_specs[] = {
                .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",
@@ -166,7 +156,6 @@ struct cpu_spec     cpu_specs[] = {
                .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",
@@ -180,7 +169,6 @@ struct cpu_spec     cpu_specs[] = {
                .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",
@@ -246,7 +234,6 @@ struct cpu_spec     cpu_specs[] = {
                .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",
@@ -260,7 +247,6 @@ struct cpu_spec     cpu_specs[] = {
                .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+",
@@ -274,7 +260,6 @@ struct cpu_spec     cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
-               .cpu_setup              = __setup_cpu_power4,
                .oprofile_cpu_type      = "ppc64/power6",
                .oprofile_type          = PPC_OPROFILE_POWER4,
                .platform               = "power6",
@@ -289,7 +274,6 @@ struct cpu_spec     cpu_specs[] = {
                        PPC_FEATURE_SMT,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
-               .cpu_setup              = __setup_cpu_be,
                .platform               = "ppc-cell-be",
        },
        {       /* default match */
@@ -301,7 +285,6 @@ struct cpu_spec     cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
-               .cpu_setup              = __setup_cpu_power4,
                .platform               = "power4",
        }
 #endif /* CONFIG_PPC64 */
index be982023409ec2179833ebceefd4a6ff02aa32c7..01d3916c4cb13f6dc01b431328f3f2a1a49e4007 100644 (file)
@@ -216,7 +216,7 @@ _GLOBAL(call_setup_cpu)
        lwz     r4,0(r4)
        add     r4,r4,r3
        lwz     r5,CPU_SPEC_SETUP(r4)
-       cmp   0,r5,0
+       cmpwi   0,r5,0
        add     r5,r5,r3
        beqlr
        mtctr   r5
index 2778cce058e2af29ff7d66152dfd59d4d7d62fe4..e8883d42c43c16c2d237d9cf81ea3a34a8105bd8 100644 (file)
@@ -482,7 +482,9 @@ _GLOBAL(identify_cpu)
        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 @@ _GLOBAL(giveup_altivec)
 
 #endif /* CONFIG_ALTIVEC */
 
-_GLOBAL(__setup_cpu_power3)
-       blr
-
 _GLOBAL(execve)
        li      r0,__NR_execve
        sc