Patch "cpuidle: dt: Return the correct numbers of parsed idle states" has been added to the 4.19-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

    cpuidle: dt: Return the correct numbers of parsed idle states

to the 4.19-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:
     cpuidle-dt-return-the-correct-numbers-of-parsed-idle.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 8bdb2a9870da66b2287491204cbf06c05b254fe4
Author: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Date:   Fri Oct 21 17:10:12 2022 +0200

    cpuidle: dt: Return the correct numbers of parsed idle states
    
    [ Upstream commit ee3c2c8ad6ba6785f14a60e4081d7c82e88162a2 ]
    
    While we correctly skips to initialize an idle state from a disabled idle
    state node in DT, the returned value from dt_init_idle_driver() don't get
    adjusted accordingly. Instead the number of found idle state nodes are
    returned, while the callers are expecting the number of successfully
    initialized idle states from DT.
    
    This leads to cpuidle drivers unnecessarily continues to initialize their
    idle state specific data. Moreover, in the case when all idle states have
    been disabled in DT, we would end up registering a cpuidle driver, rather
    than relying on the default arch specific idle call.
    
    Fixes: 9f14da345599 ("drivers: cpuidle: implement DT based idle states infrastructure")
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Reviewed-by: Sudeep Holla <sudeep.holla@xxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index 53342b7f1010..ea3c59d3fdad 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -224,6 +224,6 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
 	 * also be 0 on platforms with missing DT idle states or legacy DT
 	 * configuration predating the DT idle states bindings.
 	 */
-	return i;
+	return state_idx - start_idx;
 }
 EXPORT_SYMBOL_GPL(dt_init_idle_driver);



[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