Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74391
b: refs/heads/master
c: fbb43ab
h: refs/heads/master
i:
  74389: 74b4f87
  74387: 63b431b
  74383: b1c4a99
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Nov 29, 2007
1 parent b5f78af commit 42fee41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81257def2ab8ae1680583ce1e5f018dc6c8ed98d
refs/heads/master: fbb43ab03c1fa7587476910d346ee11882b4cc62
14 changes: 7 additions & 7 deletions trunk/drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ static int get_cpu_id(acpi_handle handle, u32 acpi_id)
if (apic_id == -1)
return apic_id;

for (i = 0; i < NR_CPUS; ++i) {
for_each_possible_cpu(i) {
if (cpu_physical_id(i) == apic_id)
return i;
}
Expand Down Expand Up @@ -632,7 +632,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
return 0;
}

BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0));
BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0));

/*
* Buggy BIOS check
Expand Down Expand Up @@ -774,7 +774,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type)

pr = acpi_driver_data(device);

if (pr->id >= NR_CPUS) {
if (pr->id >= nr_cpu_ids) {
kfree(pr);
return 0;
}
Expand Down Expand Up @@ -845,7 +845,7 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
if (!pr)
return -ENODEV;

if ((pr->id >= 0) && (pr->id < NR_CPUS)) {
if ((pr->id >= 0) && (pr->id < nr_cpu_ids)) {
kobject_uevent(&(*device)->dev.kobj, KOBJ_ONLINE);
}
return 0;
Expand Down Expand Up @@ -883,13 +883,13 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
break;
}

if (pr->id >= 0 && (pr->id < NR_CPUS)) {
if (pr->id >= 0 && (pr->id < nr_cpu_ids)) {
kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
break;
}

result = acpi_processor_start(device);
if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) {
if ((!result) && ((pr->id >= 0) && (pr->id < nr_cpu_ids))) {
kobject_uevent(&device->dev.kobj, KOBJ_ONLINE);
} else {
printk(KERN_ERR PREFIX "Device [%s] failed to start\n",
Expand All @@ -912,7 +912,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
return;
}

if ((pr->id < NR_CPUS) && (cpu_present(pr->id)))
if ((pr->id < nr_cpu_ids) && (cpu_present(pr->id)))
kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
break;
default:
Expand Down

0 comments on commit 42fee41

Please sign in to comment.