ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking mechanism
authorLv Zheng <lv.zheng@intel.com>
Thu, 4 Aug 2016 08:43:39 +0000 (16:43 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 13 Aug 2016 01:09:33 +0000 (03:09 +0200)
commit2af52c2bd20c50e80b121e15cd50a579e364485a
tree3bc9e680c4c65462569794ce2ce5c269d2767c38
parent9556ec4ec1d3575090f1f110c558169c5f0973a9
ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking mechanism

ACPICA commit 23a417ca406a527e7ae1710893e59a8b6db30e14

There is a facility in Linux, developers can control the enabling/disabling
of a GPE via /sys/firmware/acpi/interrupts/gpexx. This is mainly for
debugging purposes.

But many users expect to use this facility to implement quirks to mask a
specific GPE when there is a gap in Linux causing this GPE to flood. This
is not working correctly because currently this facility invokes
enabling/disabling counting based GPE driver APIs:
 acpi_enable_gpe()/acpi_disable_gpe()
and the GPE drivers can still affect the count to mess up the GPE
masking purposes.

However, most of the IRQ chip designs allow masking/unmasking IRQs via a
masking bit which is different from the enabled bit to achieve the same
purpose. But the GPE hardware doesn't contain such a feature, this brings
the trouble.

In this patch, we introduce a software mechanism to implement the GPE
masking feature, and acpi_mask_gpe() are provided to the OSPMs to
mask/unmask GPEs in the above mentioned situation instead of
acpi_enable_gpe()/acpi_disable_gpe(). ACPICA BZ 1102. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/23a417ca
Link: https://bugs.acpica.org/show_bug.cgi?id=1102
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/acevents.h
drivers/acpi/acpica/aclocal.h
drivers/acpi/acpica/evgpe.c
drivers/acpi/acpica/evxfgpe.c
drivers/acpi/acpica/hwgpe.c
include/acpi/acpixf.h
include/acpi/actypes.h