Skip to content

Commit

Permalink
cpufreq: fix qoriq uniprocessor build
Browse files Browse the repository at this point in the history
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: 2f24935 ("cpufreq: qoriq: rename the driver")
Cc: Tang Yuantian <Yuantian.Tang@freescale.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Arnd Bergmann authored and Rafael J. Wysocki committed Apr 11, 2015
1 parent 38fc783 commit 4492d1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/cpufreq/qoriq-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4492d1a

Please sign in to comment.