All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
@ 2015-02-25 12:59 Lorenzo Pieralisi
  2015-02-25 13:11 ` Will Deacon
  0 siblings, 1 reply; 10+ messages in thread
From: Lorenzo Pieralisi @ 2015-02-25 12:59 UTC (permalink / raw)
  To: linux-arm-kernel

ARM64 CPUidle driver requires the cpu_do_idle function so that it can
be used to enter the shallowest idle state, and it is declared in
asm/proc-fns.h.

The current ARM64 CPUidle driver does not include asm/proc-fns.h
explicitly and it has so far relied on implicit inclusion from other
header files.

Owing to some header dependencies reshuffling this currently triggers
build failures when CONFIG_ARM64_64K_PAGES=y:

drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
function "cpu_do_idle" [-Werror=implicit-function-declaration]
   cpu_do_idle();
   ^

This patch adds the explicit inclusion of the asm/proc-fns.h header file
to fix the build breakage and stop relying on implicit asm/proc-fns.h
inclusion.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[lp: rewrote commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
---
v2 changes:

- Picked up
  http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325523.html
- Rebased against 4.0-rc1 and rewrote commit log

 drivers/cpuidle/cpuidle-arm64.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c
index 39a2c62..c8bb6c5 100644
--- a/drivers/cpuidle/cpuidle-arm64.c
+++ b/drivers/cpuidle/cpuidle-arm64.c
@@ -19,6 +19,7 @@
 #include <linux/of.h>
 
 #include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
 
 #include "dt_idle_states.h"
 
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-25 12:59 [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly Lorenzo Pieralisi
@ 2015-02-25 13:11 ` Will Deacon
  2015-02-26 18:23   ` Catalin Marinas
  0 siblings, 1 reply; 10+ messages in thread
From: Will Deacon @ 2015-02-25 13:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
> ARM64 CPUidle driver requires the cpu_do_idle function so that it can
> be used to enter the shallowest idle state, and it is declared in
> asm/proc-fns.h.
> 
> The current ARM64 CPUidle driver does not include asm/proc-fns.h
> explicitly and it has so far relied on implicit inclusion from other
> header files.
> 
> Owing to some header dependencies reshuffling this currently triggers
> build failures when CONFIG_ARM64_64K_PAGES=y:
> 
> drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
> drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
> function "cpu_do_idle" [-Werror=implicit-function-declaration]
>    cpu_do_idle();
>    ^
> 
> This patch adds the explicit inclusion of the asm/proc-fns.h header file
> to fix the build breakage and stop relying on implicit asm/proc-fns.h
> inclusion.
> 
> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> [lp: rewrote commit log]
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Tested-by: Mark Rutland <mark.rutland@arm.com>
> ---
> v2 changes:

Acked-by: Will Deacon <will.deacon@arm.com>

Catalin will pick this up for -rc2, I suspect.

Will

> - Picked up
>   http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325523.html
> - Rebased against 4.0-rc1 and rewrote commit log
> 
>  drivers/cpuidle/cpuidle-arm64.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c
> index 39a2c62..c8bb6c5 100644
> --- a/drivers/cpuidle/cpuidle-arm64.c
> +++ b/drivers/cpuidle/cpuidle-arm64.c
> @@ -19,6 +19,7 @@
>  #include <linux/of.h>
>  
>  #include <asm/cpuidle.h>
> +#include <asm/proc-fns.h>
>  
>  #include "dt_idle_states.h"
>  
> -- 
> 2.2.1
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-25 13:11 ` Will Deacon
@ 2015-02-26 18:23   ` Catalin Marinas
  2015-02-26 21:52     ` Rafael J. Wysocki
  2015-02-27 16:44     ` Daniel Lezcano
  0 siblings, 2 replies; 10+ messages in thread
From: Catalin Marinas @ 2015-02-26 18:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 25, 2015 at 01:11:40PM +0000, Will Deacon wrote:
> On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
> > ARM64 CPUidle driver requires the cpu_do_idle function so that it can
> > be used to enter the shallowest idle state, and it is declared in
> > asm/proc-fns.h.
> > 
> > The current ARM64 CPUidle driver does not include asm/proc-fns.h
> > explicitly and it has so far relied on implicit inclusion from other
> > header files.
> > 
> > Owing to some header dependencies reshuffling this currently triggers
> > build failures when CONFIG_ARM64_64K_PAGES=y:
> > 
> > drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
> > drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
> > function "cpu_do_idle" [-Werror=implicit-function-declaration]
> >    cpu_do_idle();
> >    ^
> > 
> > This patch adds the explicit inclusion of the asm/proc-fns.h header file
> > to fix the build breakage and stop relying on implicit asm/proc-fns.h
> > inclusion.
> > 
> > Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> > [lp: rewrote commit log]
> > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Mark Rutland <mark.rutland@arm.com>
> > ---
> > v2 changes:
> 
> Acked-by: Will Deacon <will.deacon@arm.com>
> 
> Catalin will pick this up for -rc2, I suspect.

I can merge this as long as Daniel or Rafael are fine with it.

> > - Picked up
> >   http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325523.html
> > - Rebased against 4.0-rc1 and rewrote commit log
> > 
> >  drivers/cpuidle/cpuidle-arm64.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c
> > index 39a2c62..c8bb6c5 100644
> > --- a/drivers/cpuidle/cpuidle-arm64.c
> > +++ b/drivers/cpuidle/cpuidle-arm64.c
> > @@ -19,6 +19,7 @@
> >  #include <linux/of.h>
> >  
> >  #include <asm/cpuidle.h>
> > +#include <asm/proc-fns.h>
> >  
> >  #include "dt_idle_states.h"
> >  

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-26 18:23   ` Catalin Marinas
@ 2015-02-26 21:52     ` Rafael J. Wysocki
  2015-02-27 16:44     ` Daniel Lezcano
  1 sibling, 0 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2015-02-26 21:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday, February 26, 2015 06:23:07 PM Catalin Marinas wrote:
