Commit ee2ffc81 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Do not make sparc_{cpu,fpu}_type a NR_CPUS array.

It is a big waste of space and there exists no
existing configuration where these values can be
different amongst cpus.
parent 7ef85b9f
......@@ -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 @@ void __init cpu_probe(void)
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 @@ void __init cpu_probe(void)
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 @@ void __init cpu_probe(void)
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";
}
}
......@@ -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,
......
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment