Patch "PM: domains: Fix initialization of genpd's next_wakeup" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PM: domains: Fix initialization of genpd's next_wakeup

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pm-domains-fix-initialization-of-genpd-s-next_wakeup.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 820011bd411009867c15c00d53bd1994049bcfd4
Author: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Date:   Wed May 11 16:57:00 2022 +0200

    PM: domains: Fix initialization of genpd's next_wakeup
    
    [ Upstream commit 622d9b5577f19a6472db21df042fea8f5fefe244 ]
    
    In the genpd governor we walk the list of child-domains to take into
    account their next_wakeup. If the child-domain itself, doesn't have a
    governor assigned to it, we can end up using the next_wakeup value before
    it has been properly initialized. To prevent a possible incorrect behaviour
    in the governor, let's initialize next_wakeup to KTIME_MAX.
    
    Fixes: c79aa080fb0f ("PM: domains: use device's next wakeup to determine domain idle state")
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 1ee878d126fd..f0e4b0ea93e8 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1997,6 +1997,7 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
 	genpd->device_count = 0;
 	genpd->max_off_time_ns = -1;
 	genpd->max_off_time_changed = true;
+	genpd->next_wakeup = KTIME_MAX;
 	genpd->provider = NULL;
 	genpd->has_provider = false;
 	genpd->accounting_time = ktime_get();



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux