Patch "thermal: gov_power_allocator: Allow binding without cooling devices" has been added to the 6.8-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

    thermal: gov_power_allocator: Allow binding without cooling devices

to the 6.8-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:
     thermal-gov_power_allocator-allow-binding-without-co.patch
and it can be found in the queue-6.8 subdirectory.

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



commit f64cc435ca3920c13db520358a06fcfc3717e834
Author: Nikita Travkin <nikita@xxxxxxx>
Date:   Wed Apr 3 16:31:40 2024 +0500

    thermal: gov_power_allocator: Allow binding without cooling devices
    
    [ Upstream commit 1057c4c36ef8b236a2e28edef301da0801338c5f ]
    
    IPA was recently refactored to split out memory allocation into a
    separate funciton. That funciton was made to return -EINVAL if there is
    zero power_actors and thus no memory to allocate. This causes IPA to
    fail probing when the thermal zone has no attached cooling devices.
    
    Since cooling devices can attach after the thermal zone is created and
    the governer is attached to it, failing probe due to the lack of cooling
    devices is incorrect.
    
    Change the allocate_actors_buffer() to return success when there is no
    cooling devices present.
    
    Fixes: 912e97c67cc3 ("thermal: gov_power_allocator: Move memory allocation out of throttle()")
    Signed-off-by: Nikita Travkin <nikita@xxxxxxx>
    Reviewed-by: Lukasz Luba <lukasz.luba@xxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index 81e061f183ad1..207a6a3936b54 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -606,7 +606,7 @@ static int allocate_actors_buffer(struct power_allocator_params *params,
 
 	/* There might be no cooling devices yet. */
 	if (!num_actors) {
-		ret = -EINVAL;
+		ret = 0;
 		goto clean_state;
 	}
 




[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