* [PATCH v5 0/8] Introduce new cpufreq helper macros
@ 2014-04-25 20:15 Stratos Karafotis
2014-04-29 4:17 ` Viresh Kumar
0 siblings, 1 reply; 12+ messages in thread
From: Stratos Karafotis @ 2014-04-25 20:15 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar
Cc: Jesper Nilsson, Hans-Christian Egtvedt, Dirk Brandewie,
linux-doc, cpufreq, linux-pm, LKML, Randy Dunlap,
David S. Miller, Linus Walleij, Simon Horman, Sekhar Nori,
Samuel Ortiz
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 changes to cpufreq core and drivers that
use such an iteration procedure.
The motivation was a usage of common procedure to iterate over
cpufreq_frequency_table across all drivers and cpufreq core.
This was tested on a x86_64 platform.
Most files compiled successfully but unfortunately I was not
able to compile sh_sir.c pasemi_cpufreq.c and ppc_cbe_cpufreq.c
due to lack of cross compiler.
Changelog
v4 -> v5
- Fix warnings in printk format specifier for 32 bit
architectures in freq_table.c, longhaul, pasemi, ppc_cbe
v3 -> v4
- No changes
v2 -> v3
- Better formatting in Documentation
- Fix spell error in comments in cpufreq.h
- Added 'ARM' prefix in patch 3/8 subject as Sekhar Nori
suggested
v1 -> v2
- Rearrange patches
- Remove redundant braces
- Fix a newly introduced bug in exynos5440
- Use cpufreq_for_each_valid_entry instead of
cpufreq_for_each_entry in cpufreq_frequency_table_get_index()
- Drop redundant double ! operator in cpu_cooling
- Change the pos loop cursor variable to freq_pos in longhaul
- 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
ARM: davinci: da850: Use cpufreq_for_each_entry macro for iteration
mips: lemote 2f: Use cpufreq_for_each_entry macro for iteration
mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration
thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for
iteration
irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration
sh: clk: Use cpufreq_for_each_valid_entry macro for iteration
Documentation/cpu-freq/cpu-drivers.txt | 19 ++++++++++++
arch/arm/mach-davinci/da850.c | 9 +++---
arch/mips/loongson/lemote-2f/clock.c | 16 +++-------
drivers/cpufreq/acpi-cpufreq.c | 9 +++---
drivers/cpufreq/arm_big_little.c | 16 +++++-----
drivers/cpufreq/cpufreq.c | 11 +++++++
drivers/cpufreq/cpufreq_stats.c | 24 +++++----------
drivers/cpufreq/dbx500-cpufreq.c | 8 ++---
drivers/cpufreq/elanfreq.c | 9 +++---
drivers/cpufreq/exynos-cpufreq.c | 11 +++----
drivers/cpufreq/exynos5440-cpufreq.c | 30 +++++++++---------
drivers/cpufreq/freq_table.c | 56 +++++++++++++++-------------------
drivers/cpufreq/longhaul.c | 11 +++----
drivers/cpufreq/pasemi-cpufreq.c | 10 +++---
drivers/cpufreq/powernow-k6.c | 14 ++++-----
drivers/cpufreq/ppc_cbe_cpufreq.c | 9 +++---
drivers/cpufreq/s3c2416-cpufreq.c | 40 +++++++++++-------------
drivers/cpufreq/s3c64xx-cpufreq.c | 15 +++------
drivers/mfd/db8500-prcmu.c | 19 +++++-------
drivers/net/irda/sh_sir.c | 14 +++------
drivers/sh/clk/core.c | 20 +++---------
drivers/thermal/cpu_cooling.c | 33 ++++++++------------
include/linux/cpufreq.h | 21 +++++++++++++
23 files changed, 208 insertions(+), 216 deletions(-)
--
1.9.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-04-25 20:15 [PATCH v5 0/8] Introduce new cpufreq helper macros Stratos Karafotis
@ 2014-04-29 4:17 ` Viresh Kumar
2014-04-29 16:05 ` Stratos Karafotis
0 siblings, 1 reply; 12+ messages in thread
From: Viresh Kumar @ 2014-04-29 4:17 UTC (permalink / raw)
To: Stratos Karafotis
Cc: Rafael J. Wysocki, Jesper Nilsson, Hans-Christian Egtvedt,
Dirk Brandewie, linux-doc, cpufreq, linux-pm, LKML, Randy Dunlap,
David S. Miller, Linus Walleij, Simon Horman, Sekhar Nori,
Samuel Ortiz
On 26 April 2014 01:45, Stratos Karafotis <stratosk@semaphore.gr> 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 and drivers that
> use such an iteration procedure.
>
> The motivation was a usage of common procedure to iterate over
> cpufreq_frequency_table across all drivers and cpufreq core.
>
> This was tested on a x86_64 platform.
> Most files compiled successfully but unfortunately I was not
> able to compile sh_sir.c pasemi_cpufreq.c and ppc_cbe_cpufreq.c
> due to lack of cross compiler.
>
> Changelog
>
> v4 -> v5
> - Fix warnings in printk format specifier for 32 bit
> architectures in freq_table.c, longhaul, pasemi, ppc_cbe
Doesn't look much has changed and so it stays as is:
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-04-29 4:17 ` Viresh Kumar
@ 2014-04-29 16:05 ` Stratos Karafotis
2014-04-29 22:26 ` Rafael J. Wysocki
0 siblings, 1 reply; 12+ messages in thread
From: Stratos Karafotis @ 2014-04-29 16:05 UTC (permalink / raw)
To: Viresh Kumar
Cc: Rafael J. Wysocki, Jesper Nilsson, Hans-Christian Egtvedt,
Dirk Brandewie, linux-doc, cpufreq, linux-pm, LKML, Randy Dunlap,
David S. Miller, Linus Walleij, Simon Horman, Sekhar Nori,
Samuel Ortiz
On 29/04/2014 07:17 πμ, Viresh Kumar wrote:
> On 26 April 2014 01:45, Stratos Karafotis <stratosk@semaphore.gr> 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 and drivers that
>> use such an iteration procedure.
>>
>> The motivation was a usage of common procedure to iterate over
>> cpufreq_frequency_table across all drivers and cpufreq core.
>>
>> This was tested on a x86_64 platform.
>> Most files compiled successfully but unfortunately I was not
>> able to compile sh_sir.c pasemi_cpufreq.c and ppc_cbe_cpufreq.c
>> due to lack of cross compiler.
>>
>> Changelog
>>
>> v4 -> v5
>> - Fix warnings in printk format specifier for 32 bit
>> architectures in freq_table.c, longhaul, pasemi, ppc_cbe
>
> Doesn't look much has changed and so it stays as is:
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>
Thank you very much!
Stratos Karafotis
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-04-29 16:05 ` Stratos Karafotis
@ 2014-04-29 22:26 ` Rafael J. Wysocki
2014-04-30 15:37 ` Stratos Karafotis
2014-05-06 15:24 ` Geert Uytterhoeven
0 siblings, 2 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2014-04-29 22:26 UTC (permalink / raw)
To: Stratos Karafotis
Cc: Viresh Kumar, Jesper Nilsson, Hans-Christian Egtvedt,
Dirk Brandewie, linux-doc, cpufreq, linux-pm, LKML, Randy Dunlap,
David S. Miller, Linus Walleij, Simon Horman, Sekhar Nori,
Samuel Ortiz
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 <stratosk@semaphore.gr> 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 and drivers that
> >> use such an iteration procedure.
> >>
> >> The motivation was a usage of common procedure to iterate over
> >> cpufreq_frequency_table across all drivers and cpufreq core.
> >>
> >> This was tested on a x86_64 platform.
> >> Most files compiled successfully but unfortunately I was not
> >> able to compile sh_sir.c pasemi_cpufreq.c and ppc_cbe_cpufreq.c
> >> due to lack of cross compiler.
> >>
> >> Changelog
> >>
> >> v4 -> v5
> >> - Fix warnings in printk format specifier for 32 bit
> >> architectures in freq_table.c, longhaul, pasemi, ppc_cbe
> >
> > Doesn't look much has changed and so it stays as is:
> >
> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> >
>
> Thank you very much!
I've applied the series to my bleeding-edge branch, will move it to linux-next
after build testing later this week.
Thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-04-29 22:26 ` Rafael J. Wysocki
@ 2014-04-30 15:37 ` Stratos Karafotis
2014-05-06 15:24 ` Geert Uytterhoeven
1 sibling, 0 replies; 12+ messages in thread
From: Stratos Karafotis @ 2014-04-30 15:37 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Viresh Kumar, Jesper Nilsson, Hans-Christian Egtvedt,
Dirk Brandewie, linux-doc, cpufreq, linux-pm, LKML, Randy Dunlap,
David S. Miller, Linus Walleij, Simon Horman, Sekhar Nori,
Samuel Ortiz
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 <stratosk@semaphore.gr> 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 and drivers that
>>>> use such an iteration procedure.
>>>>
>>>> The motivation was a usage of common procedure to iterate over
>>>> cpufreq_frequency_table across all drivers and cpufreq core.
>>>>
>>>> This was tested on a x86_64 platform.
>>>> Most files compiled successfully but unfortunately I was not
>>>> able to compile sh_sir.c pasemi_cpufreq.c and ppc_cbe_cpufreq.c
>>>> due to lack of cross compiler.
>>>>
>>>> Changelog
>>>>
>>>> v4 -> v5
>>>> - Fix warnings in printk format specifier for 32 bit
>>>> architectures in freq_table.c, longhaul, pasemi, ppc_cbe
>>>
>>> Doesn't look much has changed and so it stays as is:
>>>
>>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>>>
>>
>> Thank you very much!
>
> I've applied the series to my bleeding-edge branch, will move it to linux-next
> after build testing later this week.
>
> Thanks!
>
Thanks so much!
Stratos Karafotis
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-04-29 22:26 ` Rafael J. Wysocki
2014-04-30 15:37 ` Stratos Karafotis
@ 2014-05-06 15:24 ` Geert Uytterhoeven
2014-05-06 17:55 ` Stratos Karafotis
1 sibling, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-05-06 15:24 UTC (permalink / raw)
To: Rafael J. Wysocki, Stratos Karafotis
Cc: Viresh Kumar, Jesper Nilsson, Hans-Christian Egtvedt,
Dirk Brandewie, linux-doc, cpufreq, linux-pm, LKML, Randy Dunlap,
David S. Miller, Linus Walleij, Simon Horman, Sekhar Nori,
Samuel Ortiz, Linux-sh list
Hi Stratos,
On Wed, Apr 30, 2014 at 12:26 AM, Rafael J. Wysocki <rjw@rjwysocki.net> 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 <stratosk@semaphore.gr> 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 and drivers that
>> >> use such an iteration procedure.
>> >>
>> >> The motivation was a usage of common procedure to iterate over
>> >> cpufreq_frequency_table across all drivers and cpufreq core.
>> >>
>> >> This was tested on a x86_64 platform.
>> >> Most files compiled successfully but unfortunately I was not
>> >> able to compile sh_sir.c pasemi_cpufreq.c and ppc_cbe_cpufreq.c
>> >> due to lack of cross compiler.
>> >>
>> >> Changelog
>> >>
>> >> v4 -> v5
>> >> - Fix warnings in printk format specifier for 32 bit
>> >> architectures in freq_table.c, longhaul, pasemi, ppc_cbe
>> >
>> > Doesn't look much has changed and so it stays as is:
>> >
>> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>> >
>>
>> Thank you very much!
>
> I've applied the series to my bleeding-edge branch, will move it to linux-next
> after build testing later this week.
This breaks if CONFIG_CPU_FREQ=n, e.g. ARM/shmobile/koelsch/
non-multiplatform:
drivers/built-in.o: In function `clk_round_parent':
clkdev.c:(.text+0xcf168): undefined reference to `cpufreq_next_valid'
drivers/built-in.o: In function `clk_rate_table_find':
clkdev.c:(.text+0xcf820): undefined reference to `cpufreq_next_valid'
make[3]: *** [vmlinux] Error 1
drivers/sh/clk/core.c (pre-CCF shmobile clock core) calls
cpufreq_for_each_valid_entry():
#define cpufreq_for_each_valid_entry(pos, table) \
for (pos = table; cpufreq_next_valid(&pos); pos++)
but cpufreq_next_valid() in drivers/cpufreq/cpufreq.c is not
compiled in.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-06 15:24 ` Geert Uytterhoeven
@ 2014-05-06 17:55 ` Stratos Karafotis
2014-05-07 5:23 ` Viresh Kumar
0 siblings, 1 reply; 12+ messages in thread
From: Stratos Karafotis @ 2014-05-06 17:55 UTC (permalink / raw)
To: Geert Uytterhoeven, Rafael J. Wysocki
Cc: Viresh Kumar, Jesper Nilsson, Hans-Christian Egtvedt,
Dirk Brandewie, linux-doc, cpufreq, linux-pm, LKML, Randy Dunlap,
David S. Miller, Linus Walleij, Simon Horman, Sekhar Nori,
Samuel Ortiz, Linux-sh list
Hi all,
On 06/05/2014 06:24 μμ, Geert Uytterhoeven wrote:
> Hi Stratos,
>
> On Wed, Apr 30, 2014 at 12:26 AM, Rafael J. Wysocki <rjw@rjwysocki.net> 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 <stratosk@semaphore.gr> 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 and drivers that
>>>>> use such an iteration procedure.
>>>>>
>>>>> The motivation was a usage of common procedure to iterate over
>>>>> cpufreq_frequency_table across all drivers and cpufreq core.
>>>>>
>>>>> This was tested on a x86_64 platform.
>>>>> Most files compiled successfully but unfortunately I was not
>>>>> able to compile sh_sir.c pasemi_cpufreq.c and ppc_cbe_cpufreq.c
>>>>> due to lack of cross compiler.
>>>>>
>>>>> Changelog
>>>>>
>>>>> v4 -> v5
>>>>> - Fix warnings in printk format specifier for 32 bit
>>>>> architectures in freq_table.c, longhaul, pasemi, ppc_cbe
>>>>
>>>> Doesn't look much has changed and so it stays as is:
>>>>
>>>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>>>>
>>>
>>> Thank you very much!
>>
>> I've applied the series to my bleeding-edge branch, will move it to linux-next
>> after build testing later this week.
>
> This breaks if CONFIG_CPU_FREQ=n, e.g. ARM/shmobile/koelsch/
> non-multiplatform:
>
> drivers/built-in.o: In function `clk_round_parent':
> clkdev.c:(.text+0xcf168): undefined reference to `cpufreq_next_valid'
> drivers/built-in.o: In function `clk_rate_table_find':
> clkdev.c:(.text+0xcf820): undefined reference to `cpufreq_next_valid'
> make[3]: *** [vmlinux] Error 1
>
> drivers/sh/clk/core.c (pre-CCF shmobile clock core) calls
> cpufreq_for_each_valid_entry():
>
> #define cpufreq_for_each_valid_entry(pos, table) \
> for (pos = table; cpufreq_next_valid(&pos); pos++)
>
> but cpufreq_next_valid() in drivers/cpufreq/cpufreq.c is not
> compiled in.
My bad. I'm sorry for this. :(
Rafael,
A solution could be to make cpufreq_next_valid an inline function in cpufreq.h,
but as Viresh mentioned this would be very inefficient because of multiple copies.
So, maybe it's better to revert the 2 patches that don't depend on CONFIG_CPU_FREQ:
4229e1c61a4a ("sh: clk: Use cpufreq_for_each_valid_entry macro for iteration") and
04ae58645afa ("irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration").
Do I need to send revert patches for the above?
Thanks,
Stratos
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-06 17:55 ` Stratos Karafotis
@ 2014-05-07 5:23 ` Viresh Kumar
2014-05-07 13:13 ` Rafael J. Wysocki
0 siblings, 1 reply; 12+ messages in thread
From: Viresh Kumar @ 2014-05-07 5:23 UTC (permalink / raw)
To: Stratos Karafotis
Cc: Geert Uytterhoeven, Rafael J. Wysocki, Jesper Nilsson,
Hans-Christian Egtvedt, Dirk Brandewie, linux-doc, cpufreq,
linux-pm, LKML, Randy Dunlap, David S. Miller, Linus Walleij,
Simon Horman, Sekhar Nori, Samuel Ortiz, Linux-sh list
On 6 May 2014 23:25, Stratos Karafotis <stratosk@semaphore.gr> wrote:
> My bad. I'm sorry for this. :(
>
> Rafael,
> A solution could be to make cpufreq_next_valid an inline function in cpufreq.h,
> but as Viresh mentioned this would be very inefficient because of multiple copies.
That statement was true when we didn't had this problem..
> So, maybe it's better to revert the 2 patches that don't depend on CONFIG_CPU_FREQ:
>
> 4229e1c61a4a ("sh: clk: Use cpufreq_for_each_valid_entry macro for iteration") and
> 04ae58645afa ("irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration").
This doesn't look right. It can happen to some other drivers as well in future.
So, there are two solutions I can think of:
1. move cpufreq_next_valid and rename it to __cpufreq_next_valid(). Also make it
inline. Then create two versions of cpufreq_next_valid(), one inlined (only when
CONFIG_CPU_FREQ=n) and other one in cpufreq.c (non- inlined)..
But probably that would be called ugly by some people :)
2. Make cpufreq_next_valid() inline and forget about extra space it takes :)
@Rafel: Let me know which one you like :)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-07 5:23 ` Viresh Kumar
@ 2014-05-07 13:13 ` Rafael J. Wysocki
2014-05-07 13:34 ` Stratos Karafotis
0 siblings, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2014-05-07 13:13 UTC (permalink / raw)
To: Viresh Kumar
Cc: Stratos Karafotis, Geert Uytterhoeven, Jesper Nilsson,
Hans-Christian Egtvedt, Dirk Brandewie, linux-doc, cpufreq,
linux-pm, LKML, Randy Dunlap, David S. Miller, Linus Walleij,
Simon Horman, Sekhar Nori, Samuel Ortiz, Linux-sh list
On Wednesday, May 07, 2014 10:53:16 AM Viresh Kumar wrote:
> On 6 May 2014 23:25, Stratos Karafotis <stratosk@semaphore.gr> wrote:
> > My bad. I'm sorry for this. :(
> >
> > Rafael,
> > A solution could be to make cpufreq_next_valid an inline function in cpufreq.h,
> > but as Viresh mentioned this would be very inefficient because of multiple copies.
>
> That statement was true when we didn't had this problem..
>
> > So, maybe it's better to revert the 2 patches that don't depend on CONFIG_CPU_FREQ:
> >
> > 4229e1c61a4a ("sh: clk: Use cpufreq_for_each_valid_entry macro for iteration") and
> > 04ae58645afa ("irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration").
>
> This doesn't look right. It can happen to some other drivers as well in future.
> So, there are two solutions I can think of:
> 1. move cpufreq_next_valid and rename it to __cpufreq_next_valid(). Also make it
> inline. Then create two versions of cpufreq_next_valid(), one inlined (only when
> CONFIG_CPU_FREQ=n) and other one in cpufreq.c (non- inlined)..
>
> But probably that would be called ugly by some people :)
>
> 2. Make cpufreq_next_valid() inline and forget about extra space it takes :)
>
> @Rafel: Let me know which one you like :)
2.
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-07 13:13 ` Rafael J. Wysocki
@ 2014-05-07 13:34 ` Stratos Karafotis
2014-05-07 13:36 ` Viresh Kumar
2014-05-07 22:37 ` Rafael J. Wysocki
0 siblings, 2 replies; 12+ messages in thread
From: Stratos Karafotis @ 2014-05-07 13:34 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar
Cc: Geert Uytterhoeven, Jesper Nilsson, Hans-Christian Egtvedt,
Dirk Brandewie, linux-doc, cpufreq, linux-pm, LKML, Randy Dunlap,
David S. Miller, Linus Walleij, Simon Horman, Sekhar Nori,
Samuel Ortiz, Linux-sh list
Hi Rafael,
On 07/05/2014 04:13 μμ, Rafael J. Wysocki wrote:
> On Wednesday, May 07, 2014 10:53:16 AM Viresh Kumar wrote:
>> On 6 May 2014 23:25, Stratos Karafotis <stratosk@semaphore.gr> wrote:
>>> My bad. I'm sorry for this. :(
>>>
>>> Rafael,
>>> A solution could be to make cpufreq_next_valid an inline function in cpufreq.h,
>>> but as Viresh mentioned this would be very inefficient because of multiple copies.
>>
>> That statement was true when we didn't had this problem..
>>
>>> So, maybe it's better to revert the 2 patches that don't depend on CONFIG_CPU_FREQ:
>>>
>>> 4229e1c61a4a ("sh: clk: Use cpufreq_for_each_valid_entry macro for iteration") and
>>> 04ae58645afa ("irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration").
>>
>> This doesn't look right. It can happen to some other drivers as well in future.
>> So, there are two solutions I can think of:
>> 1. move cpufreq_next_valid and rename it to __cpufreq_next_valid(). Also make it
>> inline. Then create two versions of cpufreq_next_valid(), one inlined (only when
>> CONFIG_CPU_FREQ=n) and other one in cpufreq.c (non- inlined)..
>>
>> But probably that would be called ugly by some people :)
>>
>> 2. Make cpufreq_next_valid() inline and forget about extra space it takes :)
>>
>> @Rafel: Let me know which one you like :)
>
> 2.
>
>
Do you want me to resend the entire patch set or only patch 1/8?
Thanks,
Stratos
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-07 13:34 ` Stratos Karafotis
@ 2014-05-07 13:36 ` Viresh Kumar
2014-05-07 22:37 ` Rafael J. Wysocki
1 sibling, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2014-05-07 13:36 UTC (permalink / raw)
To: Stratos Karafotis
Cc: Rafael J. Wysocki, Geert Uytterhoeven, Jesper Nilsson,
Hans-Christian Egtvedt, Dirk Brandewie, linux-doc, cpufreq,
linux-pm, LKML, Randy Dunlap, David S. Miller, Linus Walleij,
Simon Horman, Sekhar Nori, Samuel Ortiz, Linux-sh list
On 7 May 2014 19:04, Stratos Karafotis <stratosk@semaphore.gr> wrote:
> Do you want me to resend the entire patch set or only patch 1/8?
Probably a new patch which would make it inline that's it. I don't think
he is going to rebase his branch now..
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-07 13:34 ` Stratos Karafotis
2014-05-07 13:36 ` Viresh Kumar
@ 2014-05-07 22:37 ` Rafael J. Wysocki
1 sibling, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2014-05-07 22:37 UTC (permalink / raw)
To: Stratos Karafotis
Cc: Viresh Kumar, Geert Uytterhoeven, Jesper Nilsson,
Hans-Christian Egtvedt, Dirk Brandewie, linux-doc, cpufreq,
linux-pm, LKML, Randy Dunlap, David S. Miller, Linus Walleij,
Simon Horman, Sekhar Nori, Samuel Ortiz, Linux-sh list
On Wednesday, May 07, 2014 04:34:12 PM Stratos Karafotis wrote:
> Hi Rafael,
>
> On 07/05/2014 04:13 μμ, Rafael J. Wysocki wrote:
> > On Wednesday, May 07, 2014 10:53:16 AM Viresh Kumar wrote:
> >> On 6 May 2014 23:25, Stratos Karafotis <stratosk@semaphore.gr> wrote:
> >>> My bad. I'm sorry for this. :(
> >>>
> >>> Rafael,
> >>> A solution could be to make cpufreq_next_valid an inline function in cpufreq.h,
> >>> but as Viresh mentioned this would be very inefficient because of multiple copies.
> >>
> >> That statement was true when we didn't had this problem..
> >>
> >>> So, maybe it's better to revert the 2 patches that don't depend on CONFIG_CPU_FREQ:
> >>>
> >>> 4229e1c61a4a ("sh: clk: Use cpufreq_for_each_valid_entry macro for iteration") and
> >>> 04ae58645afa ("irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration").
> >>
> >> This doesn't look right. It can happen to some other drivers as well in future.
> >> So, there are two solutions I can think of:
> >> 1. move cpufreq_next_valid and rename it to __cpufreq_next_valid(). Also make it
> >> inline. Then create two versions of cpufreq_next_valid(), one inlined (only when
> >> CONFIG_CPU_FREQ=n) and other one in cpufreq.c (non- inlined)..
> >>
> >> But probably that would be called ugly by some people :)
> >>
> >> 2. Make cpufreq_next_valid() inline and forget about extra space it takes :)
> >>
> >> @Rafel: Let me know which one you like :)
> >
> > 2.
> >
> >
>
> Do you want me to resend the entire patch set or only patch 1/8?
It's already on a branch that cannot be rebased. Please send me a fix on top of it.
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-05-07 22:20 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25 20:15 [PATCH v5 0/8] Introduce new cpufreq helper macros Stratos Karafotis
2014-04-29 4:17 ` Viresh Kumar
2014-04-29 16:05 ` Stratos Karafotis
2014-04-29 22:26 ` Rafael J. Wysocki
2014-04-30 15:37 ` Stratos Karafotis
2014-05-06 15:24 ` Geert Uytterhoeven
2014-05-06 17:55 ` Stratos Karafotis
2014-05-07 5:23 ` Viresh Kumar
2014-05-07 13:13 ` Rafael J. Wysocki
2014-05-07 13:34 ` Stratos Karafotis
2014-05-07 13:36 ` Viresh Kumar
2014-05-07 22:37 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).