Merge branch 'acpica'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 1 Apr 2014 20:09:26 +0000 (22:09 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 1 Apr 2014 20:09:26 +0000 (22:09 +0200)
* acpica:
  ACPICA: Enable auto-serialization as a default kernel behavior.
  ACPICA: Ignore sync_level for methods that have been auto-serialized.
  ACPICA: Add additional named objects for the auto-serialize method scan.
  ACPICA: Add auto-serialization support for ill-behaved control methods.
  ACPICA: Remove global option to serialize all control methods.

1  2 
drivers/acpi/osl.c
include/acpi/acpixf.h

diff --combined drivers/acpi/osl.c
@@@ -52,7 -52,7 +52,7 @@@
  
  #define _COMPONENT            ACPI_OS_SERVICES
  ACPI_MODULE_NAME("osl");
 -#define PREFIX                "ACPI: "
 +
  struct acpi_os_dpc {
        acpi_osd_exec_callback function;
        void *context;
@@@ -1168,7 -1168,8 +1168,7 @@@ void acpi_os_wait_events_complete(void
  
  struct acpi_hp_work {
        struct work_struct work;
 -      acpi_hp_callback func;
 -      void *data;
 +      struct acpi_device *adev;
        u32 src;
  };
  
@@@ -1177,24 -1178,25 +1177,24 @@@ static void acpi_hotplug_work_fn(struc
        struct acpi_hp_work *hpw = container_of(work, struct acpi_hp_work, work);
  
        acpi_os_wait_events_complete();
 -      hpw->func(hpw->data, hpw->src);
 +      acpi_device_hotplug(hpw->adev, hpw->src);
        kfree(hpw);
  }
  
 -acpi_status acpi_hotplug_execute(acpi_hp_callback func, void *data, u32 src)
 +acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src)
  {
        struct acpi_hp_work *hpw;
  
        ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
 -                "Scheduling function [%p(%p, %u)] for deferred execution.\n",
 -                func, data, src));
 +                "Scheduling hotplug event (%p, %u) for deferred execution.\n",
 +                adev, src));
  
        hpw = kmalloc(sizeof(*hpw), GFP_KERNEL);
        if (!hpw)
                return AE_NO_MEMORY;
  
        INIT_WORK(&hpw->work, acpi_hotplug_work_fn);
 -      hpw->func = func;
 -      hpw->data = data;
 +      hpw->adev = adev;
        hpw->src = src;
        /*
         * We can't run hotplug code in kacpid_wq/kacpid_notify_wq etc., because
@@@ -1537,17 -1539,21 +1537,21 @@@ static int __init osi_setup(char *str
  
  __setup("acpi_osi=", osi_setup);
  
- /* enable serialization to combat AE_ALREADY_EXISTS errors */
- static int __init acpi_serialize_setup(char *str)
+ /*
+  * Disable the auto-serialization of named objects creation methods.
+  *
+  * This feature is enabled by default.  It marks the AML control methods
+  * that contain the opcodes to create named objects as "Serialized".
+  */
+ static int __init acpi_no_auto_serialize_setup(char *str)
  {
-       printk(KERN_INFO PREFIX "serialize enabled\n");
-       acpi_gbl_all_methods_serialized = TRUE;
+       acpi_gbl_auto_serialize_methods = FALSE;
+       pr_info("ACPI: auto-serialization disabled\n");
  
        return 1;
  }
  
- __setup("acpi_serialize", acpi_serialize_setup);
+ __setup("acpi_no_auto_serialize", acpi_no_auto_serialize_setup);
  
  /* Check of resource interference between native drivers and ACPI
   * OperationRegions (SystemIO and System Memory only).
diff --combined include/acpi/acpixf.h
@@@ -71,7 -71,7 +71,7 @@@ extern u32 acpi_dbg_layer
  
  /* ACPICA runtime options */
  
- extern u8 acpi_gbl_all_methods_serialized;
+ extern u8 acpi_gbl_auto_serialize_methods;
  extern u8 acpi_gbl_copy_dsdt_locally;
  extern u8 acpi_gbl_create_osi_method;
  extern u8 acpi_gbl_disable_auto_repair;
@@@ -229,10 -229,6 +229,10 @@@ acpi_attach_data(acpi_handle object, ac
  
  acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler);
  
 +acpi_status
 +acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
 +                 void (*callback)(void *));
 +
  acpi_status
  acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data);