- /*
- * We don't care about error returns - we just try to mark
- * these reserved so that nobody else is confused into thinking
- * that this region might be unused..
- *
- * (In particular, allocating the IO range for Cardbus)
- */
- request_region(pr->throttling.address, 6, "ACPI CPU throttle");
- }
-
-#ifdef CONFIG_CPU_FREQ
- acpi_processor_ppc_has_changed(pr);
-#endif
- acpi_processor_get_throttling_info(pr);
- acpi_processor_get_limit_info(pr);
-
- return 0;
-}
-
-static void *processor_device_array[NR_CPUS];
-
-static int __cpuinit acpi_processor_start(struct acpi_device *device)
-{
- int result = 0;
- acpi_status status = AE_OK;
- struct acpi_processor *pr;
-
-
- pr = acpi_driver_data(device);
-
- result = acpi_processor_get_info(pr, device->flags.unique_id);
- if (result) {
- /* Processor is physically not present */
- return 0;
- }
-
- BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0));
-
- /*
- * Buggy BIOS check
- * ACPI id of processors can be reported wrongly by the BIOS.
- * Don't trust it blindly
- */
- if (processor_device_array[pr->id] != NULL &&
- processor_device_array[pr->id] != device) {
- printk(KERN_WARNING "BIOS reported wrong ACPI id"
- "for the processor\n");
- return -ENODEV;
- }
- processor_device_array[pr->id] = device;
-
- processors[pr->id] = pr;
-
- result = acpi_processor_add_fs(device);
- if (result)
- goto end;
-
- status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
- acpi_processor_notify, pr);
-
- /* _PDC call should be done before doing anything else (if reqd.). */
- arch_acpi_processor_init_pdc(pr);
- acpi_processor_set_pdc(pr);
-
- acpi_processor_power_init(pr, device);
-
- if (pr->flags.throttling) {
- printk(KERN_INFO PREFIX "%s [%s] (supports",
- acpi_device_name(device), acpi_device_bid(device));
- printk(" %d throttling states", pr->throttling.state_count);
- printk(")\n");
- }
-
- end:
-
- return result;
-}
-
-static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
-{
- struct acpi_processor *pr = data;
- struct acpi_device *device = NULL;
-
-
- if (!pr)
- return;
-
- if (acpi_bus_get_device(pr->handle, &device))
- return;
-
- switch (event) {
- case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
- acpi_processor_ppc_has_changed(pr);
- acpi_bus_generate_event(device, event,
- pr->performance_platform_limit);
- acpi_bus_generate_netlink_event(device->pnp.device_class,
- device->dev.bus_id, event,
- pr->performance_platform_limit);