diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-15 13:00:02 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-15 13:00:02 +0900 |
commit | 4b6b987969b076298485697bfb0d0e35502642a3 (patch) | |
tree | a8f5ebd6a0b9efbe30272012d759669b0c5ddc13 /drivers/acpi/osl.c | |
parent | df47cd096c8f54a5242e3a2ffb4525c804567eda (diff) | |
parent | 60e0a4c7adc700f2d2929cdb2d0055e519a3eb3d (diff) | |
download | blackbird-op-linux-4b6b987969b076298485697bfb0d0e35502642a3.tar.gz blackbird-op-linux-4b6b987969b076298485697bfb0d0e35502642a3.zip |
Merge branch 'master' into sh/hwblk
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 71670719d61a..5691f165a952 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -189,11 +189,36 @@ acpi_status __init acpi_os_initialize(void) return AE_OK; } +static void bind_to_cpu0(struct work_struct *work) +{ + set_cpus_allowed(current, cpumask_of_cpu(0)); + kfree(work); +} + +static void bind_workqueue(struct workqueue_struct *wq) +{ + struct work_struct *work; + + work = kzalloc(sizeof(struct work_struct), GFP_KERNEL); + INIT_WORK(work, bind_to_cpu0); + queue_work(wq, work); +} + acpi_status acpi_os_initialize1(void) { + /* + * On some machines, a software-initiated SMI causes corruption unless + * the SMI runs on CPU 0. An SMI can be initiated by any AML, but + * typically it's done in GPE-related methods that are run via + * workqueues, so we can avoid the known corruption cases by binding + * the workqueues to CPU 0. + */ kacpid_wq = create_singlethread_workqueue("kacpid"); + bind_workqueue(kacpid_wq); kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify"); + bind_workqueue(kacpi_notify_wq); kacpi_hotplug_wq = create_singlethread_workqueue("kacpi_hotplug"); + bind_workqueue(kacpi_hotplug_wq); BUG_ON(!kacpid_wq); BUG_ON(!kacpi_notify_wq); BUG_ON(!kacpi_hotplug_wq); |