diff options
author | Magnus Damm <damm+renesas@opensource.se> | 2014-06-06 03:20:10 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-06-26 02:51:43 -0400 |
commit | 8b438bcb9009609a15e5480ab1947acff6fb9005 (patch) | |
tree | 007f22f8fd4c319a1dba7145e3c26c8757ebb693 | |
parent | 5201b5a792e95e3ecebe74cd3553413a67da09db (diff) |
ARM: shmobile: Allow use of boot code for non-SMP case
Allow build of platsmp.c and headsmp.S even though
SMP is disabled in the kernel configuration. With
this in place it is possible to share the reset
vector setup code with power management code that
needs to be built even though SMP is disabled.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | arch/arm/mach-shmobile/Makefile | 11 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/headsmp.S | 13 |
2 files changed, 15 insertions, 9 deletions
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 9c0ad3e115a6..279d3f3aad4d 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -34,17 +34,17 @@ obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o | |||
34 | obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o | 34 | obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o |
35 | endif | 35 | endif |
36 | 36 | ||
37 | # CPU reset vector handling objects | ||
38 | cpu-y := platsmp.o headsmp.o | ||
39 | |||
37 | # SMP objects | 40 | # SMP objects |
38 | smp-y := platsmp.o headsmp.o | 41 | smp-y := $(cpu-y) |
39 | smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o | 42 | smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o |
40 | smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o | 43 | smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o |
41 | smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o | 44 | smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o |
42 | smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o | 45 | smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o |
43 | smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o | 46 | smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o |
44 | 47 | ||
45 | # IRQ objects | ||
46 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | ||
47 | |||
48 | # PM objects | 48 | # PM objects |
49 | obj-$(CONFIG_SUSPEND) += suspend.o | 49 | obj-$(CONFIG_SUSPEND) += suspend.o |
50 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 50 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
@@ -55,6 +55,9 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o | |||
55 | obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o | 55 | obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o |
56 | obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o | 56 | obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o |
57 | 57 | ||
58 | # IRQ objects | ||
59 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | ||
60 | |||
58 | # Board objects | 61 | # Board objects |
59 | ifdef CONFIG_ARCH_SHMOBILE_MULTI | 62 | ifdef CONFIG_ARCH_SHMOBILE_MULTI |
60 | obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o | 63 | obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o |
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index e5be5c88644b..faf82144a262 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S | |||
@@ -10,14 +10,17 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | #include <linux/linkage.h> | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/linkage.h> | ||
15 | #include <linux/threads.h> | ||
15 | #include <asm/memory.h> | 16 | #include <asm/memory.h> |
16 | 17 | ||
18 | #ifdef CONFIG_SMP | ||
17 | ENTRY(shmobile_invalidate_start) | 19 | ENTRY(shmobile_invalidate_start) |
18 | bl v7_invalidate_l1 | 20 | bl v7_invalidate_l1 |
19 | b secondary_startup | 21 | b secondary_startup |
20 | ENDPROC(shmobile_invalidate_start) | 22 | ENDPROC(shmobile_invalidate_start) |
23 | #endif | ||
21 | 24 | ||
22 | /* | 25 | /* |
23 | * Reset vector for secondary CPUs. | 26 | * Reset vector for secondary CPUs. |
@@ -68,7 +71,7 @@ shmobile_smp_boot_find_mpidr: | |||
68 | 71 | ||
69 | shmobile_smp_boot_next: | 72 | shmobile_smp_boot_next: |
70 | add r1, r1, #1 | 73 | add r1, r1, #1 |
71 | cmp r1, #CONFIG_NR_CPUS | 74 | cmp r1, #NR_CPUS |
72 | blo shmobile_smp_boot_find_mpidr | 75 | blo shmobile_smp_boot_find_mpidr |
73 | 76 | ||
74 | b shmobile_smp_sleep | 77 | b shmobile_smp_sleep |
@@ -85,10 +88,10 @@ ENDPROC(shmobile_smp_sleep) | |||
85 | 88 | ||
86 | .globl shmobile_smp_mpidr | 89 | .globl shmobile_smp_mpidr |
87 | shmobile_smp_mpidr: | 90 | shmobile_smp_mpidr: |
88 | 1: .space CONFIG_NR_CPUS * 4 | 91 | 1: .space NR_CPUS * 4 |
89 | .globl shmobile_smp_fn | 92 | .globl shmobile_smp_fn |
90 | shmobile_smp_fn: | 93 | shmobile_smp_fn: |
91 | 2: .space CONFIG_NR_CPUS * 4 | 94 | 2: .space NR_CPUS * 4 |
92 | .globl shmobile_smp_arg | 95 | .globl shmobile_smp_arg |
93 | shmobile_smp_arg: | 96 | shmobile_smp_arg: |
94 | 3: .space CONFIG_NR_CPUS * 4 | 97 | 3: .space NR_CPUS * 4 |