• Lv Zheng's avatar
    ACPICA: Events: Introduce acpi_set_gpe()/acpi_finish_gpe() to reduce divergences · eb3d80f7
    Lv Zheng authored
    This can help to reduce source code differences between Linux and ACPICA
    upstream. Further driver cleanups also require these APIs to eliminate GPE
    storms.
    1. acpi_set_gpe(): An API that driver should invoke in the case it wants
                       to disable/enable IRQ without honoring the reference
                       count implemented in the acpi_disable_gpe() and
                       acpi_enable_gpe(). Note that this API should only be
                       invoked inside a acpi_enable_gpe()/acpi_disable_gpe()
                       pair.
    2. acpi_finish_gpe(): Drivers returned ACPI_REENABLE_GPE unset from the
                          GPE handler should use this API instead of
                          invoking acpi_set_gpe()/acpi_enable_gpe() to
                          re-enable the GPE.
    The GPE APIs can be invoked inside of a GPE handler or in the task context
    with a driver provided lock held. This driver provided lock is safe to be
    held in the GPE handler by the driver.
    Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    eb3d80f7
evxfgpe.c 26.7 KB