> On Wed, Feb 25, 2015 at 01:11:40PM +0000, Will Deacon wrote:
> > On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
> > > ARM64 CPUidle driver requires the cpu_do_idle function so that it can
> > > be used to enter the shallowest idle state, and it is declared in
> > > asm/proc-fns.h.
> > > 
> > > The current ARM64 CPUidle driver does not include asm/proc-fns.h
> > > explicitly and it has so far relied on implicit inclusion from other
> > > header files.
> > > 
> > > Owing to some header dependencies reshuffling this currently triggers
> > > build failures when CONFIG_ARM64_64K_PAGES=y:
> > > 
> > > drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
> > > drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
> > > function "cpu_do_idle" [-Werror=implicit-function-declaration]
> > >    cpu_do_idle();
> > >    ^
> > > 
> > > This patch adds the explicit inclusion of the asm/proc-fns.h header file
> > > to fix the build breakage and stop relying on implicit asm/proc-fns.h
> > > inclusion.
> > > 
> > > Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> > > [lp: rewrote commit log]
> > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > > Tested-by: Mark Rutland <mark.rutland@arm.com>
> > > ---
> > > v2 changes:
> > 
> > Acked-by: Will Deacon <will.deacon@arm.com>
> > 
> > Catalin will pick this up for -rc2, I suspect.
> 
> I can merge this as long as Daniel or Rafael are fine with it.

I am, thanks!

> > > - Picked up
> > >   http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325523.html
> > > - Rebased against 4.0-rc1 and rewrote commit log
> > > 
> > >  drivers/cpuidle/cpuidle-arm64.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c
> > > index 39a2c62..c8bb6c5 100644
> > > --- a/drivers/cpuidle/cpuidle-arm64.c
> > > +++ b/drivers/cpuidle/cpuidle-arm64.c
> > > @@ -19,6 +19,7 @@
> > >  #include <linux/of.h>
> > >  
> > >  #include <asm/cpuidle.h>
> > > +#include <asm/proc-fns.h>
> > >  
> > >  #include "dt_idle_states.h"
> > >  

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-26 18:23   ` Catalin Marinas
  2015-02-26 21:52     ` Rafael J. Wysocki
