Skip to contentSkip to conversation

cpufreq: fix qoriq uniprocessor build

PATCH In review Arnd Bergmann 2 participants 2 messages Apr 10, 2015 – Apr 11, 2015 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: fix qoriq uniprocessor build

The qoriq-cpufreq driver contains a hack for powerpc to include asm/smp.h on uniprocessor builds so it can get the hardware CPU number. On ARM, it does not require this hack, but instead gets a compile error:

In file included from drivers/cpufreq/qoriq-cpufreq.c:24:0:
arch/arm/include/asm/smp.h:18:3: error: #error "<asm/smp.h> included in non-SMP build" arch/arm/include/asm/smp.h:21:0: warning: "raw_smp_processor_id" redefined

This adds an #ifdef to mirror the one in its get_cpu_physical_id() function.

Fixes 2f249358eedaf ("cpufreq: qoriq: rename the driver")
Cc Tang Yuantian <[email protected]>
drivers/cpufreq/qoriq-cpufreq.c +2 -0
index 9fd51c860308..88b21ae0d6b0 100644
@@ -21,7 +21,9 @@
 #include <linux/slab.h>
 #include <linux/smp.h>
 
+#if !defined(CONFIG_ARM)
 #include <asm/smp.h>	/* for get_hard_smp_processor_id() in UP configs */
+#endif
 
 /**
  * struct cpu_data
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines · Arnd Bergmann

The qoriq-cpufreq driver contains a hack for powerpc to include asm/smp.h on uniprocessor builds so it can get the hardware CPU number. On ARM, it does not require this hack, but instead gets a compile error:

In file included from drivers/cpufreq/qoriq-cpufreq.c:24:0:
arch/arm/include/asm/smp.h:18:3: error: #error "<asm/smp.h> included in non-SMP build" arch/arm/include/asm/smp.h:21:0: warning: "raw_smp_processor_id" redefined

This adds an #ifdef to mirror the one in its get_cpu_physical_id() function.

Fixes 2f249358eedaf ("cpufreq: qoriq: rename the driver")
Cc Tang Yuantian <[email protected]>
drivers/cpufreq/qoriq-cpufreq.c +0 -0
index 9fd51c860308..88b21ae0d6b0 100644

drivers/cpufreq/qoriq-cpufreq.c line 26

Quoted 6 lines
drivers/cpufreq/qoriq-cpufreq.c +2 -0
@@ -21,7 +21,9 @@
 #include <linux/slab.h>
 #include <linux/smp.h>
 
+#if !defined(CONFIG_ARM)
 #include <asm/smp.h>   /* for get_hard_smp_processor_id() in UP configs */
+#endif