diff options
-rw-r--r-- | arch/ia64/kernel/topology.c | 9 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 9 | ||||
-rw-r--r-- | include/asm-ia64/topology.h | 2 | ||||
-rw-r--r-- | include/asm-x86/topology.h | 4 |
4 files changed, 24 insertions, 0 deletions
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index a2484fc1a06..abb17a613b1 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -27,6 +27,15 @@ | |||
27 | 27 | ||
28 | static struct ia64_cpu *sysfs_cpus; | 28 | static struct ia64_cpu *sysfs_cpus; |
29 | 29 | ||
30 | void arch_fix_phys_package_id(int num, u32 slot) | ||
31 | { | ||
32 | #ifdef CONFIG_SMP | ||
33 | if (cpu_data(num)->socket_id == -1) | ||
34 | cpu_data(num)->socket_id = slot; | ||
35 | #endif | ||
36 | } | ||
37 | EXPORT_SYMBOL_GPL(arch_fix_phys_package_id); | ||
38 | |||
30 | int arch_register_cpu(int num) | 39 | int arch_register_cpu(int num) |
31 | { | 40 | { |
32 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) | 41 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index dd28c912e84..5241e3ff508 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -603,6 +603,15 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid) | |||
603 | request_region(pr->throttling.address, 6, "ACPI CPU throttle"); | 603 | request_region(pr->throttling.address, 6, "ACPI CPU throttle"); |
604 | } | 604 | } |
605 | 605 | ||
606 | /* | ||
607 | * If ACPI describes a slot number for this CPU, we can use it | ||
608 | * ensure we get the right value in the "physical id" field | ||
609 | * of /proc/cpuinfo | ||
610 | */ | ||
611 | status = acpi_evaluate_object(pr->handle, "_SUN", NULL, &buffer); | ||
612 | if (ACPI_SUCCESS(status)) | ||
613 | arch_fix_phys_package_id(pr->id, object.integer.value); | ||
614 | |||
606 | return 0; | 615 | return 0; |
607 | } | 616 | } |
608 | 617 | ||
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index f2f72ef2a89..32863b3bb1d 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -116,6 +116,8 @@ void build_cpu_to_node_map(void); | |||
116 | #define smt_capable() (smp_num_siblings > 1) | 116 | #define smt_capable() (smp_num_siblings > 1) |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | extern void arch_fix_phys_package_id(int num, u32 slot); | ||
120 | |||
119 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ | 121 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ |
120 | CPU_MASK_ALL : \ | 122 | CPU_MASK_ALL : \ |
121 | node_to_cpumask(pcibus_to_node(bus)) \ | 123 | node_to_cpumask(pcibus_to_node(bus)) \ |
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h index 0e6d6b03aff..4f35a0fb4f2 100644 --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h | |||
@@ -193,6 +193,10 @@ extern cpumask_t cpu_coregroup_map(int cpu); | |||
193 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 193 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
194 | #endif | 194 | #endif |
195 | 195 | ||
196 | static inline void arch_fix_phys_package_id(int num, u32 slot) | ||
197 | { | ||
198 | } | ||
199 | |||
196 | struct pci_bus; | 200 | struct pci_bus; |
197 | void set_pci_bus_resources_arch_default(struct pci_bus *b); | 201 | void set_pci_bus_resources_arch_default(struct pci_bus *b); |
198 | 202 | ||