diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/processor_core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 015689d295c7..e48ee4f8749f 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -494,7 +494,7 @@ static int get_cpu_id(acpi_handle handle, u32 acpi_id) | |||
494 | if (apic_id == -1) | 494 | if (apic_id == -1) |
495 | return apic_id; | 495 | return apic_id; |
496 | 496 | ||
497 | for (i = 0; i < NR_CPUS; ++i) { | 497 | for_each_possible_cpu(i) { |
498 | if (cpu_physical_id(i) == apic_id) | 498 | if (cpu_physical_id(i) == apic_id) |
499 | return i; | 499 | return i; |
500 | } | 500 | } |
@@ -632,7 +632,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) | |||
632 | return 0; | 632 | return 0; |
633 | } | 633 | } |
634 | 634 | ||
635 | BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0)); | 635 | BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0)); |
636 | 636 | ||
637 | /* | 637 | /* |
638 | * Buggy BIOS check | 638 | * Buggy BIOS check |
@@ -774,7 +774,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type) | |||
774 | 774 | ||
775 | pr = acpi_driver_data(device); | 775 | pr = acpi_driver_data(device); |
776 | 776 | ||
777 | if (pr->id >= NR_CPUS) { | 777 | if (pr->id >= nr_cpu_ids) { |
778 | kfree(pr); | 778 | kfree(pr); |
779 | return 0; | 779 | return 0; |
780 | } | 780 | } |
@@ -845,7 +845,7 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) | |||
845 | if (!pr) | 845 | if (!pr) |
846 | return -ENODEV; | 846 | return -ENODEV; |
847 | 847 | ||
848 | if ((pr->id >= 0) && (pr->id < NR_CPUS)) { | 848 | if ((pr->id >= 0) && (pr->id < nr_cpu_ids)) { |
849 | kobject_uevent(&(*device)->dev.kobj, KOBJ_ONLINE); | 849 | kobject_uevent(&(*device)->dev.kobj, KOBJ_ONLINE); |
850 | } | 850 | } |
851 | return 0; | 851 | return 0; |
@@ -883,13 +883,13 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
883 | break; | 883 | break; |
884 | } | 884 | } |
885 | 885 | ||
886 | if (pr->id >= 0 && (pr->id < NR_CPUS)) { | 886 | if (pr->id >= 0 && (pr->id < nr_cpu_ids)) { |
887 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); | 887 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); |
888 | break; | 888 | break; |
889 | } | 889 | } |
890 | 890 | ||
891 | result = acpi_processor_start(device); | 891 | result = acpi_processor_start(device); |
892 | if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { | 892 | if ((!result) && ((pr->id >= 0) && (pr->id < nr_cpu_ids))) { |
893 | kobject_uevent(&device->dev.kobj, KOBJ_ONLINE); | 893 | kobject_uevent(&device->dev.kobj, KOBJ_ONLINE); |
894 | } else { | 894 | } else { |
895 | printk(KERN_ERR PREFIX "Device [%s] failed to start\n", | 895 | printk(KERN_ERR PREFIX "Device [%s] failed to start\n", |
@@ -912,7 +912,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
912 | return; | 912 | return; |
913 | } | 913 | } |
914 | 914 | ||
915 | if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) | 915 | if ((pr->id < nr_cpu_ids) && (cpu_present(pr->id))) |
916 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); | 916 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); |
917 | break; | 917 | break; |
918 | default: | 918 | default: |