aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/headsmp.S
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-08-28 13:04:38 -0400
committerOlof Johansson <olof@lixom.net>2013-08-28 13:04:38 -0400
commit25475030ec0e2c4c05f3ecb2c068f6e42944fd04 (patch)
treefcf9a7963331132780da40e1686dfd13603fe592 /arch/arm/mach-shmobile/headsmp.S
parente707bb338b5c6f5859578ae6eb426a21b78b0f42 (diff)
parent1d33a354bbb618ba578bb372ebc18fe58457f6f3 (diff)
Merge tag 'renesas-smp-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/renesas
From Simon Horman: Renesas ARM based SoC SMP updates for v3.12 * Per-CPU SMP boot and sleep code on SoCs that use SCU * Shared SCU CPU Hotplug code on r8a7779 and sh73a0 SoCs * Shared SCU CPU boot code on emev2, r8a7779 and sh73a0 SoCs * tag 'renesas-smp-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Per-CPU SMP boot / sleep code for SCU SoCs ARM: shmobile: Introduce per-CPU SMP boot / sleep code ARM: shmobile: Use shared SCU CPU Hotplug code on r8a7779 ARM: shmobile: Use shared SCU CPU Hotplug code on sh73a0 ARM: shmobile: Add shared SCU CPU Hotplug code ARM: shmobile: Use shared SCU SMP boot code on emev2 ARM: shmobile: Use shared SCU SMP boot code on r8a7779 ARM: shmobile: Use shared SCU SMP boot code on sh73a0 ARM: shmobile: Introduce shared SCU SMP boot code Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-shmobile/headsmp.S')
-rw-r--r--arch/arm/mach-shmobile/headsmp.S49
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
index a9d212498987..55017f507e96 100644
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -36,3 +36,52 @@ shmobile_boot_fn:
36 .globl shmobile_boot_arg 36 .globl shmobile_boot_arg
37shmobile_boot_arg: 37shmobile_boot_arg:
382: .space 4 382: .space 4
39
40/*
41 * Per-CPU SMP boot function/argument selection code based on MPIDR
42 */
43
44ENTRY(shmobile_smp_boot)
45 @ r0 = MPIDR_HWID_BITMASK
46 mrc p15, 0, r1, c0, c0, 5 @ r1 = MPIDR
47 and r0, r1, r0 @ r0 = cpu_logical_map() value
48 mov r1, #0 @ r1 = CPU index
49 adr r5, 1f @ array of per-cpu mpidr values
50 adr r6, 2f @ array of per-cpu functions
51 adr r7, 3f @ array of per-cpu arguments
52
53shmobile_smp_boot_find_mpidr:
54 ldr r8, [r5, r1, lsl #2]
55 cmp r8, r0
56 bne shmobile_smp_boot_next
57
58 ldr r9, [r6, r1, lsl #2]
59 cmp r9, #0
60 bne shmobile_smp_boot_found
61
62shmobile_smp_boot_next:
63 add r1, r1, #1
64 cmp r1, #CONFIG_NR_CPUS
65 blo shmobile_smp_boot_find_mpidr
66
67 b shmobile_smp_sleep
68
69shmobile_smp_boot_found:
70 ldr r0, [r7, r1, lsl #2]
71 mov pc, r9
72ENDPROC(shmobile_smp_boot)
73
74ENTRY(shmobile_smp_sleep)
75 wfi
76 b shmobile_smp_boot
77ENDPROC(shmobile_smp_sleep)
78
79 .globl shmobile_smp_mpidr
80shmobile_smp_mpidr:
811: .space CONFIG_NR_CPUS * 4
82 .globl shmobile_smp_fn
83shmobile_smp_fn:
842: .space CONFIG_NR_CPUS * 4
85 .globl shmobile_smp_arg
86shmobile_smp_arg:
873: .space CONFIG_NR_CPUS * 4