@ 2015-02-27 16:44     ` Daniel Lezcano
  2015-02-27 17:16       ` Lorenzo Pieralisi
  1 sibling, 1 reply; 10+ messages in thread
From: Daniel Lezcano @ 2015-02-27 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/26/2015 07:23 PM, Catalin Marinas wrote:
> On Wed, Feb 25, 2015 at 01:11:40PM +0000, Will Deacon wrote:
>> On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
>>> ARM64 CPUidle driver requires the cpu_do_idle function so that it can
>>> be used to enter the shallowest idle state, and it is declared in
>>> asm/proc-fns.h.
>>>
>>> The current ARM64 CPUidle driver does not include asm/proc-fns.h
>>> explicitly and it has so far relied on implicit inclusion from other
>>> header files.
>>>
>>> Owing to some header dependencies reshuffling this currently triggers
>>> build failures when CONFIG_ARM64_64K_PAGES=y:
>>>
>>> drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
>>> drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
>>> function "cpu_do_idle" [-Werror=implicit-function-declaration]
>>>     cpu_do_idle();
>>>     ^
>>>
>>> This patch adds the explicit inclusion of the asm/proc-fns.h header file
>>> to fix the build breakage and stop relying on implicit asm/proc-fns.h
>>> inclusion.
>>>
>>> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
>>> [lp: rewrote commit log]
>>> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
>>> Tested-by: Mark Rutland <mark.rutland@arm.com>
>>> ---
>>> v2 changes:
>>
>> Acked-by: Will Deacon <will.deacon@arm.com>
>>
>> Catalin will pick this up for -rc2, I suspect.
>
> I can merge this as long as Daniel or Rafael are fine with it.

I am wondering if asm/proc-fns.h shouldn't be directly included in 
asm/cpuidle.h, otherwise each time cpuidle.h is included somewhere we 
have to include proc-fns.h also.

It is not a problem for ARM64 because there is not a big number of 
cpuidle drivers but for ARM32 it is not the case. I have a patchset 
which put proc-fns.h inclusion directly in asm/cpuidle.h and cleanup the 
drivers. For the sake of consistency between ARM/ARM64 may be it would 
make sense to include in the cpuidle.h directly, no ?

>>> - Picked up
>>>    http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325523.html
>>> - Rebased against 4.0-rc1 and rewrote commit log
>>>
>>>   drivers/cpuidle/cpuidle-arm64.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c
>>> index 39a2c62..c8bb6c5 100644
>>> --- a/drivers/cpuidle/cpuidle-arm64.c
>>> +++ b/drivers/cpuidle/cpuidle-arm64.c
>>> @@ -19,6 +19,7 @@
>>>   #include <linux/of.h>
>>>
>>>   #include <asm/cpuidle.h>
>>> +#include <asm/proc-fns.h>
>>>
>>>   #include "dt_idle_states.h"
>>>


