[PATCH] powerpc: fix cpu name in show-cpuinfo

Michael Wolf mjw at linux.vnet.ibm.com
Thu Dec 17 04:53:23 EST 2009

When looking at /proc/cpuinfo the cpuname will be 'unknown"
if the pvr mask is 0.  This is the case for the kernel running
on new or unknown hardware.  However the cpuname is always specified
so use the name regardless of the pvr mask.

Signed-off-by: Mike Wolf <mjw at us.ibm.com>
--- mainline.orig/arch/powerpc/kernel/setup-common.c	2009-12-15
11:33:36.000000000 -0600
+++ mainline/arch/powerpc/kernel/setup-common.c	2009-12-16
11:26:26.000000000 -0600
@@ -219,7 +219,7 @@
 	seq_printf(m, "processor\t: %lu\n", cpu_id);
 	seq_printf(m, "cpu\t\t: ");
-	if (cur_cpu_spec->pvr_mask)
+	if (cur_cpu_spec->cpu_name)
 		seq_printf(m, "%s", cur_cpu_spec->cpu_name);
 		seq_printf(m, "unknown (%08x)", pvr);

More information about the Linuxppc-dev mailing list