Skip to content

Commit

Permalink
sparc: report "Unknown CPU/FPU" for unknown cpu/fpu
Browse files Browse the repository at this point in the history
If we cannot determine the CPU or FPU report
"Unknown CPU" or "Unknown FPU" like sparc64 does.

And report with KERN_ERR that we cannot determine the CPU.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Dec 6, 2008
1 parent 8a563f0 commit 6c6bd8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions arch/sparc/kernel/cpu_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ void __cpuinit cpu_probe(void)
}

if (i == NSPARCCHIPS)
printk(KERN_DEBUG "psr.impl = 0x%x psr.vers = 0x%x\n",
{
printk(KERN_ERR "CPU: Unknown chip, impl[0x%x] vers[0x%x]\n",
psr_impl, psr_vers);
sparc_cpu_type = "Unknown CPU";
}

for (i = 0; i < NSPARCFPU; i++) {
if (linux_sparc_fpu[i].psr_impl == psr_impl)
Expand All @@ -164,8 +167,8 @@ void __cpuinit cpu_probe(void)
}

if (i == NSPARCFPU) {
printk(KERN_DEBUG "psr.impl = 0x%x fsr.vers = 0x%x\n",
printk(KERN_ERR "FPU: Unknown chip, impl[0x%x] vers[0x%x]\n",
psr_impl, fpu_vers);
sparc_fpu_type = linux_sparc_fpu[31].fp_name;
sparc_fpu_type = "Unknown FPU";
}
}
4 changes: 2 additions & 2 deletions arch/sparc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
"CPU0ClkTck\t: %ld\n"
#endif
,
sparc_cpu_type ? sparc_cpu_type : "undetermined",
sparc_fpu_type ? sparc_fpu_type : "undetermined",
sparc_cpu_type,
sparc_fpu_type ,
romvec->pv_romvers,
prom_rev,
romvec->pv_printrev >> 16,
Expand Down

0 comments on commit 6c6bd8b

Please sign in to comment.