lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 Feb 2020 18:30:06 +0530
From:   Maulik Shah <mkshah@...eaurora.org>
To:     swboyd@...omium.org, mka@...omium.org, evgreen@...omium.org,
        bjorn.andersson@...aro.org
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        agross@...nel.org, linus.walleij@...aro.org, tglx@...utronix.de,
        dianders@...omium.org, rnayak@...eaurora.org, ilina@...eaurora.org,
        lsrao@...eaurora.org, Maulik Shah <mkshah@...eaurora.org>
Subject: [RFC 0/2] pdc: Introduce irq_set_wake call

irqchip: qcom: pdc: Introduce irq_set_wake call

Some drivers using gpio interrupts want to configure gpio for wakeup using
enable_irq_wake() but during suspend entry disables irq and expects system
to resume when interrupt occurs. In the driver resume call interrupt is
re-enabled and removes wakeup capability using disable_irq_wake() one such
example is cros ec driver.

With [1] in documentation saying "An irq can be disabled with disable_irq()
and still wake the system as long as the irq has wake enabled".

In such scenario the gpio irq stays disabled at gpio irqchip but needs to
keep enabled in the hierarchy for wakeup capable parent PDC and GIC irqchip
to be able to detect and forward wake capable interrupt to CPU when system
is in sleep state like suspend.

Sending this as an RFC since this series attempts to add support for [1] by
introducing irq_set_wake call for PDC irqchip from which interrupt can be
enabled/disabled at PDC hardware. This also removes irq_chip_enable_parent
and irq_chip_disable_parent calls made from msmgpio irqchip to PDC since
enable and disable at wakeup capable irqchip is now done from irq_set_wake.

Note that *ALL* drivers using wakeup capable interrupt and want to disable
irq with disable_irq() need to call disable_irq_wake() also if they want
to stop wakeup capability at parent PDC irqchip. Not doing so will lead to
system getting woken up from sleep states.

[1] https://www.spinics.net/lists/kernel/msg3398294.html

Maulik Shah (2):
  irqchip: qcom: pdc: Introduce irq_set_wake call
  pinctrl: qcom: Remove forwarding irq_disable and irq_enable call to
    parent

 drivers/irqchip/qcom-pdc.c         | 27 ++++++++++-----------------
 drivers/pinctrl/qcom/pinctrl-msm.c |  7 +------
 2 files changed, 11 insertions(+), 23 deletions(-)

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