
From: Paul Mackerras <paulus@samba.org>

This patch is from Nathan Lynch <nathanl@austin.ibm.com>.

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

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/ppc64/kernel/sysfs.c |    2 +-
 25-akpm/include/asm-ppc64/paca.h  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/ppc64/kernel/sysfs.c~ppc64-show-1-for-physical_id-of-non-present-cpus arch/ppc64/kernel/sysfs.c
--- 25/arch/ppc64/kernel/sysfs.c~ppc64-show-1-for-physical_id-of-non-present-cpus	2005-02-04 02:13:14.193937888 -0800
+++ 25-akpm/arch/ppc64/kernel/sysfs.c	2005-02-04 02:13:14.198937128 -0800
@@ -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, "%d\n", get_hard_smp_processor_id(cpu->sysdev.id));
 }
 static SYSDEV_ATTR(physical_id, 0444, show_physical_id, NULL);
 
diff -puN include/asm-ppc64/paca.h~ppc64-show-1-for-physical_id-of-non-present-cpus include/asm-ppc64/paca.h
--- 25/include/asm-ppc64/paca.h~ppc64-show-1-for-physical_id-of-non-present-cpus	2005-02-04 02:13:14.195937584 -0800
+++ 25-akpm/include/asm-ppc64/paca.h	2005-02-04 02:13:14.199936976 -0800
@@ -68,7 +68,7 @@ struct paca_struct {
 	u64 stab_real;			/* Absolute address of segment table */
 	u64 stab_addr;			/* Virtual address of segment table */
 	void *emergency_sp;		/* pointer to emergency stack */
-	u16 hw_cpu_id;			/* Physical processor number */
+	s16 hw_cpu_id;			/* Physical processor number */
 	u8 cpu_start;			/* At startup, processor spins until */
 					/* this becomes non-zero. */
 
_
