diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-08-29 03:30:41 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-08-29 03:31:47 -0400 |
| commit | eebc57f73d42095b778e899f6aa90ad050c72655 (patch) | |
| tree | 2ba80c75e9284093e6d7606dbb1b6a4bb752a2a5 /drivers/acpi/osl.c | |
| parent | d3a247bfb2c26f5b67367d58af7ad8c2efbbc6c1 (diff) | |
| parent | 2a4ab640d3c28c2952967e5f63ea495555bf2a5f (diff) | |
Merge branch 'for-ingo' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6 into x86/apic
Merge reason: the SFI (Simple Firmware Interface) feature in the ACPI
tree needs this cleanup, pull it into the APIC branch as
well so that there's no interactions.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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) | |||
| 189 | return AE_OK; | 189 | return AE_OK; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | static void bind_to_cpu0(struct work_struct *work) | ||
| 193 | { | ||
| 194 | set_cpus_allowed(current, cpumask_of_cpu(0)); | ||
| 195 | kfree(work); | ||
| 196 | } | ||
| 197 | |||
| 198 | static void bind_workqueue(struct workqueue_struct *wq) | ||
| 199 | { | ||
| 200 | struct work_struct *work; | ||
| 201 | |||
| 202 | work = kzalloc(sizeof(struct work_struct), GFP_KERNEL); | ||
| 203 | INIT_WORK(work, bind_to_cpu0); | ||
| 204 | queue_work(wq, work); | ||
| 205 | } | ||
| 206 | |||
| 192 | acpi_status acpi_os_initialize1(void) | 207 | acpi_status acpi_os_initialize1(void) |
| 193 | { | 208 | { |
| 209 | /* | ||
| 210 | * On some machines, a software-initiated SMI causes corruption unless | ||
| 211 | * the SMI runs on CPU 0. An SMI can be initiated by any AML, but | ||
| 212 | * typically it's done in GPE-related methods that are run via | ||
| 213 | * workqueues, so we can avoid the known corruption cases by binding | ||
| 214 | * the workqueues to CPU 0. | ||
| 215 | */ | ||
| 194 | kacpid_wq = create_singlethread_workqueue("kacpid"); | 216 | kacpid_wq = create_singlethread_workqueue("kacpid"); |
| 217 | bind_workqueue(kacpid_wq); | ||
| 195 | kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify"); | 218 | kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify"); |
| 219 | bind_workqueue(kacpi_notify_wq); | ||
| 196 | kacpi_hotplug_wq = create_singlethread_workqueue("kacpi_hotplug"); | 220 | kacpi_hotplug_wq = create_singlethread_workqueue("kacpi_hotplug"); |
| 221 | bind_workqueue(kacpi_hotplug_wq); | ||
| 197 | BUG_ON(!kacpid_wq); | 222 | BUG_ON(!kacpid_wq); |
| 198 | BUG_ON(!kacpi_notify_wq); | 223 | BUG_ON(!kacpi_notify_wq); |
| 199 | BUG_ON(!kacpi_hotplug_wq); | 224 | BUG_ON(!kacpi_hotplug_wq); |
