diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-11-07 10:32:04 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2017-11-07 10:32:04 -0500 |
commit | fa32475ad56d339178c9be12678906f2b39e3b47 (patch) | |
tree | 939dc4bddcefe7eabaa3ecb2b63cabe01bf4d093 | |
parent | ff4f0321c533f4cde844829854735da64a4a327f (diff) | |
parent | 6c2eb3e76fb84e2eb46d484f71fab469c0d9532c (diff) |
Merge tag 'actions-arm-soc-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/soc
Pull "Actions Semi Arm SoC for v4.15" from Andreas Färber:
This cleans up the S500 SMP code.
* tag 'actions-arm-soc-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions:
ARM: owl: smp: Drop owl_secondary_boot()
ARM: owl: smp: Use __pa_symbol()
-rw-r--r-- | arch/arm/mach-actions/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-actions/headsmp.S | 52 | ||||
-rw-r--r-- | arch/arm/mach-actions/platsmp.c | 2 |
3 files changed, 2 insertions, 56 deletions
diff --git a/arch/arm/mach-actions/Makefile b/arch/arm/mach-actions/Makefile index c0f116241da7..13831037d8cd 100644 --- a/arch/arm/mach-actions/Makefile +++ b/arch/arm/mach-actions/Makefile | |||
@@ -1,3 +1 @@ | |||
1 | obj-${CONFIG_SMP} += platsmp.o headsmp.o | obj-${CONFIG_SMP} += platsmp.o | |
2 | |||
3 | AFLAGS_headsmp.o := -Wa,-march=armv7-a | ||
diff --git a/arch/arm/mach-actions/headsmp.S b/arch/arm/mach-actions/headsmp.S deleted file mode 100644 index 65f53bdb69e7..000000000000 --- a/arch/arm/mach-actions/headsmp.S +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Actions Semi Inc. | ||
3 | * Author: Actions Semi, Inc. | ||
4 | * | ||
5 | * Copyright (c) 2017 Andreas Färber | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/linkage.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | ENTRY(owl_v7_invalidate_l1) | ||
17 | mov r0, #0 | ||
18 | mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache | ||
19 | mcr p15, 2, r0, c0, c0, 0 | ||
20 | mrc p15, 1, r0, c0, c0, 0 | ||
21 | |||
22 | ldr r1, =0x7fff | ||
23 | and r2, r1, r0, lsr #13 | ||
24 | |||
25 | ldr r1, =0x3ff | ||
26 | |||
27 | and r3, r1, r0, lsr #3 @ NumWays - 1 | ||
28 | add r2, r2, #1 @ NumSets | ||
29 | |||
30 | and r0, r0, #0x7 | ||
31 | add r0, r0, #4 @ SetShift | ||
32 | |||
33 | clz r1, r3 @ WayShift | ||
34 | add r4, r3, #1 @ NumWays | ||
35 | 1: sub r2, r2, #1 @ NumSets-- | ||
36 | mov r3, r4 @ Temp = NumWays | ||
37 | 2: subs r3, r3, #1 @ Temp-- | ||
38 | mov r5, r3, lsl r1 | ||
39 | mov r6, r2, lsl r0 | ||
40 | orr r5, r5, r6 @ Reg = (Temp<<WayShift)|(NumSets<<SetShift) | ||
41 | mcr p15, 0, r5, c7, c6, 2 | ||
42 | bgt 2b | ||
43 | cmp r2, #0 | ||
44 | bgt 1b | ||
45 | dsb | ||
46 | isb | ||
47 | mov pc, lr | ||
48 | ENDPROC(owl_v7_invalidate_l1) | ||
49 | |||
50 | ENTRY(owl_secondary_startup) | ||
51 | bl owl_v7_invalidate_l1 | ||
52 | b secondary_startup | ||
diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c index 12a9e331b432..3efaa10efc43 100644 --- a/arch/arm/mach-actions/platsmp.c +++ b/arch/arm/mach-actions/platsmp.c | |||
@@ -71,7 +71,7 @@ static int s500_wakeup_secondary(unsigned int cpu) | |||
71 | /* wait for CPUx to run to WFE instruction */ | 71 | /* wait for CPUx to run to WFE instruction */ |
72 | udelay(200); | 72 | udelay(200); |
73 | 73 | ||
74 | writel(virt_to_phys(owl_secondary_startup), | 74 | writel(__pa_symbol(secondary_startup), |
75 | timer_base_addr + OWL_CPU1_ADDR + (cpu - 1) * 4); | 75 | timer_base_addr + OWL_CPU1_ADDR + (cpu - 1) * 4); |
76 | writel(OWL_CPUx_FLAG_BOOT, | 76 | writel(OWL_CPUx_FLAG_BOOT, |
77 | timer_base_addr + OWL_CPU1_FLAG + (cpu - 1) * 4); | 77 | timer_base_addr + OWL_CPU1_FLAG + (cpu - 1) * 4); |