From: Russell King <rmk+kernel@armlinux.org.uk>
To: linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, linux-omap@vger.kernel.org,
linux-oxnas@groups.io, linux-samsung-soc@vger.kernel.org,
linux-soc@vger.kernel.org
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: [PATCH 5/9] ARM: actions: remove boot_lock and pen_release
Date: Thu, 13 Dec 2018 18:01:02 +0000 [thread overview]
Message-ID: <E1gXVIE-0008CK-5O@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20181213175952.GC26090@n2100.armlinux.org.uk>
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>
---
arch/arm/mach-actions/platsmp.c | 15 ---------------
1 file changed, 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;
static void __iomem *timer_base_addr;
static int ncores;
-static DEFINE_SPINLOCK(boot_lock);
-
-void owl_secondary_startup(void);
-
static int s500_wakeup_secondary(unsigned int cpu)
{
int ret;
@@ -84,7 +80,6 @@ static int s500_wakeup_secondary(unsigned int cpu)
static int s500_smp_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
- unsigned long timeout;
int ret;
ret = s500_wakeup_secondary(cpu);
@@ -93,21 +88,11 @@ static int s500_smp_boot_secondary(unsigned int cpu, struct task_struct *idle)
udelay(10);
- spin_lock(&boot_lock);
-
smp_send_reschedule(cpu);
- timeout = jiffies + (1 * HZ);
- while (time_before(jiffies, timeout)) {
- if (pen_release == -1)
- break;
- }
-
writel(0, timer_base_addr + OWL_CPU1_ADDR + (cpu - 1) * 4);
writel(0, timer_base_addr + OWL_CPU1_FLAG + (cpu - 1) * 4);
- spin_unlock(&boot_lock);
-
return 0;
}
--
2.7.4
next prev parent reply other threads:[~2018-12-13 18:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 17:59 [PATCH 0/9] Clean up ARM SMP/CPU hotplug implementations Russell King - ARM Linux
2018-12-13 18:00 ` [PATCH 1/9] ARM: omap2: remove unnecessary boot_lock Russell King
2018-12-13 18:00 ` [PATCH 2/9] ARM: qcom: " Russell King
2019-01-10 12:50 ` Linus Walleij
2019-01-10 20:56 ` Stephen Boyd
2019-01-10 21:47 ` Linus Walleij
2019-01-11 15:09 ` Russell King - ARM Linux
2019-01-13 22:46 ` Linus Walleij
2019-01-10 22:05 ` Stephen Boyd
2018-12-13 18:00 ` [PATCH 3/9] ARM: oxnas: remove CPU hotplug implementation Russell King
2018-12-20 14:03 ` Neil Armstrong
2018-12-13 18:00 ` [PATCH 4/9] ARM: sti: remove pen_release and boot_lock Russell King
2018-12-17 8:22 ` Patrice CHOTARD
2018-12-13 18:01 ` Russell King [this message]
2018-12-13 18:01 ` [PATCH 6/9] ARM: vexpress/realview: consolidate immitation CPU hotplug Russell King
2018-12-13 18:01 ` [PATCH 7/9] ARM: versatile: convert boot_lock to raw Russell King
2018-12-13 18:01 ` [PATCH 8/9] ARM: versatile: rename and comment SMP implementation Russell King
2018-12-13 18:01 ` [PATCH 9/9] ARM: smp: remove arch-provided "pen_release" Russell King
2018-12-14 4:39 ` Viresh Kumar
2018-12-14 13:12 ` Russell King - ARM Linux
2018-12-17 6:16 ` Viresh Kumar
2018-12-20 10:10 ` [PATCH 0/9] Clean up ARM SMP/CPU hotplug implementations Russell King - ARM Linux
2018-12-20 10:23 ` Krzysztof Kozlowski
2018-12-20 11:05 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1gXVIE-0008CK-5O@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-oxnas@groups.io \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox