Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1270281
| From | Punit Agrawal <punit.agrawal@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 3/3] cpufreq: arm_big_little: Add support to register a cpufreq cooling device |
| Date | 2015-11-16 16:30 +0100 |
| Message-ID | <qvtTc-AH-25@gated-at.bofh.it> (permalink) |
| References | <qsYqt-YN-7@gated-at.bofh.it> <qsYAc-123-47@gated-at.bofh.it> <queCS-1MO-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Viresh Kumar <viresh.kumar@linaro.org> writes:
> On 09-11-15, 17:29, Punit Agrawal wrote:
>> Register passive cooling devices when initialising cpufreq on
>> big.LITTLE systems. If the device tree provides a dynamic power
>> coefficient for the CPUs then the bound cooling device will support
>> the extensions that allow it to be used with all the existing thermal
>> governors including the power allocator governor.
>>
>> A cooling device will be created per individual frequency domain and
>> can be bound to thermal zones via the thermal DT bindings.
>>
>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>> Cc: Sudeep Holla <sudeep.holla@arm.com>
>> Cc: Eduardo Valentin <edubezval@gmail.com>
>> ---
>> drivers/cpufreq/arm_big_little.c | 52 ++++++++++++++++++++++++++++++++++++++--
>> 1 file changed, 50 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
>> index f1e42f8..72a2777 100644
>> --- a/drivers/cpufreq/arm_big_little.c
>> +++ b/drivers/cpufreq/arm_big_little.c
>> @@ -23,6 +23,7 @@
>> #include <linux/cpu.h>
>> #include <linux/cpufreq.h>
>> #include <linux/cpumask.h>
>> +#include <linux/cpu_cooling.h>
>> #include <linux/export.h>
>> #include <linux/module.h>
>> #include <linux/mutex.h>
>> @@ -55,6 +56,10 @@ static bool bL_switching_enabled;
>> #define ACTUAL_FREQ(cluster, freq) ((cluster == A7_CLUSTER) ? freq << 1 : freq)
>> #define VIRT_FREQ(cluster, freq) ((cluster == A7_CLUSTER) ? freq >> 1 : freq)
>>
>> +struct private_data {
>> + struct thermal_cooling_device *cdev;
>> +};
>
> I think we need to be consistent within the driver, and so this must
> be stored in a similar way to what we do for other structures. We have
> static arrays for them, please do it that way only OR first change all
> of them to be part of a bigger private_data structure.
Sure, I'll switch to using static arrays. There seem to be a lot of
assumptions that might be easily broken in moving all the data into a
single structure. I'll leave that as a later change.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v3 0/3] Dynamic power model from device tree Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 18:30 +0100
[PATCH v3 2/3] cpufreq-dt: Supply power coefficient when registering cooling devices Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 18:40 +0100
Re: [PATCH v3 2/3] cpufreq-dt: Supply power coefficient when registering cooling devices Javi Merino <javi.merino@arm.com> - 2015-11-10 13:30 +0100
[PATCH v3 1/3] devicetree: bindings: Add optional dynamic-power-coefficient property Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 18:40 +0100
Re: [PATCH v3 1/3] devicetree: bindings: Add optional dynamic-power-coefficient property Rob Herring <robh@kernel.org> - 2015-11-09 18:50 +0100
Re: [PATCH v3 1/3] devicetree: bindings: Add optional dynamic-power-coefficient property Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 19:50 +0100
[PATCH v3 3/3] cpufreq: arm_big_little: Add support to register a cpufreq cooling device Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 18:40 +0100
Re: [PATCH v3 3/3] cpufreq: arm_big_little: Add support to register a cpufreq cooling device Javi Merino <javi.merino@arm.com> - 2015-11-10 13:40 +0100
Re: [PATCH v3 3/3] cpufreq: arm_big_little: Add support to register a cpufreq cooling device Viresh Kumar <viresh.kumar@linaro.org> - 2015-11-13 06:00 +0100
Re: [PATCH v3 3/3] cpufreq: arm_big_little: Add support to register a cpufreq cooling device Punit Agrawal <punit.agrawal@arm.com> - 2015-11-16 16:30 +0100
csiph-web