From: Alex Elder <elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
shiraz.hashim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
catalin.marinas-5wv7dgnIgG8@public.gmane.org
Cc: spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [RFC PATCH 0/7] ARM: SMP: common "pen" secondary release method
Date: Fri, 28 Mar 2014 16:12:53 -0500 [thread overview]
Message-ID: <1396041180-29897-1-git-send-email-elder@linaro.org> (raw)
This series proposes creating a single implementation of the "pen
release" (or spin-table) mechanism for starting secondary CPUs on
ARM SMP systems. This mechanism is currently implemented at least 5
times in the kernel, each essentially identical to the other. There
are other machines that use this method, but slight differences make
it necessary to incorporate further work in order to accomodate them
with a single set of functions.
This work began with integrating SMP support for a Broadcom SoC.
The code I started was another copy of the "pen release" code.
Looking at how existing systems handled this, the duplication of
code was obvious, but the fact that implementations were identical
was less so. In addition, the arm64 (though not 32-bit arm) code
supports the ability to define an "enable-method" property for CPUs
in a machine's device tree (one of which is "spin-table"), allowing
the secondary startup mechanism to be specified abstractly.
My broader goal then was to set up the SMP support for the Broadcom
SoC such that it could be defined in its device tree using a central
"spin-table" enable method for secondary CPUs. The first step was
to create a central spin-table implementation. I've tried to do
this generally so it's usable by as many other platforms as
possible. (An alternative would be to define a custom enable method
for this platform, but I'd prefer to avoid that if I can.)
I already have some code for the second step--which supports
specifying the "spin-table" CPU enable method in device tree files.
But before presenting that I wanted to post this series to get
feedback on the approach.
I've provided a little more information for each patch below.
This code is available in the "review/common-spin-code" branch of
the git repository here:
http://git.linaro.org/landing-teams/working/broadcom/kernel.git
-Alex
Alex Elder (7):
ARM: allow <asm/cputype.h> inclusion from assembly
This patch is done specifically so the next one can use the
value of MPIDR_HWID_BITMASK in secondary_holding_pen(), which is
defined in asssembly.
ARM: SMP: generic SMP spin-table method routines
Define the common code (based on any of the others, but
reportedly they all derive from ARM Realview.) Names are
changed to be more like arch/arm64/kernel/smp_spin_table.c.
ARM: realview: use central SMP spin-table routines
ARM: vexpress: use central SMP spin-table routines
ARM: versatile: kill off SMP support code
The SMP code for realview and vexpress both use SMP code
defined under mach-versatile, so these three go together.
ARM: ux500: use generic SMP spin-table routines
This one is a pretty straightforward switch to using
the common code.
ARM: spear: use central SMP spin-table routines
This is straightforward as well, but it depends on the
two prerequisite patches mentioned above (which together
make this code roughly identical to the rest).
arch/arm/include/asm/cputype.h | 4 ++
arch/arm/include/asm/smp.h | 5 ++
arch/arm/kernel/head.S | 33 +++++++++
arch/arm/kernel/smp.c | 77 ++++++++++++++++++++
arch/arm/mach-realview/platsmp.c | 8 +--
arch/arm/mach-spear/Makefile | 2 +-
arch/arm/mach-spear/generic.h | 1 -
arch/arm/mach-spear/headsmp.S | 47 ------------
arch/arm/mach-spear/platsmp.c | 75 +------------------
arch/arm/mach-ux500/Makefile | 2 +-
arch/arm/mach-ux500/headsmp.S | 37 ----------
arch/arm/mach-ux500/platsmp.c | 72 +------------------
arch/arm/mach-vexpress/platsmp.c | 8 +--
arch/arm/mach-vexpress/v2m.c | 1 -
arch/arm/plat-versatile/Makefile | 1 -
arch/arm/plat-versatile/headsmp.S | 41 -----------
arch/arm/plat-versatile/include/plat/platsmp.h | 14 ----
arch/arm/plat-versatile/platsmp.c | 91 ------------------------
18 files changed, 133 insertions(+), 386 deletions(-)
delete mode 100644 arch/arm/mach-spear/headsmp.S
delete mode 100644 arch/arm/mach-ux500/headsmp.S
delete mode 100644 arch/arm/plat-versatile/headsmp.S
delete mode 100644 arch/arm/plat-versatile/include/plat/platsmp.h
delete mode 100644 arch/arm/plat-versatile/platsmp.c
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2014-03-28 21:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 21:12 Alex Elder [this message]
2014-03-28 21:12 ` [RFC PATCH 1/7] ARM: allow <asm/cputype.h> inclusion from assembly Alex Elder
2014-03-28 21:12 ` [RFC PATCH 2/7] ARM: SMP: generic SMP spin-table method routines Alex Elder
[not found] ` <1396041180-29897-3-git-send-email-elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-03-31 15:21 ` Mark Rutland
[not found] ` <20140331152117.GH6551-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-04-02 12:37 ` Alex Elder
2014-03-28 21:12 ` [RFC PATCH 3/7] ARM: realview: use central SMP spin-table routines Alex Elder
2014-03-28 21:12 ` [RFC PATCH 4/7] ARM: vexpress: " Alex Elder
2014-03-28 21:12 ` [RFC PATCH 5/7] ARM: versatile: kill off SMP support code Alex Elder
2014-03-28 21:12 ` [RFC PATCH 6/7] ARM: ux500: use generic SMP spin-table routines Alex Elder
2014-03-28 21:13 ` [RFC PATCH 7/7] ARM: spear: use central " Alex Elder
2014-03-28 21:17 ` [RFC PATCH 0/7] ARM: SMP: common "pen" secondary release method Alex Elder
[not found] ` <1396041180-29897-1-git-send-email-elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-03-28 21:47 ` Russell King - ARM Linux
2014-04-04 20:38 ` Alex Elder
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=1396041180-29897-1-git-send-email-elder@linaro.org \
--to=elder-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=shiraz.hashim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org \
--cc=viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).