Re: [PATCH v5 0/8] Introduce new cpufreq helper macros

2014-04-29 Thread Stratos Karafotis
On 29/04/2014 07:17 πμ, Viresh Kumar wrote: > On 26 April 2014 01:45, Stratos Karafotis wrote: >> This patch set introduces two freq_table helper macros which >> can be used for iteration over cpufreq_frequency_table and >> makes the necessary changes to cpufreq core an

Re: [PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-04-29 Thread Stratos Karafotis
On 29/04/2014 07:58 πμ, Viresh Kumar wrote: > Cc'd Dirk, > > On 28 April 2014 03:42, Stratos Karafotis wrote: >> Currently the driver calculates the next pstate proportional to >> core_busy factor and reverse proportional to current pstate. >> >> Change the ab

[PATCH] cpufreq: intel_pstate: Disable interrupts during MSRs reading

2014-04-29 Thread Stratos Karafotis
alculation include it in the protected section. This should increase the accuracy of the calculations. Tested on Intel i7-3770 CPU @ 3.40GHz. Benchmarks (Phoronix Linux compilation) show a slightly increase in performance by ~0.1% and a decrease in power consumption by ~0.13%. Signed-off-b

[PATCH] cpufreq: intel_pstate: Remove sample parameter in intel_pstate_calc_busy

2014-04-29 Thread Stratos Karafotis
first line in this function. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 95b3958..8192ff1 100644 --- a/drivers/cpufreq/intel_psta

[PATCH] cpufreq: Break out early when frequency equals target_freq

2014-04-29 Thread Stratos Karafotis
y when a frequency in cpufreq_frequency_table equals to target one. Testing this during kernel compilation using ondemand governor with a frequency table in ascending order, the cpufreq_frequency_table_target returned early on the first iteration at about 30% of times called. Signed-off-by: Stratos Kar

Re: [PATCH v5 0/8] Introduce new cpufreq helper macros

2014-04-30 Thread Stratos Karafotis
On 30/04/2014 01:26 πμ, Rafael J. Wysocki wrote: > On Tuesday, April 29, 2014 07:05:17 PM Stratos Karafotis wrote: >> On 29/04/2014 07:17 πμ, Viresh Kumar wrote: >>> On 26 April 2014 01:45, Stratos Karafotis wrote: >>>> This patch set introduces two freq_table helper

[PATCH v2] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-01 Thread Stratos Karafotis
% Signed-off-by: Stratos Karafotis --- Changes v1 -> v2 - Enhance change log as Rafael and Viresh suggested drivers/cpufreq/intel_pstate.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c in

Re: [PATCH v2] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-02 Thread Stratos Karafotis
On 02/05/2014 03:26 μμ, Rafael J. Wysocki wrote: > On Thursday, May 01, 2014 06:48:08 PM Dirk Brandewie wrote: >> On 05/01/2014 04:18 PM, Rafael J. Wysocki wrote: >>> On Thursday, May 01, 2014 02:30:42 PM Dirk Brandewie wrote: >>>> On 05/01/2014 02:00 PM, Stratos Ka

[PATCH 00/20] Introduce new cpufreq helper macros

2014-04-14 Thread Stratos Karafotis
cpufreq_frequency_table across all drivers and cpufreq core. This was tested on a x86_64 platform. Patches 4-17 compiled successfully but unfortunately I was not able to compile test patches 18-20. Stratos Karafotis (20): cpufreq: Introduce macros for cpufreq_frequency_table iteration cpufreq: acpi

[PATCH 02/20] cpufreq: acpi-cpufreq: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/acpi-cpufreq.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH 01/20] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-14 Thread Stratos Karafotis
- cpufreq_for_each_valid_entry: iterate over each entry that contains a valid frequency. Also, make changes in frequency table helper functions to use these macros. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Documentation/cpu-freq/cpu-drivers.txt | 16

[PATCH 03/20] cpufreq: stats: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/cpufreq_stats.c | 22 -- 1 file changed, 8

[PATCH 05/20] cpufreq: dbx500: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/dbx500-cpufreq.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[PATCH 07/20] cpufreq: exynos: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/exynos-cpufreq.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[PATCH 06/20] cpufreq: elanfreq: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/elanfreq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 08/20] cpufreq: exynos5440: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/exynos5440-cpufreq.c | 30 +++--- 1 file changed, 15

[PATCH 09/20] cpufreq: longhaul: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/longhaul.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions

[PATCH 11/20] cpufreq: s3c2416: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry and cpufreq_for_each_valid_entry macros helpers for iteration over the cpufreq_frequency_table, so use them. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/s3c2416-cpufreq.c | 40

[PATCH 12/20] cpufreq: s3c64xx: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry and cpufreq_for_each_valid_entry macros helpers for iteration over the cpufreq_frequency_table, so use them. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/s3c64xx-cpufreq.c | 15 +-- 1

[PATCH 10/20] cpufreq: powernow-k6: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/powernow-k6.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions

[PATCH 17/20] davinci: da850: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/arm/mach-davinci/da850.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

[PATCH 15/20] mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/mfd/db8500-prcmu.c | 18 -- 1 file changed, 8 insertions(+), 10

[PATCH 18/20] cpufreq: pasemi: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH 14/20] thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/thermal/cpu_cooling.c | 33 + 1 file changed, 13