-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-27 16:44     ` Daniel Lezcano
@ 2015-02-27 17:16       ` Lorenzo Pieralisi
  2015-02-27 17:18         ` Daniel Lezcano
  0 siblings, 1 reply; 10+ messages in thread
From: Lorenzo Pieralisi @ 2015-02-27 17:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 27, 2015 at 04:44:42PM +0000, Daniel Lezcano wrote:
> On 02/26/2015 07:23 PM, Catalin Marinas wrote:
> > On Wed, Feb 25, 2015 at 01:11:40PM +0000, Will Deacon wrote:
> >> On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
> >>> ARM64 CPUidle driver requires the cpu_do_idle function so that it can
> >>> be used to enter the shallowest idle state, and it is declared in
> >>> asm/proc-fns.h.
> >>>
> >>> The current ARM64 CPUidle driver does not include asm/proc-fns.h
> >>> explicitly and it has so far relied on implicit inclusion from other
> >>> header files.
> >>>
> >>> Owing to some header dependencies reshuffling this currently triggers
> >>> build failures when CONFIG_ARM64_64K_PAGES=y:
> >>>
> >>> drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
> >>> drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
> >>> function "cpu_do_idle" [-Werror=implicit-function-declaration]
> >>>     cpu_do_idle();
> >>>     ^
> >>>
> >>> This patch adds the explicit inclusion of the asm/proc-fns.h header file
> >>> to fix the build breakage and stop relying on implicit asm/proc-fns.h
> >>> inclusion.
> >>>
> >>> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> >>> [lp: rewrote commit log]
> >>> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> >>> Tested-by: Mark Rutland <mark.rutland@arm.com>
> >>> ---
> >>> v2 changes:
> >>
> >> Acked-by: Will Deacon <will.deacon@arm.com>
> >>
> >> Catalin will pick this up for -rc2, I suspect.
> >
> > I can merge this as long as Daniel or Rafael are fine with it.
> 
> I am wondering if asm/proc-fns.h shouldn't be directly included in 
> asm/cpuidle.h, otherwise each time cpuidle.h is included somewhere we 
> have to include proc-fns.h also.
> 
> It is not a problem for ARM64 because there is not a big number of 
> cpuidle drivers but for ARM32 it is not the case. I have a patchset 
> which put proc-fns.h inclusion directly in asm/cpuidle.h and cleanup the 
> drivers. For the sake of consistency between ARM/ARM64 may be it would 
> make sense to include in the cpuidle.h directly, no ?

This patch is a build fix, and I'd rather get it in asap. We can move
the inclusion and merge the resulting clean-up patch in your series later.
I will put together the patch now, if Catalin has the pull request ready
to be sent I do not see the point in delaying it though.

Lorenzo

> >>> - Picked up
> >>>    http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325523.html
> >>> - Rebased against 4.0-rc1 and rewrote commit log
> >>>
> >>>   drivers/cpuidle/cpuidle-arm64.c | 1 +
> >>>   1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c
> >>> index 39a2c62..c8bb6c5 100644
> >>> --- a/drivers/cpuidle/cpuidle-arm64.c
> >>> +++ b/drivers/cpuidle/cpuidle-arm64.c
> >>> @@ -19,6 +19,7 @@
> >>>   #include <linux/of.h>
> >>>
> >>>   #include <asm/cpuidle.h>
> >>> +#include <asm/proc-fns.h>
> >>>
> >>>   #include "dt_idle_states.h"
> >>>
> 
> 
> -- 
>   <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
> 
> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-27 17:16       ` Lorenzo Pieralisi
@ 2015-02-27 17:18         ` Daniel Lezcano
  2015-02-27 17:34           ` Catalin Marinas
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Lezcano @ 2015-02-27 17:18 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/27/2015 06:16 PM, Lorenzo Pieralisi wrote:
> On Fri, Feb 27, 2015 at 04:44:42PM +0000, Daniel Lezcano wrote:
>> On 02/26/2015 07:23 PM, Catalin Marinas wrote:
>>> On Wed, Feb 25, 2015 at 01:11:40PM +0000, Will Deacon wrote:
>>>> On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
>>>>> ARM64 CPUidle driver requires the cpu_do_idle function so that it can
>>>>> be used to enter the shallowest idle state, and it is declared in
>>>>> asm/proc-fns.h.
>>>>>
>>>>> The current ARM64 CPUidle driver does not include asm/proc-fns.h
>>>>> explicitly and it has so far relied on implicit inclusion from other
>>>>> header files.
>>>>>
>>>>> Owing to some header dependencies reshuffling this currently triggers
>>>>> build failures when CONFIG_ARM64_64K_PAGES=y:
>>>>>
>>>>> drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
>>>>> drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
>>>>> function "cpu_do_idle" [-Werror=implicit-function-declaration]
>>>>>      cpu_do_idle();
>>>>>      ^
>>>>>
>>>>> This patch adds the explicit inclusion of the asm/proc-fns.h header file
>>>>> to fix the build breakage and stop relying on implicit asm/proc-fns.h
>>>>> inclusion.
>>>>>
>>>>> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
>>>>> [lp: rewrote commit log]
>>>>> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
>>>>> Tested-by: Mark Rutland <mark.rutland@arm.com>
>>>>> ---
>>>>> v2 changes:
>>>>
>>>> Acked-by: Will Deacon <will.deacon@arm.com>
>>>>
>>>> Catalin will pick this up for -rc2, I suspect.
>>>
>>> I can merge this as long as Daniel or Rafael are fine with it.
>>
>> I am wondering if asm/proc-fns.h shouldn't be directly included in
>> asm/cpuidle.h, otherwise each time cpuidle.h is included somewhere we
>> have to include proc-fns.h also.
>>
>> It is not a problem for ARM64 because there is not a big number of
>> cpuidle drivers but for ARM32 it is not the case. I have a patchset
>> which put proc-fns.h inclusion directly in asm/cpuidle.h and cleanup the
>> drivers. For the sake of consistency between ARM/ARM64 may be it would
>> make sense to include in the cpuidle.h directly, no ?
>
> This patch is a build fix, and I'd rather get it in asap. We can move
> the inclusion and merge the resulting clean-up patch in your series later.
> I will put together the patch now, if Catalin has the pull request ready
> to be sent I do not see the point in delaying it though.

