aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2018-12-13 07:54:26 -0500
committerRussell King <rmk+kernel@armlinux.org.uk>2019-02-01 16:59:15 -0500
commit70678554c4c40f2cf8de5e7cd53fdd2c73387e51 (patch)
tree186115df868f791a60007aa405363ce1827e90c5
parent0eb037998afe5514c8534276c152da31d2fabf07 (diff)
ARM: actions: remove boot_lock and pen_release
The actions SMP implementation has several issues: 1. pen_release is only ever read and compared to -1, and is defined in arch/arm/kernel/smp.c to be -1. This test will always succeed. 2. we are already guaranteed to be single threaded while bringing up a CPU, so the spinlock makes no sense, remove it. 3. owl_secondary_startup() is not referenced nor defined, the prototype is redundant, remove it. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/mach-actions/platsmp.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c
index 3efaa10efc43..4fd479c948e6 100644
--- a/arch/arm/mach-actions/platsmp.c
+++ b/arch/arm/mach-actions/platsmp.c
@@ -39,10 +39,6 @@ static void __iomem *sps_base_addr;
39static void __iomem *timer_base_addr; 39static void __iomem *timer_base_addr;
40static int ncores; 40static int ncores;
41 41
42static DEFINE_SPINLOCK(boot_lock);
43
44void owl_secondary_startup(void);
45
46static int s500_wakeup_secondary(unsigned int cpu) 42static int s500_wakeup_secondary(unsigned int cpu)
47{ 43{
48 int ret; 44 int ret;
@@ -84,7 +80,6 @@ static int s500_wakeup_secondary(unsigned int cpu)
84 80
85static int s500_smp_boot_secondary(unsigned int cpu, struct task_struct *idle) 81static int s500_smp_boot_secondary(unsigned int cpu, struct task_struct *idle)
86{ 82{
87 unsigned long timeout;
88 int ret; 83 int ret;
89 84
90 ret = s500_wakeup_secondary(cpu); 85 ret = s500_wakeup_secondary(cpu);
@@ -93,21 +88,11 @@ static int s500_smp_boot_secondary(unsigned int cpu, struct task_struct *idle)
93 88
94 udelay(10); 89 udelay(10);
95 90
96 spin_lock(&boot_lock);
97
98 smp_send_reschedule(cpu); 91 smp_send_reschedule(cpu);
99 92
100 timeout = jiffies + (1 * HZ);
101 while (time_before(jiffies, timeout)) {
102 if (pen_release == -1)
103 break;
104 }
105
106 writel(0, timer_base_addr + OWL_CPU1_ADDR + (cpu - 1) * 4); 93 writel(0, timer_base_addr + OWL_CPU1_ADDR + (cpu - 1) * 4);
107 writel(0, timer_base_addr + OWL_CPU1_FLAG + (cpu - 1) * 4); 94 writel(0, timer_base_addr + OWL_CPU1_FLAG + (cpu - 1) * 4);
108 95
109 spin_unlock(&boot_lock);
110
111 return 0; 96 return 0;
112} 97}
113 98