mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] cpufreq: ppc: Add missing #include <asm/smp.h>
@ 2015-03-04 11:56 Geert Uytterhoeven
  2015-03-04 14:22 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2015-03-04 11:56 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: linux-pm, linuxppc-dev, linux-kernel, Geert Uytterhoeven

If CONFIG_SMP=n, <linux/smp.h> does not include <asm/smp.h>, causing:

drivers/cpufreq/ppc-corenet-cpufreq.c: In function 'corenet_cpufreq_cpu_init':
drivers/cpufreq/ppc-corenet-cpufreq.c:173:3: error: implicit declaration of function 'get_hard_smp_processor_id' [-Werror=implicit-function-declaration]

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Seen with e.g. corenet64_smp_defconfig + CONFIG_CPU_FREQ=y,
CONFIG_PPC_CORENET_CPUFREQ=y, CONFIG_SMP=n

v2:
  - Add comment for #include directive, as requested by Viresh
---
 drivers/cpufreq/ppc-corenet-cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c
index bee5df7794d33d10..7cb4b766cf948d3f 100644
--- a/drivers/cpufreq/ppc-corenet-cpufreq.c
+++ b/drivers/cpufreq/ppc-corenet-cpufreq.c
@@ -22,6 +22,8 @@
 #include <linux/smp.h>
 #include <sysdev/fsl_soc.h>
 
+#include <asm/smp.h>	/* for get_hard_smp_processor_id() in UP configs */
+
 /**
  * struct cpu_data - per CPU data struct
  * @parent: the parent node of cpu clock
-- 
1.9.1


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

end of thread, other threads:[~2015-03-04 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 11:56 [PATCH v2] cpufreq: ppc: Add missing #include <asm/smp.h> Geert Uytterhoeven
2015-03-04 14:22 ` 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

all inboxes | Powered by JetHome®