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-prev] [day] [month] [year] [list]
Message-ID: <7hfrqcaicy.fsf@baylibre.com>
Date: Fri, 06 Sep 2024 08:53:49 -0700
From: Kevin Hilman <khilman@...libre.com>
To: Ulf Hansson <ulf.hansson@...aro.org>
Cc: linux-pm@...r.kernel.org, Nishanth Menon <nm@...com>, Vibhore Vardhan
 <vibhore@...com>, Dhruva Gole <d-gole@...com>, Akashdeep Kaur
 <a-kaur@...com>, Sebin Francis <sebin.francis@...com>, Markus
 Schneider-Pargmann <msp@...libre.com>,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy
 chain wakeups

Ulf Hansson <ulf.hansson@...aro.org> writes:

> On Fri, 6 Sept 2024 at 00:03, Kevin Hilman <khilman@...libre.com> wrote:
>>
>> When a device supports IO daisy-chain wakeups, it uses a dedicated
>> wake IRQ.  Devices with IO daisy-chain wakeups enabled should not set
>> wakeup constraints since these can happen even from deep power states,
>> so should not prevent the DM from picking deep power states.
>>
>> Wake IRQs are set with dev_pm_set_wake_irq() or
>> dev_pm_set_dedicated_wake_irq().  The latter is used by the serial
>> driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c)
>> when the interrupts-extended property is used to describe the
>> dedicated wakeup interrupt.
>>
>> Detect these wake IRQs in the suspend path, and if set, skip sending
>> constraint.
>>
>> Signed-off-by: Kevin Hilman <khilman@...libre.com>
>> ---
>>  drivers/pmdomain/ti/ti_sci_pm_domains.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> index 1ab1e46924ab..747a7a33c0a9 100644
>> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> @@ -82,6 +82,13 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
>>         int ret;
>>
>>         if (device_may_wakeup(dev)) {
>> +               /*
>> +                * If device can wakeup using IO daisy chain wakeups,
>> +                * we do not want to set a constraint.
>> +                */
>> +               if (dev->power.wakeirq)
>> +                       dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__);
>
> return; ?
>

Oops, I meant to remove the "false" return when changing from bool to
void, but mistakenly removed the whole line.

d'oh!, good catch.

Thanks.

Kevin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