diff options
author | Olof Johansson <olof@lixom.net> | 2013-08-28 13:04:38 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-08-28 13:04:38 -0400 |
commit | 25475030ec0e2c4c05f3ecb2c068f6e42944fd04 (patch) | |
tree | fcf9a7963331132780da40e1686dfd13603fe592 /arch/arm/mach-shmobile/headsmp.S | |
parent | e707bb338b5c6f5859578ae6eb426a21b78b0f42 (diff) | |
parent | 1d33a354bbb618ba578bb372ebc18fe58457f6f3 (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.S | 49 |
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 |
37 | shmobile_boot_arg: | 37 | shmobile_boot_arg: |
38 | 2: .space 4 | 38 | 2: .space 4 |
39 | |||
40 | /* | ||
41 | * Per-CPU SMP boot function/argument selection code based on MPIDR | ||
42 | */ | ||
43 | |||
44 | ENTRY(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 | |||
53 | shmobile_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 | |||
62 | shmobile_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 | |||
69 | shmobile_smp_boot_found: | ||
70 | ldr r0, [r7, r1, lsl #2] | ||
71 | mov pc, r9 | ||
72 | ENDPROC(shmobile_smp_boot) | ||
73 | |||
74 | ENTRY(shmobile_smp_sleep) | ||
75 | wfi | ||
76 | b shmobile_smp_boot | ||
77 | ENDPROC(shmobile_smp_sleep) | ||
78 | |||
79 | .globl shmobile_smp_mpidr | ||
80 | shmobile_smp_mpidr: | ||
81 | 1: .space CONFIG_NR_CPUS * 4 | ||
82 | .globl shmobile_smp_fn | ||
83 | shmobile_smp_fn: | ||
84 | 2: .space CONFIG_NR_CPUS * 4 | ||
85 | .globl shmobile_smp_arg | ||
86 | shmobile_smp_arg: | ||
87 | 3: .space CONFIG_NR_CPUS * 4 | ||