Skip to contentSkip to conversation

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

PATCH New Laura Abbott 3 participants 6 messages Feb 25, 2015 CPU idle time management framework

lore
Share & tools
lore
#0 lore raw

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

cpuidle-arm64.c fails to compile with CONFIG_ARM64_64K_PAGES=y

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

Explicitly add the header file with the declaration of cpu_do_idle.

---
Not sure how long this has been broken, bisect between v3.19 and master showed 6b00f7efb5303418c231994c91fb8239f5ada260 as the first bad commit which isn't particularly helpful. Probably some header shuffling.

---
 drivers/cpuidle/cpuidle-arm64.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-arm64.c +1 -0
index 80704b9..f1d5422 100644
@@ -19,6 +19,7 @@
 #include <linux/of.h>
 
 #include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
 #include <asm/suspend.h>
 
 #include "dt_idle_states.h"
Signature · 2 lines
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
#1 lore raw

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

Quoted 8 lines · Laura Abbott

cpuidle-arm64.c fails to compile with CONFIG_ARM64_64K_PAGES=y

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

   cpu_do_idle();
   ^

Explicitly add the header file with the declaration of cpu_do_idle.

I was about to send the same patch.

Quoted 6 lines

---
Not sure how long this has been broken, bisect between v3.19 and master showed 6b00f7efb5303418c231994c91fb8239f5ada260 as the first bad commit which isn't particularly helpful. Probably some header shuffling.

Yes, agreed, I was trying to bisect it yesterday, but including the asm/proc-fns.h file is the right thing to do regardless.

Thanks,
Lorenzo

Quoted 21 lines
---
 drivers/cpuidle/cpuidle-arm64.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-arm64.c +1 -0
index 80704b9..f1d5422 100644
@@ -19,6 +19,7 @@
 #include <linux/of.h>
 
 #include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
 #include <asm/suspend.h>
 
 #include "dt_idle_states.h"
Signature · 2 lines
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
#2 lore raw

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

In reply to Laura Abbott

Hi Laura,

Quoted 10 lines · Laura Abbott

cpuidle-arm64.c fails to compile with CONFIG_ARM64_64K_PAGES=y

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

   cpu_do_idle();
   ^

Explicitly add the header file with the declaration of cpu_do_idle.

I just hit the same problem. The fix looks sane, and it would be nice to have it queued ASAP.

Quoted 13 lines

---
Not sure how long this has been broken, bisect between v3.19 and master showed 6b00f7efb5303418c231994c91fb8239f5ada260 as the first bad commit which isn't particularly helpful. Probably some header shuffling.

---
 drivers/cpuidle/cpuidle-arm64.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-arm64.c +0 -0
index 80704b9..f1d5422 100644

drivers/cpuidle/cpuidle-arm64.c line 23

Quoted 5 lines
drivers/cpuidle/cpuidle-arm64.c +1 -0
@@ -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?

Mark.

#3 lore raw

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

On Wed, Feb 25, 2015 at 11:18:29AM +0000, Mark Rutland wrote:

[...]

Quoted 10 lines
Quoted 10 lines
 drivers/cpuidle/cpuidle-arm64.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-arm64.c +0 -0
index 80704b9..f1d5422 100644
@@ -19,6 +19,7 @@
 #include <linux/of.h>
 
Quoted 7 lines

drivers/cpuidle/cpuidle-arm64.c line 23

Quoted 3 lines
drivers/cpuidle/cpuidle-arm64.c +1 -0
 #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.

[lp: rebased/rewrote commit log]
---
 drivers/cpuidle/cpuidle-arm64.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-arm64.c +1 -0
index 39a2c62..c8bb6c5 100644
@@ -19,6 +19,7 @@
 #include <linux/of.h>
 
 #include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
 
 #include "dt_idle_states.h"
 
Signature · 1 line
2.2.1
#4 lore raw

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

Hi Lorenzo,

Quoted 10 lines

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.

Quoted 3 lines
[lp: rebased/rewrote commit log]

Otherwise this applies, and seems to work:

Mark.

Quoted 20 lines
---
 drivers/cpuidle/cpuidle-arm64.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-arm64.c +1 -0
index 39a2c62..c8bb6c5 100644
@@ -19,6 +19,7 @@
 #include <linux/of.h>
 
 #include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
 
 #include "dt_idle_states.h"
 
Signature · 1 line
2.2.1
#5 lore raw

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

In reply to Lorenzo Pieralisi
Quoted 22 lines · Lorenzo Pieralisi

On Wed, Feb 25, 2015 at 11:18:29AM +0000, Mark Rutland wrote:

[...]

Quoted 10 lines
Quoted 10 lines
  drivers/cpuidle/cpuidle-arm64.c | 1 +
  1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-arm64.c +0 -0
index 80704b9..f1d5422 100644
@@ -19,6 +19,7 @@
  #include <linux/of.h>
 
Quoted 7 lines

drivers/cpuidle/cpuidle-arm64.c

Quoted 3 lines
drivers/cpuidle/cpuidle-arm64.c +1 -0
  #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?

Quoted 6 lines

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.

Quoted 32 lines

-- >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.

[lp: rebased/rewrote commit log]
---
  drivers/cpuidle/cpuidle-arm64.c | 1 +
  1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-arm64.c +1 -0
index 39a2c62..c8bb6c5 100644
@@ -19,6 +19,7 @@
  #include <linux/of.h>
 
  #include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
 
  #include "dt_idle_states.h"
 
Signature · 3 lines
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project