[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e3d44759-e004-4bfc-b21f-7a8cf47ab7c5@quicinc.com>
Date: Sun, 18 May 2025 12:13:07 +0530
From: Charan Teja Kalla <quic_charante@...cinc.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
CC: <len.brown@...el.com>, <pavel@...nel.org>, <gregkh@...uxfoundation.org>,
<dakr@...nel.org>, <linux-pm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Patrick Daly <quic_pdaly@...cinc.com>
Subject: Re: [PATCH] PM-runtime: fix denying of auto suspend in
pm_suspend_timer_fn
Hi Rafael,
On 5/17/2025 1:36 AM, Rafael J. Wysocki wrote:
>> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
>> index 205a4f8828b0..c55a7c70bc1a 100644
>> --- a/drivers/base/power/runtime.c
>> +++ b/drivers/base/power/runtime.c
>> @@ -1011,7 +1011,7 @@ static enum hrtimer_restart pm_suspend_timer_fn(struct hrtimer *timer)
>> * If 'expires' is after the current time, we've been called
>> * too early.
>> */
>> - if (expires > 0 && expires < ktime_get_mono_fast_ns()) {
>> + if (expires > 0 && expires <= ktime_get_mono_fast_ns()) {
>> dev->power.timer_expires = 0;
>> rpm_suspend(dev, dev->power.timer_autosuspends ?
>> (RPM_ASYNC | RPM_AUTO) : RPM_ASYNC);
>> --
> Applied as 6.16 material, thanks!
Can you help me with why 'expires < ktime_get_mono_fast_ns())' is there?
We know that a timer callback is never going to get called before its
expiry. May be removal of this check altogether is the proper fix?
Thanks,
Charan
Powered by blists - more mailing lists