* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
[not found] ` <1621123.rMC9JtD3Mo@vostro.rjw.lan>
@ 2014-05-06 15:24 ` Geert Uytterhoeven
2014-05-06 17:55 ` Stratos Karafotis
0 siblings, 1 reply; 7+ 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@vger.kernel.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, 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] 7+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-06 15:24 ` [PATCH v5 0/8] Introduce new cpufreq helper macros Geert Uytterhoeven
@ 2014-05-06 17:55 ` Stratos Karafotis
2014-05-07 5:35 ` Viresh Kumar
0 siblings, 1 reply; 7+ 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@vger.kernel.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, 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] 7+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-06 17:55 ` Stratos Karafotis
@ 2014-05-07 5:35 ` Viresh Kumar
2014-05-07 12:56 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2014-05-07 5:35 UTC (permalink / raw)
To: Stratos Karafotis
Cc: Geert Uytterhoeven, Rafael J. Wysocki, Jesper Nilsson,
Hans-Christian Egtvedt, Dirk Brandewie, linux-doc@vger.kernel.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, 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] 7+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-07 5:35 ` Viresh Kumar
@ 2014-05-07 12:56 ` Rafael J. Wysocki
2014-05-07 13:34 ` Stratos Karafotis
0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2014-05-07 12:56 UTC (permalink / raw)
To: Viresh Kumar
Cc: Stratos Karafotis, Geert Uytterhoeven, Jesper Nilsson,
Hans-Christian Egtvedt, Dirk Brandewie, linux-doc@vger.kernel.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, 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] 7+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-07 12:56 ` Rafael J. Wysocki
@ 2014-05-07 13:34 ` Stratos Karafotis
2014-05-07 13:48 ` Viresh Kumar
2014-05-07 22:37 ` Rafael J. Wysocki
0 siblings, 2 replies; 7+ 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@vger.kernel.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, 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] 7+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-07 13:34 ` Stratos Karafotis
@ 2014-05-07 13:48 ` Viresh Kumar
2014-05-07 22:37 ` Rafael J. Wysocki
1 sibling, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2014-05-07 13:48 UTC (permalink / raw)
To: Stratos Karafotis
Cc: Rafael J. Wysocki, Geert Uytterhoeven, Jesper Nilsson,
Hans-Christian Egtvedt, Dirk Brandewie, linux-doc@vger.kernel.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, 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] 7+ messages in thread
* Re: [PATCH v5 0/8] Introduce new cpufreq helper macros
2014-05-07 13:34 ` Stratos Karafotis
2014-05-07 13:48 ` Viresh Kumar
@ 2014-05-07 22:37 ` Rafael J. Wysocki
1 sibling, 0 replies; 7+ 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@vger.kernel.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, 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] 7+ messages in thread
end of thread, other threads:[~2014-05-07 22:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <535AC247.3070907@semaphore.gr>
[not found] ` <CAKohpok-74uK5k-adxjmEy71=vF8V7MaBwdCD1Vb2ats7FHi_A@mail.gmail.com>
[not found] ` <535FCDBD.6080500@semaphore.gr>
[not found] ` <1621123.rMC9JtD3Mo@vostro.rjw.lan>
2014-05-06 15:24 ` [PATCH v5 0/8] Introduce new cpufreq helper macros Geert Uytterhoeven
2014-05-06 17:55 ` Stratos Karafotis
2014-05-07 5:35 ` Viresh Kumar
2014-05-07 12:56 ` Rafael J. Wysocki
2014-05-07 13:34 ` Stratos Karafotis
2014-05-07 13:48 ` 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