diff options
| -rw-r--r-- | arch/ia64/kernel/acpi.c | 9 | ||||
| -rw-r--r-- | arch/x86/kernel/acpi/boot.c | 9 | ||||
| -rw-r--r-- | drivers/acpi/acpi_processor.c | 25 | ||||
| -rw-r--r-- | drivers/acpi/device_pm.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/processor_core.c | 56 | ||||
| -rw-r--r-- | drivers/acpi/scan.c | 13 | ||||
| -rw-r--r-- | drivers/acpi/video.c | 10 | ||||
| -rw-r--r-- | include/acpi/processor.h | 8 | ||||
| -rw-r--r-- | include/linux/acpi.h | 4 |
9 files changed, 75 insertions, 61 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 615ef81def49..e795cb848154 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
| @@ -893,13 +893,13 @@ static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu) | |||
| 893 | } | 893 | } |
| 894 | 894 | ||
| 895 | /* wrapper to silence section mismatch warning */ | 895 | /* wrapper to silence section mismatch warning */ |
| 896 | int __ref acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu) | 896 | int __ref acpi_map_cpu(acpi_handle handle, int physid, int *pcpu) |
| 897 | { | 897 | { |
| 898 | return _acpi_map_lsapic(handle, physid, pcpu); | 898 | return _acpi_map_lsapic(handle, physid, pcpu); |
| 899 | } | 899 | } |
| 900 | EXPORT_SYMBOL(acpi_map_lsapic); | 900 | EXPORT_SYMBOL(acpi_map_cpu); |
| 901 | 901 | ||
| 902 | int acpi_unmap_lsapic(int cpu) | 902 | int acpi_unmap_cpu(int cpu) |
| 903 | { | 903 | { |
| 904 | ia64_cpu_to_sapicid[cpu] = -1; | 904 | ia64_cpu_to_sapicid[cpu] = -1; |
| 905 | set_cpu_present(cpu, false); | 905 | set_cpu_present(cpu, false); |
| @@ -910,8 +910,7 @@ int acpi_unmap_lsapic(int cpu) | |||
| 910 | 910 | ||
| 911 | return (0); | 911 | return (0); |
| 912 | } | 912 | } |
| 913 | 913 | EXPORT_SYMBOL(acpi_unmap_cpu); | |
| 914 | EXPORT_SYMBOL(acpi_unmap_lsapic); | ||
| 915 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ | 914 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
| 916 | 915 | ||
| 917 | #ifdef CONFIG_ACPI_NUMA | 916 | #ifdef CONFIG_ACPI_NUMA |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 4433a4be8171..d1626364a28a 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
| @@ -750,13 +750,13 @@ static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu) | |||
| 750 | } | 750 | } |
| 751 | 751 | ||
| 752 | /* wrapper to silence section mismatch warning */ | 752 | /* wrapper to silence section mismatch warning */ |
| 753 | int __ref acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu) | 753 | int __ref acpi_map_cpu(acpi_handle handle, int physid, int *pcpu) |
| 754 | { | 754 | { |
| 755 | return _acpi_map_lsapic(handle, physid, pcpu); | 755 | return _acpi_map_lsapic(handle, physid, pcpu); |
| 756 | } | 756 | } |
| 757 | EXPORT_SYMBOL(acpi_map_lsapic); | 757 | EXPORT_SYMBOL(acpi_map_cpu); |
| 758 | 758 | ||
| 759 | int acpi_unmap_lsapic(int cpu) | 759 | int acpi_unmap_cpu(int cpu) |
| 760 | { | 760 | { |
| 761 | #ifdef CONFIG_ACPI_NUMA | 761 | #ifdef CONFIG_ACPI_NUMA |
| 762 | set_apicid_to_node(per_cpu(x86_cpu_to_apicid, cpu), NUMA_NO_NODE); | 762 | set_apicid_to_node(per_cpu(x86_cpu_to_apicid, cpu), NUMA_NO_NODE); |
| @@ -768,8 +768,7 @@ int acpi_unmap_lsapic(int cpu) | |||
| 768 | 768 | ||
| 769 | return (0); | 769 | return (0); |
| 770 | } | 770 | } |
| 771 | 771 | EXPORT_SYMBOL(acpi_unmap_cpu); | |
| 772 | EXPORT_SYMBOL(acpi_unmap_lsapic); | ||
| 773 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ | 772 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
| 774 | 773 | ||
| 775 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) | 774 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) |
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 1fdf5e07a1c7..1020b1b53a17 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c | |||
| @@ -170,7 +170,7 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr) | |||
| 170 | acpi_status status; | 170 | acpi_status status; |
| 171 | int ret; | 171 | int ret; |
| 172 | 172 | ||
| 173 | if (pr->apic_id == -1) | 173 | if (pr->phys_id == -1) |
| 174 | return -ENODEV; | 174 | return -ENODEV; |
| 175 | 175 | ||
| 176 | status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta); | 176 | status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta); |
| @@ -180,13 +180,13 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr) | |||
| 180 | cpu_maps_update_begin(); | 180 | cpu_maps_update_begin(); |
| 181 | cpu_hotplug_begin(); | 181 | cpu_hotplug_begin(); |
| 182 | 182 | ||
| 183 | ret = acpi_map_lsapic(pr->handle, pr->apic_id, &pr->id); | 183 | ret = acpi_map_cpu(pr->handle, pr->phys_id, &pr->id); |
| 184 | if (ret) | 184 | if (ret) |
| 185 | goto out; | 185 | goto out; |
| 186 | 186 | ||
| 187 | ret = arch_register_cpu(pr->id); | 187 | ret = arch_register_cpu(pr->id); |
| 188 | if (ret) { | 188 | if (ret) { |
| 189 | acpi_unmap_lsapic(pr->id); | 189 | acpi_unmap_cpu(pr->id); |
| 190 | goto out; | 190 | goto out; |
| 191 | } | 191 | } |
| 192 | 192 | ||
| @@ -215,7 +215,7 @@ static int acpi_processor_get_info(struct acpi_device *device) | |||
| 215 | union acpi_object object = { 0 }; | 215 | union acpi_object object = { 0 }; |
| 216 | struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; | 216 | struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; |
| 217 | struct acpi_processor *pr = acpi_driver_data(device); | 217 | struct acpi_processor *pr = acpi_driver_data(device); |
| 218 | int apic_id, cpu_index, device_declaration = 0; | 218 | int phys_id, cpu_index, device_declaration = 0; |
| 219 | acpi_status status = AE_OK; | 219 | acpi_status status = AE_OK; |
| 220 | static int cpu0_initialized; | 220 | static int cpu0_initialized; |
| 221 | unsigned long long value; | 221 | unsigned long long value; |
| @@ -262,15 +262,18 @@ static int acpi_processor_get_info(struct acpi_device *device) | |||
| 262 | pr->acpi_id = value; | 262 | pr->acpi_id = value; |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | apic_id = acpi_get_apicid(pr->handle, device_declaration, pr->acpi_id); | 265 | phys_id = acpi_get_phys_id(pr->handle, device_declaration, pr->acpi_id); |
| 266 | if (apic_id < 0) | 266 | if (phys_id < 0) |
| 267 | acpi_handle_debug(pr->handle, "failed to get CPU APIC ID.\n"); | 267 | acpi_handle_debug(pr->handle, "failed to get CPU physical ID.\n"); |
| 268 | pr->apic_id = apic_id; | 268 | pr->phys_id = phys_id; |
| 269 | 269 | ||
| 270 | cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id); | 270 | cpu_index = acpi_map_cpuid(pr->phys_id, pr->acpi_id); |
| 271 | if (!cpu0_initialized && !acpi_has_cpu_in_madt()) { | 271 | if (!cpu0_initialized && !acpi_has_cpu_in_madt()) { |
| 272 | cpu0_initialized = 1; | 272 | cpu0_initialized = 1; |
| 273 | /* Handle UP system running SMP kernel, with no LAPIC in MADT */ | 273 | /* |
| 274 | * Handle UP system running SMP kernel, with no CPU | ||
| 275 | * entry in MADT | ||
| 276 | */ | ||
| 274 | if ((cpu_index == -1) && (num_online_cpus() == 1)) | 277 | if ((cpu_index == -1) && (num_online_cpus() == 1)) |
| 275 | cpu_index = 0; | 278 | cpu_index = 0; |
| 276 | } | 279 | } |
| @@ -458,7 +461,7 @@ static void acpi_processor_remove(struct acpi_device *device) | |||
| 458 | 461 | ||
| 459 | /* Remove the CPU. */ | 462 | /* Remove the CPU. */ |
| 460 | arch_unregister_cpu(pr->id); | 463 | arch_unregister_cpu(pr->id); |
| 461 | acpi_unmap_lsapic(pr->id); | 464 | acpi_unmap_cpu(pr->id); |
| 462 | 465 | ||
| 463 | cpu_hotplug_done(); | 466 | cpu_hotplug_done(); |
| 464 | cpu_maps_update_done(); | 467 | cpu_maps_update_done(); |
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index c2daa85fc9f7..c0d44d394ca3 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c | |||
| @@ -257,7 +257,7 @@ int acpi_bus_init_power(struct acpi_device *device) | |||
| 257 | 257 | ||
| 258 | device->power.state = ACPI_STATE_UNKNOWN; | 258 | device->power.state = ACPI_STATE_UNKNOWN; |
| 259 | if (!acpi_device_is_present(device)) | 259 | if (!acpi_device_is_present(device)) |
| 260 | return 0; | 260 | return -ENXIO; |
| 261 | 261 | ||
| 262 | result = acpi_device_get_power(device, &state); | 262 | result = acpi_device_get_power(device, &state); |
| 263 | if (result) | 263 | if (result) |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 342942f90a10..02e48394276c 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
| @@ -69,7 +69,7 @@ static int map_madt_entry(int type, u32 acpi_id) | |||
| 69 | unsigned long madt_end, entry; | 69 | unsigned long madt_end, entry; |
| 70 | static struct acpi_table_madt *madt; | 70 | static struct acpi_table_madt *madt; |
| 71 | static int read_madt; | 71 | static int read_madt; |
| 72 | int apic_id = -1; | 72 | int phys_id = -1; /* CPU hardware ID */ |
| 73 | 73 | ||
| 74 | if (!read_madt) { | 74 | if (!read_madt) { |
| 75 | if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0, | 75 | if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0, |
| @@ -79,7 +79,7 @@ static int map_madt_entry(int type, u32 acpi_id) | |||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | if (!madt) | 81 | if (!madt) |
