diff mbox

drivers: cpuidle: Explictly include proc-fns.h for cpuidle-arm64

Message ID 20150225112758.GB20214@red-moon (mailing list archive)
State New, archived
Headers show

Commit Message

Lorenzo Pieralisi Feb. 25, 2015, 11:27 a.m. UTC
On Wed, Feb 25, 2015 at 11:18:29AM +0000, Mark Rutland wrote:

[...]

> >  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 80704b9..f1d5422 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 <asm/suspend.h>
> 
> I wasn't able to apply this patch atop of v4.0-rc1 or current mainline;
> there's no asm/suspend.h include in either of those. Which tree is this
> based on?

Yes, it does not apply to mainline, either we fix that up or here is
the version I was sending on top of mainline.

Thanks,
Lorenzo

-- >8 --
Subject: [PATCH] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h
 explicitly

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.

This patch adds the explicit inclusion of the asm/proc-fns.h header file
to stop relying on implicit inclusion of the same file through implicit
header files dependencies.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[lp: rebased/rewrote commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 drivers/cpuidle/cpuidle-arm64.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Rutland Feb. 25, 2015, 11:39 a.m. UTC | #1
Hi Lorenzo,

> Subject: [PATCH] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h
>  explicitly
> 
> 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.
> 
> This patch adds the explicit inclusion of the asm/proc-fns.h header file
> to stop relying on implicit inclusion of the same file through implicit
> header files dependencies.

Laura's original commit message made it clear that this was a real
problem for CONFIG_ARM64_64K_PAGES=y, while this makes it sound like a
cleanup.

We should make it clear that without this the build is broken when
CONFIG_ARM64_64K_PAGES=y.

> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> [lp: rebased/rewrote commit log]
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

Otherwise this applies, and seems to work:

Tested-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  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
> 
>
Laura Abbott Feb. 25, 2015, 6:04 p.m. UTC | #2
On 2/25/2015 3:27 AM, Lorenzo Pieralisi wrote:
> On Wed, Feb 25, 2015 at 11:18:29AM +0000, Mark Rutland wrote:
>
> [...]
>
>>>   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 80704b9..f1d5422 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 <asm/suspend.h>
>>
>> I wasn't able to apply this patch atop of v4.0-rc1 or current mainline;
>> there's no asm/suspend.h include in either of those. Which tree is this
>> based on?
>
> Yes, it does not apply to mainline, either we fix that up or here is
> the version I was sending on top of mainline.
>
> Thanks,
> Lorenzo
>

Blah, I forgot I had cruft in my tree. Sorry about that.

> -- >8 --
> Subject: [PATCH] drivers: cpuidle: cpuidle-arm64: include asm/proc-fns.h
>   explicitly
>
> 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.
>
> This patch adds the explicit inclusion of the asm/proc-fns.h header file
> to stop relying on implicit inclusion of the same file through implicit
> header files dependencies.
>
> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> [lp: rebased/rewrote commit log]
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> ---
>   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"
>
>
diff mbox

Patch

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"