From: Russell King - ARM Linux <linux@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: "Barry Song" <baohua@kernel.org>,
"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
"Neil Armstrong" <narmstrong@baylibre.com>,
"Tony Lindgren" <tony@atomide.com>,
"Viresh Kumar" <vireshk@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Patrice Chotard" <patrice.chotard@st.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"David Brown" <david.brown@linaro.org>,
"Kukjin Kim" <kgene@kernel.org>,
"Sudeep Holla" <sudeep.holla@arm.com>,
"Andy Gross" <andy.gross@linaro.org>,
"Shiraz Hashim" <shiraz.linux.kernel@gmail.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [PATCH 0/9] Clean up ARM SMP/CPU hotplug implementations
Date: Thu, 20 Dec 2018 10:10:44 +0000 [thread overview]
Message-ID: <20181220101044.GN9507@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20181213175952.GC26090@n2100.armlinux.org.uk>
Since almost no one has responded, my intention is to queue up
patches 1-3,5-8 for the Christmas-time merge window through my
tree. They will be in linux-next tonight.
On Thu, Dec 13, 2018 at 05:59:52PM +0000, Russell King - ARM Linux wrote:
> There is a lot of apparent copied code in arch/arm for handling SMP/
> CPU hotplug, much of which is inappropriate or plain buggy. This
> seems to be a topic that occasionally comes up.
>
> The "pen_release" thing was created for ARM Ltd development platforms
> where there was no way to individually control secondary CPUs leaving
> the boot loader - they all jumped to whatever physical code address
> was supplied at the same time. This made it necessary for _these_
> platforms to have a "holding pen" for the CPUs while the kernel
> initialised.
>
> The "boot_lock" thing was also created for ARM Ltd development
> platforms which had restricted bus bandwidth, and which used the
> loops_per_jiffy delay mechanism, which was calibrated for each
> secondary CPU. With the restricted bus bandwidth, activity from the
> boot CPU would affect the delay calibration adversely.
>
> Lastly, the Versatile CPU hotplug implementation is an entirely
> ficticious one - these platforms do _not_ support CPU hotplug as
> there is no way to actually disable any of the secondary CPUs, or
> reset them. Such an implementation is not acceptable when supporting
> features such as suspend or kexec. As the Versatile platforms are
> ARM development platforms which do not have suspend support, this is
> acceptable there, but not for production hardware.
>
> None of these three facilities/implementations should be used on
> modern production hardware, yet we have a number of copies of this
> code.
>
> This series addresses that by removing the inappropriate copies of
> some Realview/Versatile Express specific workarounds, and makes it
> (hopefully) more clear that introducing this code is really not
> acceptable.
>
> To discourage copying the Versatile code, further comments are added
> and the functions renamed for CPU hotplug to be "immitation" to make
> it clear that it's not a real implementation.
>
> We tried reducing the duplication in the past with ideas around
> consolidating the pen_release/boot_lock/immitation hotplug stuff,
> but I nacked that because it's not an acceptable implementation for
> production hardware. However, we did decide to consolidate the
> "pen_release" definition. In hind sight, that was a mistake,
> because that gave more credence to that way of doing things, and
> also gave rise to buggy implementations which only read from that
> variable - meaning it served no useful purpose.
>
> There are some rather complex cases that remain, and those need the
> SoC folk to fix.
>
> I have left the Actions Semi patch in place since following patches
> depend on it, but there is a five-patch series from Linus Walleij
> that address this platform which should replace this patch - with
> the patch concerned marked as "RFT" - request for testing.
>
> arch/arm/include/asm/smp.h | 1 -
> arch/arm/kernel/smp.c | 6 --
> arch/arm/mach-actions/platsmp.c | 15 ---
> arch/arm/mach-exynos/headsmp.S | 2 +-
> arch/arm/mach-exynos/platsmp.c | 31 +++---
> arch/arm/mach-omap2/omap-smp.c | 20 ----
> arch/arm/mach-oxnas/Makefile | 1 -
> arch/arm/mach-oxnas/hotplug.c | 109 --------------------
> arch/arm/mach-oxnas/platsmp.c | 4 -
> arch/arm/mach-prima2/common.h | 2 +
> arch/arm/mach-prima2/headsmp.S | 2 +-
> arch/arm/mach-prima2/hotplug.c | 3 +-
> arch/arm/mach-prima2/platsmp.c | 17 ++--
> arch/arm/mach-qcom/platsmp.c | 26 -----
> arch/arm/mach-realview/Makefile | 1 -
> arch/arm/mach-realview/hotplug.c | 111 ---------------------
> arch/arm/mach-realview/hotplug.h | 1 -
> arch/arm/mach-realview/platsmp-dt.c | 8 +-
> arch/arm/mach-spear/generic.h | 2 +
> arch/arm/mach-spear/headsmp.S | 2 +-
> arch/arm/mach-spear/hotplug.c | 4 +-
> arch/arm/mach-spear/platsmp.c | 27 +++--
> arch/arm/mach-sti/Makefile | 2 +-
> arch/arm/mach-sti/headsmp.S | 43 --------
> arch/arm/mach-sti/platsmp.c | 62 +-----------
> arch/arm/mach-vexpress/Makefile | 1 -
> arch/arm/mach-vexpress/core.h | 2 -
> arch/arm/mach-vexpress/platsmp.c | 7 ++
> arch/arm/plat-versatile/Makefile | 1 +
> arch/arm/plat-versatile/headsmp.S | 2 +-
> .../{mach-vexpress => plat-versatile}/hotplug.c | 47 ++++-----
> arch/arm/plat-versatile/include/plat/platsmp.h | 2 +
> arch/arm/plat-versatile/platsmp.c | 47 ++++++---
> 33 files changed, 132 insertions(+), 479 deletions(-)
> delete mode 100644 arch/arm/mach-oxnas/hotplug.c
> delete mode 100644 arch/arm/mach-realview/hotplug.c
> delete mode 100644 arch/arm/mach-realview/hotplug.h
> delete mode 100644 arch/arm/mach-sti/headsmp.S
> rename arch/arm/{mach-vexpress => plat-versatile}/hotplug.c (56%)
>
> --
> RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
> FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
> According to speedtest.net: 11.9Mbps down 500kbps up
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-12-20 10:11 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 ` [PATCH 5/9] ARM: actions: remove boot_lock and pen_release Russell King
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 ` Russell King - ARM Linux [this message]
2018-12-20 10:23 ` [PATCH 0/9] Clean up ARM SMP/CPU hotplug implementations 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=20181220101044.GN9507@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=afaerber@suse.de \
--cc=andy.gross@linaro.org \
--cc=baohua@kernel.org \
--cc=david.brown@linaro.org \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--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=liviu.dudau@arm.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=narmstrong@baylibre.com \
--cc=patrice.chotard@st.com \
--cc=shiraz.linux.kernel@gmail.com \
--cc=sudeep.holla@arm.com \
--cc=tony@atomide.com \
--cc=vireshk@kernel.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;
as well as URLs for NNTP newsgroup(s).