aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-06-08 10:49:45 +0200
committerLen Brown <len.brown@intel.com>2010-06-12 00:45:05 -0400
commitc9a8bbb7704cbf515c0fc68970abbe4e91d68521 (patch)
treeae4fbfdd9bde46ba24f761e9fca8d3a3fdbe623e /include
parentfd247447c1d94a79d5cfc647430784306b3a8323 (diff)
ACPI / ACPICA: Avoid writing full enable masks to GPE registers
ACPICA uses acpi_hw_write_gpe_enable_reg() to re-enable a GPE after an event signaled by it has been handled. However, this function writes the entire GPE enable mask to the GPE's enable register which may not be correct. Namely, if one of the other GPEs in the same register was previously enabled by acpi_enable_gpe() and subsequently disabled using acpi_set_gpe(), acpi_hw_write_gpe_enable_reg() will re-enable it along with the target GPE. To fix this issue rework acpi_hw_write_gpe_enable_reg() so that it calls acpi_hw_low_set_gpe() with a special action value, ACPI_GPE_COND_ENABLE, that will make it only enable the GPE if the corresponding bit in its register's enable_for_run mask is set. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/actypes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 6881f5b7b7b..15a4c68fad3 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -667,6 +667,7 @@ typedef u32 acpi_event_status;
#define ACPI_GPE_ENABLE 0
#define ACPI_GPE_DISABLE 1
+#define ACPI_GPE_COND_ENABLE 2
/* gpe_types for acpi_enable_gpe and acpi_disable_gpe */