Commit 4c8b7b25 authored by Nathan Lynch's avatar Nathan Lynch Committed by Linus Torvalds

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

Make the physical_id cpu sysfs attribute on ppc64 show -1 instead of
65535 for non-present cpus.
Signed-off-by: default avatarNathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6c83658f
...@@ -387,7 +387,7 @@ static ssize_t show_physical_id(struct sys_device *dev, char *buf) ...@@ -387,7 +387,7 @@ static ssize_t show_physical_id(struct sys_device *dev, char *buf)
{ {
struct cpu *cpu = container_of(dev, struct cpu, sysdev); 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); static SYSDEV_ATTR(physical_id, 0444, show_physical_id, NULL);
......
...@@ -68,7 +68,7 @@ struct paca_struct { ...@@ -68,7 +68,7 @@ struct paca_struct {
u64 stab_real; /* Absolute address of segment table */ u64 stab_real; /* Absolute address of segment table */
u64 stab_addr; /* Virtual address of segment table */ u64 stab_addr; /* Virtual address of segment table */
void *emergency_sp; /* pointer to emergency stack */ 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 */ u8 cpu_start; /* At startup, processor spins until */
/* this becomes non-zero. */ /* this becomes non-zero. */
......
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