Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

-15
-15
arch/arm/mach-actions/platsmp.c
··· 39 39 static void __iomem *timer_base_addr; 40 40 static int ncores; 41 41 42 - static DEFINE_SPINLOCK(boot_lock); 43 - 44 - void owl_secondary_startup(void); 45 - 46 42 static int s500_wakeup_secondary(unsigned int cpu) 47 43 { 48 44 int ret; ··· 80 84 81 85 static int s500_smp_boot_secondary(unsigned int cpu, struct task_struct *idle) 82 86 { 83 - unsigned long timeout; 84 87 int ret; 85 88 86 89 ret = s500_wakeup_secondary(cpu); ··· 88 93 89 94 udelay(10); 90 95 91 - spin_lock(&boot_lock); 92 - 93 96 smp_send_reschedule(cpu); 94 - 95 - timeout = jiffies + (1 * HZ); 96 - while (time_before(jiffies, timeout)) { 97 - if (pen_release == -1) 98 - break; 99 - } 100 97 101 98 writel(0, timer_base_addr + OWL_CPU1_ADDR + (cpu - 1) * 4); 102 99 writel(0, timer_base_addr + OWL_CPU1_FLAG + (cpu - 1) * 4); 103 - 104 - spin_unlock(&boot_lock); 105 100 106 101 return 0; 107 102 }