]> git.hungrycats.org Git - linux/commitdiff
[SPARC64]: Do not make sparc_{cpu,fpu}_type a NR_CPUS array.
authorDavid S. Miller <davem@nuts.ninka.net>
Tue, 19 Aug 2003 04:50:57 +0000 (21:50 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Tue, 19 Aug 2003 04:50:57 +0000 (21:50 -0700)
It is a big waste of space and there exists no
existing configuration where these values can be
different amongst cpus.

arch/sparc64/kernel/cpu.c
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/smp.c

index 6e0d14430af9f514ab5232a7b4868a567239faf8..54c8afe15069ebff8e1749c77fb822a3c542cd25 100644 (file)
@@ -52,18 +52,16 @@ struct cpu_iu_info linux_sparc_chips[] = {
 
 #define NSPARCCHIPS  (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))
 
-char *sparc_cpu_type[NR_CPUS] = { "cpu-oops", };
-char *sparc_fpu_type[NR_CPUS] = { "fpu-oops", };
+char *sparc_cpu_type = "cpu-oops";
+char *sparc_fpu_type = "fpu-oops";
 
 unsigned int fsr_storage;
 
 void __init cpu_probe(void)
 {
        unsigned long ver, fpu_vers, manuf, impl, fprs;
-       int i, cpuid;
+       int i;
        
-       cpuid = hard_smp_processor_id();
-
        fprs = fprs_read();
        fprs_write(FPRS_FEF);
        __asm__ __volatile__ ("rdpr %%ver, %0; stx %%fsr, [%1]"
@@ -80,7 +78,7 @@ retry:
        for (i = 0; i < NSPARCCHIPS; i++) {
                if (linux_sparc_chips[i].manuf == manuf) {
                        if (linux_sparc_chips[i].impl == impl) {
-                               sparc_cpu_type[cpuid] =
+                               sparc_cpu_type =
                                        linux_sparc_chips[i].cpu_name;
                                break;
                        }
@@ -99,14 +97,14 @@ retry:
                        printk("DEBUG: manuf[%lx] impl[%lx]\n",
                               manuf, impl);
                }
-               sparc_cpu_type[cpuid] = "Unknown CPU";
+               sparc_cpu_type = "Unknown CPU";
        }
 
        for (i = 0; i < NSPARCFPU; i++) {
                if (linux_sparc_fpu[i].manuf == manuf &&
                    linux_sparc_fpu[i].impl == impl) {
                        if (linux_sparc_fpu[i].fpu_vers == fpu_vers) {
-                               sparc_fpu_type[cpuid] =
+                               sparc_fpu_type =
                                        linux_sparc_fpu[i].fp_name;
                                break;
                        }
@@ -116,6 +114,6 @@ retry:
        if (i == NSPARCFPU) {
                printk("DEBUG: manuf[%lx] impl[%lx] fsr.vers[%lx]\n",
                       manuf, impl, fpu_vers);
-               sparc_fpu_type[cpuid] = "Unknown FPU";
+               sparc_fpu_type = "Unknown FPU";
        }
 }
index aa19b4c0706c87c1301a143f7f3a369d71a04d13..e3bc6bae9a973837db8f6748461e5a4231585587 100644 (file)
@@ -586,8 +586,8 @@ asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
 
 /* BUFFER is PAGE_SIZE bytes long. */
 
-extern char *sparc_cpu_type[];
-extern char *sparc_fpu_type[];
+extern char *sparc_cpu_type;
+extern char *sparc_fpu_type;
 
 extern void smp_info(struct seq_file *);
 extern void smp_bogo(struct seq_file *);
@@ -599,8 +599,6 @@ unsigned long up_clock_tick;
 
 static int show_cpuinfo(struct seq_file *m, void *__unused)
 {
-       int cpuid = smp_processor_id();
-
        seq_printf(m, 
                   "cpu\t\t: %s\n"
                   "fpu\t\t: %s\n"
@@ -614,8 +612,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
                   "Cpu0ClkTck\t: %016lx\n"
 #endif
                   ,
-                  sparc_cpu_type[cpuid],
-                  sparc_fpu_type[cpuid],
+                  sparc_cpu_type,
+                  sparc_fpu_type,
                   prom_rev,
                   prom_prev >> 16,
                   (prom_prev >> 8) & 0xff,
index c5f29c7d58501d4627d8b8d7480026685c12706d..afc8ff31b29b29fc49c6cc5d78a10cc61a442483 100644 (file)
@@ -109,7 +109,6 @@ static void smp_setup_percpu_timer(void);
 static volatile unsigned long callin_flag = 0;
 
 extern void inherit_locked_prom_mappings(int save_p);
-extern void cpu_probe(void);
 
 void __init smp_callin(void)
 {
@@ -129,8 +128,6 @@ void __init smp_callin(void)
        __flush_cache_all();
        __flush_tlb_all();
 
-       cpu_probe();
-
        smp_setup_percpu_timer();
 
        local_irq_enable();