PPC64 show -1 for physical_id of non-present cpus
PATCH 1/1 PPC64 show -1 for physical_id of non-present cpus
This patch is from Nathan Lynch <[email protected]>.
Make the physical_id cpu sysfs attribute on ppc64 show -1 instead of 65535 for non-present cpus.
Signed-off-by Nathan Lynch <[email protected]>
Signed-off-by Paul Mackerras <[email protected]>
arch/ppc64/kernel/sysfs.c renamed from arch/ppc64/kernel/sysfs.c~make-cpu-physical_id-signed +1 -1
@@ -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);
include/asm-ppc64/paca.h renamed from include/asm-ppc64/paca.h~make-cpu-physical_id-signed +1 -1
@@ -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. */