X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Facpi%2Fprocessor_core.c;h=e944aaee4e064e30aa7a65e2a9249a681f463f0a;hb=6db602d447fb6c3aeb020c5dff5219de317f8bb4;hp=e1ca86dfdd661fa2a53fbf78d3207296795ea165;hpb=2d896c780db9cda5dc102bf7a0a2cd4394c1342e;p=linux-2.6-omap-h63xx.git diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index e1ca86dfdd6..e944aaee4e0 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -66,6 +66,7 @@ #define ACPI_PROCESSOR_FILE_LIMIT "limit" #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 +#define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 #define ACPI_PROCESSOR_LIMIT_USER 0 #define ACPI_PROCESSOR_LIMIT_THERMAL 1 @@ -84,11 +85,19 @@ static int acpi_processor_info_open_fs(struct inode *inode, struct file *file); static void acpi_processor_notify(acpi_handle handle, u32 event, void *data); static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu); static int acpi_processor_handle_eject(struct acpi_processor *pr); +extern int acpi_processor_tstate_has_changed(struct acpi_processor *pr); + + +static const struct acpi_device_id processor_device_ids[] = { + {ACPI_PROCESSOR_HID, 0}, + {"", 0}, +}; +MODULE_DEVICE_TABLE(acpi, processor_device_ids); static struct acpi_driver acpi_processor_driver = { .name = "processor", .class = ACPI_PROCESSOR_CLASS, - .ids = ACPI_PROCESSOR_HID, + .ids = processor_device_ids, .ops = { .add = acpi_processor_add, .remove = acpi_processor_remove, @@ -689,13 +698,23 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) switch (event) { case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: acpi_processor_ppc_has_changed(pr); - acpi_bus_generate_event(device, event, + acpi_bus_generate_proc_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); break; case ACPI_PROCESSOR_NOTIFY_POWER: acpi_processor_cst_has_changed(pr); - acpi_bus_generate_event(device, event, 0); + acpi_bus_generate_proc_event(device, event, 0); + acpi_bus_generate_netlink_event(device->pnp.device_class, + device->dev.bus_id, event, 0); break; + case ACPI_PROCESSOR_NOTIFY_THROTTLING: + acpi_processor_tstate_has_changed(pr); + acpi_bus_generate_proc_event(device, event, 0); + acpi_bus_generate_netlink_event(device->pnp.device_class, + device->dev.bus_id, event, 0); default: ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unsupported event [0x%x]\n", event));