[PATCH] show -1 for physical_id of non-present cpus

Nathan Lynch nathanl at austin.ibm.com
Wed Jan 26 11:22:01 EST 2005


Make the physical_id cpu attribute on ppc64 show -1 instead of 65535
for non-present cpus.

Signed-off-by: Nathan Lynch <nathanl at austin.ibm.com>


---


diff -puN arch/ppc64/kernel/sysfs.c~cpu-physical_id-signed arch/ppc64/kernel/sysfs.c
--- linux-2.6.11-rc2-bk2/arch/ppc64/kernel/sysfs.c~cpu-physical_id-signed	2005-01-24 21:29:57.000000000 -0600
+++ linux-2.6.11-rc2-bk2-nathanl/arch/ppc64/kernel/sysfs.c	2005-01-25 09:41:15.000000000 -0600
@@ -387,7 +387,7 @@ static ssize_t show_physical_id(struct s
 {
 	struct cpu *cpu = container_of(dev, struct cpu, sysdev);
 
-	return sprintf(buf, "%u\n", get_hard_smp_processor_id(cpu->sysdev.id));
+	return sprintf(buf, "%hd\n", get_hard_smp_processor_id(cpu->sysdev.id));
 }
 static SYSDEV_ATTR(physical_id, 0444, show_physical_id, NULL);
 

_





More information about the Linuxppc64-dev mailing list