linux/include/acpi
Rafael J. Wysocki 7b98118aaa ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines
There are two different interfaces for queuing up work items on the
ACPI hotplug workqueue, alloc_acpi_hp_work() used by PCI and PCI host
bridge hotplug code and acpi_os_hotplug_execute() used by the common
ACPI hotplug code and docking stations.  They both are somewhat
cumbersome to use and work slightly differently.

The users of alloc_acpi_hp_work() have to submit a work function that
will extract the necessary data items from a struct acpi_hp_work
object allocated by alloc_acpi_hp_work() and then will free that
object, while it would be more straightforward to simply use a work
function with one more argument and let the interface take care of
the execution details.

The users of acpi_os_hotplug_execute() also have to deal with the
fact that it takes only one argument in addition to the work function
pointer, although acpi_os_execute_deferred() actually takes care of
the allocation and freeing of memory, so it would have been able to
pass more arguments to the work function if it hadn't been
constrained by the connection with acpi_os_execute().

Moreover, while alloc_acpi_hp_work() makes GFP_KERNEL memory
allocations, which is correct, because hotplug work items are
always queued up from process context, acpi_os_hotplug_execute()
uses GFP_ATOMIC, as that is needed by acpi_os_execute().  Also,
acpi_os_execute_deferred() queued up by it waits for the ACPI event
workqueues to flush before executing the work function, whereas
alloc_acpi_hp_work() can't do anything similar.  That leads to
somewhat arbitrary differences in behavior between various ACPI
hotplug code paths and has to be straightened up.

For this reason, replace both alloc_acpi_hp_work() and
acpi_os_hotplug_execute() with a single interface,
acpi_hotplug_execute(), combining their behavior and being more
friendly to its users than any of the two.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2013-11-07 19:28:48 +01:00
..
platform ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acbuffer.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acconfig.h ACPICA: Add argument typechecking for all predefined ACPI names 2013-06-01 21:54:30 +02:00
acexcep.h ACPICA: Add exception descriptions to exception info table 2013-03-12 00:45:05 +01:00
acnames.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acoutput.h ACPICA: Remove unused macros, no functional change 2013-06-01 21:54:31 +02:00
acpi_bus.h ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines 2013-11-07 19:28:48 +01:00
acpi_drivers.h ACPI / dock / PCI: Drop ACPI dock notifier chain 2013-07-15 01:33:12 +02:00
acpi_numa.h ACPI: Store SRAT table revision 2012-01-17 04:19:04 -05:00
acpi.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
acpiosxf.h ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines 2013-11-07 19:28:48 +01:00
acpixf.h ACPICA: Update version to 20130725. 2013-08-13 13:14:16 +02:00
acrestyp.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
actbl1.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
actbl2.h ACPICA: iASL/Disassembler: Add support for MTMR table 2013-03-12 00:45:04 +01:00
actbl3.h ACPICA: Remove trailing comma in enum declarations 2013-03-12 00:45:05 +01:00
actbl.h ACPICA: Update ACPICA copyrights to 2013 2013-01-25 13:30:47 +01:00
actypes.h ACPICA: Fix divergences of the commit - ACPICA: Expose OSI version. 2013-08-13 13:13:09 +02:00
apei.h module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
button.h ACPI: make ACPI button funcs no-ops if not built in 2009-09-17 14:48:23 -07:00
ghes.h ghes: add the needed hooks for EDAC error report 2013-02-25 19:41:51 -03:00
hed.h ACPI Hardware Error Device (PNP0C33) support 2010-05-19 22:40:24 -04:00
pdc_intel.h ACPI: Enable bit 11 in _PDC to advertise hw coord 2009-02-07 00:41:14 -05:00
processor.h ACPI / processor: Use common hotplug infrastructure 2013-05-12 14:14:32 +02:00
reboot.h Add the ability to reset the machine using the RESET_REG in ACPI's FADT table. 2008-07-16 23:27:08 +02:00
video.h Revert "ACPI / video / i915: No ACPI backlight if firmware expects Windows 8" 2013-07-26 14:59:20 +02:00