[PATCH 20/20] irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH 19/20] cpufreq: pcc_cbe: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH 16/20] mips: lemote 2f: se cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/mips/loongson/lemote-2f/clock.c | 15 +-- 1 file changed, 5 insertions(+), 10

[PATCH 13/20] sh: clk: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/sh/clk/core.c | 19 +-- 1 file changed, 5 insertions(+), 14

[PATCH 04/20] cpufreq: arm_big_little: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/arm_big_little.c | 18 ++ 1 file changed, 10 insertions(+), 8

Re: [PATCH 02/20] cpufreq: acpi-cpufreq: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
On 15/04/2014 08:32 πμ, Viresh Kumar wrote: > On 15 April 2014 02:38, Stratos Karafotis wrote: >> The cpufreq core supports the cpufreq_for_each_entry macro helper >> for iteration over the cpufreq_frequency_table, so use it. >> >> It should have no functiona

Re: [PATCH 08/20] cpufreq: exynos5440: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
On 15/04/2014 08:44 πμ, Viresh Kumar wrote: > On 15 April 2014 02:39, Stratos Karafotis wrote: > >> diff --git a/drivers/cpufreq/exynos5440-cpufreq.c >> b/drivers/cpufreq/exynos5440-cpufreq.c > >> static void exynos_enable_dvfs(unsigned int cur_frequency) >>

Re: [PATCH 00/20] Introduce new cpufreq helper macros

2014-04-15 Thread Stratos Karafotis
On 15/04/2014 09:01 πμ, Viresh Kumar wrote: > On 15 April 2014 02:37, Stratos Karafotis wrote: >> This patch set introduces two freq_table helper macros which >> can be used for iteration over cpufreq_frequency_table and >> makes the necessary changes to cpufreq core an

[PATCH v2 1/8] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-15 Thread Stratos Karafotis
- cpufreq_for_each_valid_entry: iterate over each entry that contains a valid frequency. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Documentation/cpu-freq/cpu-drivers.txt | 16 drivers/cpufreq/cpufreq.c | 11 +++ include/linux

[PATCH v2 0/8] Introduce new cpufreq helper macros

2014-04-15 Thread Stratos Karafotis
pos. - Declare pos variable on a separate line Stratos Karafotis (8): cpufreq: Introduce macros for cpufreq_frequency_table iteration cpufreq: Use cpufreq_for_each_* macros for frequency table iteration davinci: da850: Use cpufreq_for_each_entry macro for iteration mips: lemote 2f:

[PATCH v2 2/8] cpufreq: Use cpufreq_for_each_* macros for frequency table iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry and cpufreq_for_each_valid_entry macros helpers for iteration over the cpufreq_frequency_table, so use them. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/acpi-cpufreq.c | 9

[PATCH v2 3/8] davinci: da850: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/arm/mach-davinci/da850.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

[PATCH v2 5/8] mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/mfd/db8500-prcmu.c | 19 --- 1 file changed, 8 insertions(+), 11

[PATCH v2 4/8] mips: lemote 2f: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/mips/loongson/lemote-2f/clock.c | 16 +--- 1 file changed, 5 insertions

[PATCH v2 7/8] irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH v2 8/8] sh: clk: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/sh/clk/core.c | 20 +--- 1 file changed, 5 insertions(+), 15

[PATCH v2 6/8] thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. Also remove the redundant !! operator. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/thermal/cpu_cooling.c | 33

[PATCH v3 1/8] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-16 Thread Stratos Karafotis
- cpufreq_for_each_valid_entry: iterate over each entry that contains a valid frequency. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Changes v2 -> v3 - Better formatting in Documentation - Fix spell error in comments Documentation/cpu-freq/

Re: [PATCH v2 8/8] sh: clk: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-16 Thread Stratos Karafotis
On 16/04/2014 07:13 πμ, Simon Horman wrote: > On Wed, Apr 16, 2014 at 01:27:04AM +0300, Stratos Karafotis wrote: >> The cpufreq core now supports the cpufreq_for_each_valid_entry macro >> helper for iteration over the cpufreq_frequency_table, so use it. >> >> It should

Re: [PATCH v2 0/8] Introduce new cpufreq helper macros

2014-04-16 Thread Stratos Karafotis
On 16/04/2014 07:01 πμ, Viresh Kumar wrote: > On 16 April 2014 03:55, Stratos Karafotis wrote: >> Hi all, >> >> This patch set introduces two freq_table helper macros which >> can be used for iteration over cpufreq_frequency_table and >> makes the necessary ch

[RFC PATCH] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-10 Thread Stratos Karafotis
. Signed-off-by: Stratos Karafotis --- I found about 20 occurrences in various drivers that these macros can be used. I will proceed with the necessary changes if you approve something like this. Thanks in advance for your time, Stratos Karafotis. --- drivers/cpufreq/freq_table.c | 54

Re: [RFC PATCH] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-11 Thread Stratos Karafotis
On 11/04/2014 07:24 πμ, Viresh Kumar wrote: > On 11 April 2014 03:31, Stratos Karafotis wrote: >> This patch intoduces 2 macros which can be used for iteration >> over cpufreq_frequency_table: >> >> - cpufreq_for_each_entry: iterate over each entry of the table >&g

<    1   2   3   4   5