linux/drivers/acpi/acpica
Rafael J. Wysocki e8b6f97010 ACPICA: Introduce acpi_gpe_wakeup()
ACPICA uses reference counters to avoid disabling GPEs too early in
case they have been enabled for many times.  This is done separately
for runtime and for wakeup, but the wakeup GPE reference counter is
not really necessary, because GPEs are only enabled to wake up the
system at the hardware level by acpi_enter_sleep_state().  Thus it
only is necessary to set the corresponding bits in the wakeup enable
masks of these GPEs' registers right before the system enters a sleep
state.  Moreover, the GPE wakeup enable bits can only be set when the
target sleep state of the system is known and they need to be cleared
immediately after wakeup regardless of how many wakeup devices are
associated with a given GPE.

On the basis of the above observations, introduce function
acpi_gpe_wakeup() to be used for setting or clearing the enable bit
corresponding to a given GPE in its enable register's enable_for_wake
mask.  Modify the ACPI suspend and wakeup code the use
acpi_gpe_wakeup() instead of acpi_{enable|disable}_gpe() to set
and clear GPE enable bits in their registers' enable_for_wake masks
during system transitions to a sleep state and back to the working
state, respectively.  [This will allow us to drop the third
argument of acpi_{enable|disable}_gpe() and simplify the GPE
handling code.]

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2010-07-06 22:34:26 -04:00
..
Makefile ACPICA: Split large file, evgpeblk 2010-05-06 03:05:54 -04:00
accommon.h ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
acconfig.h ACPICA: Limit maximum time for Sleep() operator 2010-06-12 00:55:17 -04:00
acdebug.h ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
acdispat.h ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
acevents.h Merge branch 'gpe-regression-fixes' into release 2010-06-12 00:51:49 -04:00
acglobal.h ACPICA: Truncate I/O addresses to 16 bits for Windows compatibility 2010-06-12 00:55:50 -04:00
achware.h ACPICA: Rename acpi_hw_gpe_register_bit 2010-07-06 22:34:26 -04:00
acinterp.h ACPICA: Rename acpi_ex_system_do_suspend->acpi_ex_system_do_sleep 2010-05-06 03:05:54 -04:00
aclocal.h ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
acmacros.h ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type 2010-01-22 12:30:06 -05:00
acnamesp.h ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
acobject.h ACPICA: Update flags for operand object 2010-07-06 22:33:56 -04:00
acopcode.h ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
acparser.h ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
acpredef.h ACPICA: iASL/Core: Add support for _WDG/_WED MS methods 2010-07-06 22:33:55 -04:00
acresrc.h ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
acstruct.h ACPICA: Expand device initialization counters to 32 bits 2010-07-06 22:33:56 -04:00
actables.h ACPICA: Update DSDT copy/detection. 2010-04-20 10:43:16 -04:00
acutils.h ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type 2010-01-22 12:30:06 -05:00
amlcode.h ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
amlresrc.h ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
dsfield.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
dsinit.c ACPICA: Expand initialization counters to 32 bits 2010-07-06 22:33:55 -04:00
dsmethod.c ACPICA: Optimization: Reduce the number of namespace walks 2010-07-06 22:33:57 -04:00
dsmthdat.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
dsobject.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
dsopcode.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
dsutils.c ACPICA: Core: Replace all %d format specifiers with %u (unsigned) 2010-07-06 22:33:55 -04:00
dswexec.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
dswload.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
dswscope.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
dswstate.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
evevent.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
evgpe.c ACPICA: Rename acpi_hw_gpe_register_bit 2010-07-06 22:34:26 -04:00
evgpeblk.c Merge branch 'gpe-regression-fixes' into release 2010-06-12 00:51:49 -04:00
evgpeinit.c ACPICA: Split large file, evgpeblk 2010-05-06 03:05:54 -04:00
evgpeutil.c ACPICA: Split large file, evgpeblk 2010-05-06 03:05:54 -04:00
evmisc.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
evregion.c ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type 2010-01-22 12:30:06 -05:00
evrgnini.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
evsci.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
evxface.c ACPI / ACPICA: Do not attempt to disable GPE when installing handler 2010-06-11 18:40:43 -04:00
evxfevnt.c ACPICA: Introduce acpi_gpe_wakeup() 2010-07-06 22:34:26 -04:00
evxfregn.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
exconfig.c ACPICA: Add GPE support for dynamically loaded ACPI tables 2010-05-06 03:05:54 -04:00
exconvrt.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
excreate.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exdebug.c ACPICA: Enhance configuration for output of AML Debug Object 2010-04-20 10:42:49 -04:00
exdump.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
exfield.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exfldio.c ACPICA: Core: Replace all %d format specifiers with %u (unsigned) 2010-07-06 22:33:55 -04:00
exmisc.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exmutex.c ACPICA: Update comments/headers, no functional change 2010-04-20 10:43:15 -04:00
exnames.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exoparg1.c ACPICA: Rename acpi_ex_system_do_suspend->acpi_ex_system_do_sleep 2010-05-06 03:05:54 -04:00
exoparg2.c ACPICA: Minimize the differences between linux GPE code and ACPICA code base 2010-04-20 10:43:16 -04:00
exoparg3.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exoparg6.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exprep.c ACPICA: Update flags for operand object 2010-07-06 22:33:56 -04:00
exregion.c ACPICA: Core: Replace all %d format specifiers with %u (unsigned) 2010-07-06 22:33:55 -04:00
exresnte.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exresolv.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exresop.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exstore.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
exstoren.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
exstorob.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
exsystem.c ACPICA: Limit maximum time for Sleep() operator 2010-06-12 00:55:17 -04:00
exutils.c ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type 2010-01-22 12:30:06 -05:00
hwacpi.c ACPICA: simplify SCI_EN workaround 2010-05-12 00:37:59 -04:00
hwgpe.c ACPICA: Rename acpi_hw_gpe_register_bit 2010-07-06 22:34:26 -04:00
hwregs.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
hwsleep.c ACPICA: Core: Replace all %d format specifiers with %u (unsigned) 2010-07-06 22:33:55 -04:00
hwtimer.c ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type 2010-01-22 12:30:06 -05:00
hwvalid.c ACPICA: Truncate I/O addresses to 16 bits for Windows compatibility 2010-06-12 00:55:50 -04:00
hwxface.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
nsaccess.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
nsalloc.c ACPICA: Optimization: Reduce the number of namespace walks 2010-07-06 22:33:57 -04:00
nsdump.c ACPICA: Core: Replace all %d format specifiers with %u (unsigned) 2010-07-06 22:33:55 -04:00
nsdumpdv.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
nseval.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
nsinit.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
nsload.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
nsnames.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
nsobject.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
nsparse.c ACPICA: Core: Replace all %d format specifiers with %u (unsigned) 2010-07-06 22:33:55 -04:00
nspredef.c ACPICA: Predefined name repair: fix NULL package elements 2010-01-22 12:30:06 -05:00
nsrepair.c ACPICA: Predefined name repair: fix NULL package elements 2010-01-22 12:30:06 -05:00
nsrepair2.c ACPICA: Add comment: _BCL cannot be sorted on the fly 2010-07-06 22:33:54 -04:00
nssearch.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
nsutils.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
nswalk.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
nsxfeval.c ACPICA: AcpiGetDevices: Eliminate unnecessary _STA calls 2010-01-22 12:30:05 -05:00
nsxfname.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
nsxfobj.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
psargs.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
psloop.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
psopcode.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
psparse.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
psscope.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
pstree.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
psutils.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
pswalk.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
psxface.c ACPICA: Add subsystem option to force copy of DSDT to local memory 2010-04-20 10:43:16 -04:00
rsaddr.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
rscalc.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
rscreate.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
rsdump.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
rsinfo.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
rsio.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
rsirq.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
rslist.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
rsmemory.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
rsmisc.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
rsutils.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
rsxface.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
tbfadt.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
tbfind.c ACPICA: Clarify/rename some root table descriptor fields 2010-05-06 03:05:54 -04:00
tbinstal.c ACPICA: Clarify/rename some root table descriptor fields 2010-05-06 03:05:54 -04:00
tbutils.c ACPICA: Clarify/rename some root table descriptor fields 2010-05-06 03:05:54 -04:00
tbxface.c ACPICA: Clarify/rename some root table descriptor fields 2010-05-06 03:05:54 -04:00
tbxfroot.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
utalloc.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
utcopy.c ACPICA: Prevent possible allocation overrun during object copy 2010-05-06 03:05:54 -04:00
utdebug.c ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type 2010-01-22 12:30:06 -05:00
utdelete.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
uteval.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
utglobal.c ACPICA: Performance enhancement for namespace search and access 2010-07-06 22:33:56 -04:00
utids.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
utinit.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
utlock.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
utmath.c ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type 2010-01-22 12:30:06 -05:00
utmisc.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
utmutex.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
utobject.c ACPICA: Standardize integer output for ACPICA warnings/errors 2010-04-20 10:42:52 -04:00
utresrc.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
utstate.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00
utxface.c ACPICA: Update all ACPICA copyrights and signons to 2010 2010-01-22 12:30:05 -05:00