I was just suggesting to put the proc-fns.h inclusion in cpuidle.h 
directly. That fixes the build also.

>>>>> - Picked up
>>>>>     http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325523.html
>>>>> - Rebased against 4.0-rc1 and rewrote commit log
>>>>>
>>>>>    drivers/cpuidle/cpuidle-arm64.c | 1 +
>>>>>    1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c
>>>>> index 39a2c62..c8bb6c5 100644
>>>>> --- a/drivers/cpuidle/cpuidle-arm64.c
>>>>> +++ b/drivers/cpuidle/cpuidle-arm64.c
>>>>> @@ -19,6 +19,7 @@
>>>>>    #include <linux/of.h>
>>>>>
>>>>>    #include <asm/cpuidle.h>
>>>>> +#include <asm/proc-fns.h>
>>>>>
>>>>>    #include "dt_idle_states.h"
>>>>>
>>
>>
>> --
>>    <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
>>
>> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
>> <http://twitter.com/#!/linaroorg> Twitter |
>> <http://www.linaro.org/linaro-blog/> Blog
>>
>>


-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-27 17:18         ` Daniel Lezcano
@ 2015-02-27 17:34           ` Catalin Marinas
  2015-02-27 17:54             ` Lorenzo Pieralisi
  0 siblings, 1 reply; 10+ messages in thread
From: Catalin Marinas @ 2015-02-27 17:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 27, 2015 at 06:18:59PM +0100, Daniel Lezcano wrote:
> On 02/27/2015 06:16 PM, Lorenzo Pieralisi wrote:
> >On Fri, Feb 27, 2015 at 04:44:42PM +0000, Daniel Lezcano wrote:
> >>On 02/26/2015 07:23 PM, Catalin Marinas wrote:
> >>>On Wed, Feb 25, 2015 at 01:11:40PM +0000, Will Deacon wrote:
> >>>>On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
> >>>>>ARM64 CPUidle driver requires the cpu_do_idle function so that it can
> >>>>>be used to enter the shallowest idle state, and it is declared in
> >>>>>asm/proc-fns.h.
> >>>>>
> >>>>>The current ARM64 CPUidle driver does not include asm/proc-fns.h
> >>>>>explicitly and it has so far relied on implicit inclusion from other
> >>>>>header files.
> >>>>>
> >>>>>Owing to some header dependencies reshuffling this currently triggers
> >>>>>build failures when CONFIG_ARM64_64K_PAGES=y:
> >>>>>
> >>>>>drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
> >>>>>drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
> >>>>>function "cpu_do_idle" [-Werror=implicit-function-declaration]
> >>>>>     cpu_do_idle();
> >>>>>     ^
> >>>>>
> >>>>>This patch adds the explicit inclusion of the asm/proc-fns.h header file
> >>>>>to fix the build breakage and stop relying on implicit asm/proc-fns.h
> >>>>>inclusion.
> >>>>>
> >>>>>Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> >>>>>[lp: rewrote commit log]
> >>>>>Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> >>>>>Tested-by: Mark Rutland <mark.rutland@arm.com>
> >>>>>---
> >>>>>v2 changes:
> >>>>
> >>>>Acked-by: Will Deacon <will.deacon@arm.com>
> >>>>
> >>>>Catalin will pick this up for -rc2, I suspect.
> >>>
> >>>I can merge this as long as Daniel or Rafael are fine with it.
> >>
> >>I am wondering if asm/proc-fns.h shouldn't be directly included in
> >>asm/cpuidle.h, otherwise each time cpuidle.h is included somewhere we
> >>have to include proc-fns.h also.
> >>
> >>It is not a problem for ARM64 because there is not a big number of
> >>cpuidle drivers but for ARM32 it is not the case. I have a patchset
> >>which put proc-fns.h inclusion directly in asm/cpuidle.h and cleanup the
> >>drivers. For the sake of consistency between ARM/ARM64 may be it would
> >>make sense to include in the cpuidle.h directly, no ?
> >
> >This patch is a build fix, and I'd rather get it in asap. We can move
> >the inclusion and merge the resulting clean-up patch in your series later.
> >I will put together the patch now, if Catalin has the pull request ready
> >to be sent I do not see the point in delaying it though.
> 
> I was just suggesting to put the proc-fns.h inclusion in cpuidle.h directly.
> That fixes the build also.

This would do as well, especially since you plan to clean up arch/arm as
well (or just move the cpu_do_idle() prototype in asm/cpuidle.h; we
moved cpu_suspend() there already).

-- 
Catalin

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-27 17:34           ` Catalin Marinas
@ 2015-02-27 17:54             ` Lorenzo Pieralisi
  2015-02-27 18:03               ` Catalin Marinas
  0 siblings, 1 reply; 10+ messages in thread
