The patch didn't apply properly automatically: it was rejected because the context was incorrect. I've tried adding it manually by using vi. We'll see what happens when I recompile the kernel but I'm not so hopeful.
Here's the diff I ended up with: osl.c is the linux kernel src for Ubuntu as of 2.6.24-24 osl.c.new is what I created manually after applying your proposed patch.
diff osl.c osl.c.new
183c183
< acpi_status acpi_os_initialize1(void)
---
> static void bind_to_cpu0(struct work_struct *work)
185,197c185,215
< /*
< * Initialize PCI configuration space access, as we'll need to access
< * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
< */
< if (!raw_pci_ops) {
< printk(KERN_ERR PREFIX
< "Access to PCI configuration space unavailable\n");
< return AE_NULL_ENTRY;
< }
< kacpid_wq = create_singlethread_workqueue("kacpid");
< kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify");
< BUG_ON(!kacpid_wq);
< BUG_ON(!kacpi_notify_wq);
---
> 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);
The patch didn't apply properly automatically: it was rejected because the context was incorrect. I've tried adding it manually by using vi. We'll see what happens when I recompile the kernel but I'm not so hopeful.
Here's the diff I ended up with: osl.c is the linux kernel src for Ubuntu as of 2.6.24-24 osl.c.new is what I created manually after applying your proposed patch.
diff osl.c osl.c.new initialize1( void) singlethread_ workqueue( "kacpid" ); singlethread_ workqueue( "kacpi_ notify" ); !kacpi_ notify_ wq); allowed( current, cpumask_of_cpu(0)); struct workqueue_struct *wq) sizeof( struct work_struct), GFP_KERNEL); initialize1( void) singlethread_ workqueue( "kacpid" ); kacpid_ wq); singlethread_ workqueue( "kacpi_ notify" ); kacpi_notify_ wq); singlethread_ workqueue( "kacpi_ hotplug" ); kacpi_hotplug_ wq); !kacpi_ notify_ wq); !kacpi_ hotplug_ wq);
183c183
< acpi_status acpi_os_
---
> static void bind_to_cpu0(struct work_struct *work)
185,197c185,215
< /*
< * Initialize PCI configuration space access, as we'll need to access
< * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
< */
< if (!raw_pci_ops) {
< printk(KERN_ERR PREFIX
< "Access to PCI configuration space unavailable\n");
< return AE_NULL_ENTRY;
< }
< kacpid_wq = create_
< kacpi_notify_wq = create_
< BUG_ON(!kacpid_wq);
< BUG_ON(
---
> set_cpus_
> kfree(work);
> }
>
> static void bind_workqueue(
> {
> struct work_struct *work;
>
> work = kzalloc(
> INIT_WORK(work, bind_to_cpu0);
> queue_work(wq, work);
> }
>
> acpi_status acpi_os_
> {
> /*
> * 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_
> bind_workqueue(
> kacpi_notify_wq = create_
> bind_workqueue(
> kacpi_hotplug_wq = create_
> bind_workqueue(
> BUG_ON(!kacpid_wq);
> BUG_ON(
> BUG_ON(