ACPI_MODULE_NAME("processor");
+DEFINE_PER_CPU(struct acpi_processor *, processors);
+EXPORT_PER_CPU_SYMBOL(processors);
+
/* --------------------------------------------------------------------------
Errata Handling
-------------------------------------------------------------------------- */
* checks.
*/
per_cpu(processor_device_array, pr->id) = device;
+ per_cpu(processors, pr->id) = pr;
dev = get_cpu_device(pr->id);
ACPI_HANDLE_SET(dev, pr->handle);
err:
free_cpumask_var(pr->throttling.shared_cpu_map);
device->driver_data = NULL;
+ per_cpu(processors, pr->id) = NULL;
err_free_pr:
kfree(pr);
return result;
/* Clean up. */
per_cpu(processor_device_array, pr->id) = NULL;
+ per_cpu(processors, pr->id) = NULL;
try_offline_node(cpu_to_node(pr->id));
/* Remove the CPU. */
.remove = acpi_processor_stop,
};
-DEFINE_PER_CPU(struct acpi_processor *, processors);
-EXPORT_PER_CPU_SYMBOL(processors);
-
static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
{
struct acpi_device *device = data;
thermal_cooling_device_unregister(pr->cdev);
pr->cdev = NULL;
}
-
- per_cpu(processors, pr->id) = NULL;
return 0;
}