From: Lorenzo Pieralisi @ 2015-02-27 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 27, 2015 at 05:34:22PM +0000, Catalin Marinas wrote:
> On Fri, Feb 27, 2015 at 06:18:59PM +0100, Daniel Lezcano wrote:
> > On 02/27/2015 06:16 PM, Lorenzo Pieralisi wrote:
> > >On Fri, Feb 27, 2015 at 04:44:42PM +0000, Daniel Lezcano wrote:
> > >>On 02/26/2015 07:23 PM, Catalin Marinas wrote:
> > >>>On Wed, Feb 25, 2015 at 01:11:40PM +0000, Will Deacon wrote:
> > >>>>On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
> > >>>>>ARM64 CPUidle driver requires the cpu_do_idle function so that it can
> > >>>>>be used to enter the shallowest idle state, and it is declared in
> > >>>>>asm/proc-fns.h.
> > >>>>>
> > >>>>>The current ARM64 CPUidle driver does not include asm/proc-fns.h
> > >>>>>explicitly and it has so far relied on implicit inclusion from other
> > >>>>>header files.
> > >>>>>
> > >>>>>Owing to some header dependencies reshuffling this currently triggers
> > >>>>>build failures when CONFIG_ARM64_64K_PAGES=y:
> > >>>>>
> > >>>>>drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
> > >>>>>drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
> > >>>>>function "cpu_do_idle" [-Werror=implicit-function-declaration]
> > >>>>>     cpu_do_idle();
> > >>>>>     ^
> > >>>>>
> > >>>>>This patch adds the explicit inclusion of the asm/proc-fns.h header file
> > >>>>>to fix the build breakage and stop relying on implicit asm/proc-fns.h
> > >>>>>inclusion.
> > >>>>>
> > >>>>>Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> > >>>>>[lp: rewrote commit log]
> > >>>>>Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > >>>>>Tested-by: Mark Rutland <mark.rutland@arm.com>
> > >>>>>---
> > >>>>>v2 changes:
> > >>>>
> > >>>>Acked-by: Will Deacon <will.deacon@arm.com>
> > >>>>
> > >>>>Catalin will pick this up for -rc2, I suspect.
> > >>>
> > >>>I can merge this as long as Daniel or Rafael are fine with it.
> > >>
> > >>I am wondering if asm/proc-fns.h shouldn't be directly included in
> > >>asm/cpuidle.h, otherwise each time cpuidle.h is included somewhere we
> > >>have to include proc-fns.h also.
> > >>
> > >>It is not a problem for ARM64 because there is not a big number of
> > >>cpuidle drivers but for ARM32 it is not the case. I have a patchset
> > >>which put proc-fns.h inclusion directly in asm/cpuidle.h and cleanup the
> > >>drivers. For the sake of consistency between ARM/ARM64 may be it would
> > >>make sense to include in the cpuidle.h directly, no ?
> > >
> > >This patch is a build fix, and I'd rather get it in asap. We can move
> > >the inclusion and merge the resulting clean-up patch in your series later.
> > >I will put together the patch now, if Catalin has the pull request ready
> > >to be sent I do not see the point in delaying it though.
> > 
> > I was just suggesting to put the proc-fns.h inclusion in cpuidle.h directly.
> > That fixes the build also.
> 
> This would do as well, especially since you plan to clean up arch/arm as
> well (or just move the cpu_do_idle() prototype in asm/cpuidle.h; we
> moved cpu_suspend() there already).

