summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/qoriq-cpufreq.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-04-11 00:17:11 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-04-11 02:07:28 +0200
commit4492d1a2e9566495858d25b35093e11509707407 (patch)
treef2d1ddcb19171081d411c24360a20604464a249a /drivers/cpufreq/qoriq-cpufreq.c
parent38fc7839bae2db7a1321d9f6bfc7b5b3ccb59d2a (diff)
downloadlinux-4492d1a2e9566495858d25b35093e11509707407.tar.gz
linux-4492d1a2e9566495858d25b35093e11509707407.tar.bz2
linux-4492d1a2e9566495858d25b35093e11509707407.zip
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. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 2f249358eedaf ("cpufreq: qoriq: rename the driver") Cc: Tang Yuantian <Yuantian.Tang@freescale.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/qoriq-cpufreq.c')
-rw-r--r--drivers/cpufreq/qoriq-cpufreq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index 9fd51c860308..88b21ae0d6b0 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -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