From: Andrew Morton If some of those things warn, I want to now why... x86_64 uses u8 for phys_proc_id[], while x86 uses int. Sigh. Cc: Zhang, Yanmin Cc: Ingo Molnar Cc: Nick Piggin Cc: Greg KH Signed-off-by: Andrew Morton --- drivers/base/topology.c | 14 +++++++------- include/asm-i386/topology.h | 8 ++++---- include/asm-ia64/topology.h | 8 ++++---- include/asm-x86_64/topology.h | 8 ++++---- 4 files changed, 19 insertions(+), 19 deletions(-) diff -puN drivers/base/topology.c~export-cpu-topology-by-sysfs-tidy drivers/base/topology.c --- devel/drivers/base/topology.c~export-cpu-topology-by-sysfs-tidy 2006-01-25 11:07:19.000000000 -0800 +++ devel-akpm/drivers/base/topology.c 2006-01-25 11:07:19.000000000 -0800 @@ -81,7 +81,7 @@ define_one_ro(core_siblings); #define ref_core_siblings_attr #endif -static struct attribute * default_attrs[] = { +static struct attribute *default_attrs[] = { ref_physical_package_id_attr ref_core_id_attr ref_thread_siblings_attr @@ -115,12 +115,12 @@ static int __cpuinit topology_cpu_callba sys_dev = get_cpu_sysdev(cpu); switch (action) { - case CPU_ONLINE: - topology_add_dev(sys_dev); - break; - case CPU_DEAD: - topology_remove_dev(sys_dev); - break; + case CPU_ONLINE: + topology_add_dev(sys_dev); + break; + case CPU_DEAD: + topology_remove_dev(sys_dev); + break; } return NOTIFY_OK; } diff -puN include/asm-i386/topology.h~export-cpu-topology-by-sysfs-tidy include/asm-i386/topology.h --- devel/include/asm-i386/topology.h~export-cpu-topology-by-sysfs-tidy 2006-01-25 11:07:19.000000000 -0800 +++ devel-akpm/include/asm-i386/topology.h 2006-01-25 11:07:19.000000000 -0800 @@ -29,11 +29,11 @@ #ifdef CONFIG_SMP #define topology_physical_package_id(cpu) \ - ((int)(phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu])) + (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) #define topology_core_id(cpu) \ - ((int)(cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu])) -#define topology_core_siblings(cpu) cpu_core_map[cpu] -#define topology_thread_siblings(cpu) cpu_sibling_map[cpu] + (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) +#define topology_core_siblings(cpu) (cpu_core_map[cpu]) +#define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) #endif #ifdef CONFIG_NUMA diff -puN include/asm-ia64/topology.h~export-cpu-topology-by-sysfs-tidy include/asm-ia64/topology.h --- devel/include/asm-ia64/topology.h~export-cpu-topology-by-sysfs-tidy 2006-01-25 11:07:19.000000000 -0800 +++ devel-akpm/include/asm-ia64/topology.h 2006-01-25 11:07:19.000000000 -0800 @@ -103,10 +103,10 @@ void build_cpu_to_node_map(void); #endif /* CONFIG_NUMA */ #ifdef CONFIG_SMP -#define topology_physical_package_id(cpu) cpu_data(cpu)->socket_id -#define topology_core_id(cpu) cpu_data(cpu)->core_id -#define topology_core_siblings(cpu) cpu_core_map[cpu] -#define topology_thread_siblings(cpu) cpu_sibling_map[cpu] +#define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id) +#define topology_core_id(cpu) (cpu_data(cpu)->core_id) +#define topology_core_siblings(cpu) (cpu_core_map[cpu]) +#define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) #endif #include diff -puN include/asm-x86_64/topology.h~export-cpu-topology-by-sysfs-tidy include/asm-x86_64/topology.h --- devel/include/asm-x86_64/topology.h~export-cpu-topology-by-sysfs-tidy 2006-01-25 11:07:19.000000000 -0800 +++ devel-akpm/include/asm-x86_64/topology.h 2006-01-25 11:07:19.000000000 -0800 @@ -59,11 +59,11 @@ extern int __node_distance(int, int); #ifdef CONFIG_SMP #define topology_physical_package_id(cpu) \ - ((int)(phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu])) + (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) #define topology_core_id(cpu) \ - ((int)(cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu])) -#define topology_core_siblings(cpu) cpu_core_map[cpu] -#define topology_thread_siblings(cpu) cpu_sibling_map[cpu] + (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) +#define topology_core_siblings(cpu) (cpu_core_map[cpu]) +#define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) #endif #include _