What I wanted to say is that the clean-up will be merged the coming
cycle anyway, not now, so I wanted to avoid delaying the pull request
for something that could have been done later.

Reworked patch below (I kept the tags to avoid even more churn for a
one-liner).

Thanks,
Lorenzo

-- >8 --
Subject: [PATCH] ARM64: cpuidle: add asm/proc-fns.h inclusion

ARM64 CPUidle driver requires the cpu_do_idle function so that it can
be used to enter the shallowest idle state, and it is declared in
asm/proc-fns.h.

The current ARM64 CPUidle driver does not include asm/proc-fns.h
explicitly and it has so far relied on implicit inclusion from other
header files.

Owing to some header dependencies reshuffling this currently triggers
build failures when CONFIG_ARM64_64K_PAGES=y:

drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
function "cpu_do_idle" [-Werror=implicit-function-declaration]
   cpu_do_idle();
   ^

This patch adds the explicit inclusion of the asm/proc-fns.h header file
in the arm64 asm/cpuidle.h header file, so that the build breakage is fixed
and the required header inclusion is added to the appropriate arch back-end
CPUidle header, already included by the CPUidle arm64 driver, where
CPUidle arch related function declarations belong.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[lp: rewrote commit log, moved include to arm64 asm/cpuidle.h]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
---
 arch/arm64/include/asm/cpuidle.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/cpuidle.h b/arch/arm64/include/asm/cpuidle.h
index 0710654..c60643f 100644
--- a/arch/arm64/include/asm/cpuidle.h
+++ b/arch/arm64/include/asm/cpuidle.h
@@ -1,6 +1,8 @@
 #ifndef __ASM_CPUIDLE_H
 #define __ASM_CPUIDLE_H
 
+#include <asm/proc-fns.h>
+
 #ifdef CONFIG_CPU_IDLE
 extern int cpu_init_idle(unsigned int cpu);
 extern int cpu_suspend(unsigned long arg);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly
  2015-02-27 17:54             ` Lorenzo Pieralisi
@ 2015-02-27 18:03               ` Catalin Marinas
  0 siblings, 0 replies; 10+ messages in thread
