diff options
author | Rich Felker <dalias@libc.org> | 2018-05-05 16:40:23 -0400 |
---|---|---|
committer | Rich Felker <dalias@libc.org> | 2018-05-05 16:51:40 -0400 |
commit | 6cb465972c4eb6741b3094a58a65e527fc63c100 (patch) | |
tree | bce9d931eadd184d2b1644dc6e69209e5be3c33a | |
parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
download | linux-6cb465972c4eb6741b3094a58a65e527fc63c100.tar.gz linux-6cb465972c4eb6741b3094a58a65e527fc63c100.tar.bz2 linux-6cb465972c4eb6741b3094a58a65e527fc63c100.zip |
sh: fix build failure for J2 cpu with SMP disabled
The sh asm/smp.h defines a fallback hard_smp_processor_id macro for
the !SMP case, but linux/smp.h never includes asm/smp.h in the !SMP
case.
Signed-off-by: Rich Felker <dalias@libc.org>
-rw-r--r-- | arch/sh/kernel/cpu/sh2/probe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c index 4205f6d42b69..a5bd03642678 100644 --- a/arch/sh/kernel/cpu/sh2/probe.c +++ b/arch/sh/kernel/cpu/sh2/probe.c @@ -43,7 +43,11 @@ void __ref cpu_probe(void) #endif #if defined(CONFIG_CPU_J2) +#if defined(CONFIG_SMP) unsigned cpu = hard_smp_processor_id(); +#else + unsigned cpu = 0; +#endif if (cpu == 0) of_scan_flat_dt(scan_cache, NULL); if (j2_ccr_base) __raw_writel(0x80000303, j2_ccr_base + 4*cpu); if (cpu != 0) return; |