summaryrefslogtreecommitdiff
path: root/events/evgpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'events/evgpe.c')
-rw-r--r--events/evgpe.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/events/evgpe.c b/events/evgpe.c
index d86723bf63186..c4326c721bc34 100644
--- a/events/evgpe.c
+++ b/events/evgpe.c
@@ -422,6 +422,16 @@ AcpiEvGpeDetect (
GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
+ /*
+ * Optimization: If there are no GPEs enabled within this
+ * register, we can safely ignore the entire register.
+ */
+ if (!(GpeRegisterInfo->EnableForRun |
+ GpeRegisterInfo->EnableForWake))
+ {
+ continue;
+ }
+
/* Read the Status Register */
Status = AcpiHwRead (&StatusReg, &GpeRegisterInfo->StatusAddress);