From: Catalin Marinas @ 2015-02-27 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 27, 2015 at 05:54:31PM +0000, Lorenzo Pieralisi wrote:
> On Fri, Feb 27, 2015 at 05:34:22PM +0000, Catalin Marinas wrote:
> > On Fri, Feb 27, 2015 at 06:18:59PM +0100, Daniel Lezcano wrote:
> > > On 02/27/2015 06:16 PM, Lorenzo Pieralisi wrote:
> > > >On Fri, Feb 27, 2015 at 04:44:42PM +0000, Daniel Lezcano wrote:
> > > >>On 02/26/2015 07:23 PM, Catalin Marinas wrote:
> > > >>>On Wed, Feb 25, 2015 at 01:11:40PM +0000, Will Deacon wrote:
> > > >>>>On Wed, Feb 25, 2015 at 12:59:42PM +0000, Lorenzo Pieralisi wrote:
> > > >>>>>ARM64 CPUidle driver requires the cpu_do_idle function so that it can
> > > >>>>>be used to enter the shallowest idle state, and it is declared in
> > > >>>>>asm/proc-fns.h.
> > > >>>>>
> > > >>>>>The current ARM64 CPUidle driver does not include asm/proc-fns.h
> > > >>>>>explicitly and it has so far relied on implicit inclusion from other
> > > >>>>>header files.
> > > >>>>>
> > > >>>>>Owing to some header dependencies reshuffling this currently triggers
> > > >>>>>build failures when CONFIG_ARM64_64K_PAGES=y:
> > > >>>>>
> > > >>>>>drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
> > > >>>>>drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
> > > >>>>>function "cpu_do_idle" [-Werror=implicit-function-declaration]
> > > >>>>>     cpu_do_idle();
> > > >>>>>     ^
> > > >>>>>
> > > >>>>>This patch adds the explicit inclusion of the asm/proc-fns.h header file
> > > >>>>>to fix the build breakage and stop relying on implicit asm/proc-fns.h
> > > >>>>>inclusion.
> > > >>>>>
> > > >>>>>Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> > > >>>>>[lp: rewrote commit log]
> > > >>>>>Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > > >>>>>Tested-by: Mark Rutland <mark.rutland@arm.com>
> > > >>>>>---
> > > >>>>>v2 changes:
> > > >>>>
> > > >>>>Acked-by: Will Deacon <will.deacon@arm.com>
> > > >>>>
> > > >>>>Catalin will pick this up for -rc2, I suspect.
> > > >>>
> > > >>>I can merge this as long as Daniel or Rafael are fine with it.
> > > >>
> > > >>I am wondering if asm/proc-fns.h shouldn't be directly included in
> > > >>asm/cpuidle.h, otherwise each time cpuidle.h is included somewhere we
> > > >>have to include proc-fns.h also.
> > > >>
> > > >>It is not a problem for ARM64 because there is not a big number of
> > > >>cpuidle drivers but for ARM32 it is not the case. I have a patchset
> > > >>which put proc-fns.h inclusion directly in asm/cpuidle.h and cleanup the
> > > >>drivers. For the sake of consistency between ARM/ARM64 may be it would
> > > >>make sense to include in the cpuidle.h directly, no ?
> > > >
> > > >This patch is a build fix, and I'd rather get it in asap. We can move
> > > >the inclusion and merge the resulting clean-up patch in your series later.
> > > >I will put together the patch now, if Catalin has the pull request ready
> > > >to be sent I do not see the point in delaying it though.
> > > 
> > > I was just suggesting to put the proc-fns.h inclusion in cpuidle.h directly.
> > > That fixes the build also.
> > 
> > This would do as well, especially since you plan to clean up arch/arm as
> > well (or just move the cpu_do_idle() prototype in asm/cpuidle.h; we
> > moved cpu_suspend() there already).
> 
> What I wanted to say is that the clean-up will be merged the coming
> cycle anyway, not now, so I wanted to avoid delaying the pull request
> for something that could have been done later.

Agree, but since the change is small, I'll get your reworked patch which
doesn't touch cpuidle-arm64.c

Thanks.

-- 
Catalin

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-27 18:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 12:59 [PATCH v2] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h explicitly Lorenzo Pieralisi
2015-02-25 13:11 ` Will Deacon
2015-02-26 18:23   ` Catalin Marinas
2015-02-26 21:52     ` Rafael J. Wysocki
2015-02-27 16:44     ` Daniel Lezcano
2015-02-27 17:16       ` Lorenzo Pieralisi
2015-02-27 17:18         ` Daniel Lezcano
2015-02-27 17:34           ` Catalin Marinas
2015-02-27 17:54             ` Lorenzo Pieralisi
2015-02-27 18:03               ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.