From: chris.packham@alliedtelesis.co.nz (Chris Packham)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] ARM: mvebu: Let the device-tree determine smp_ops
Date: Thu, 6 Nov 2014 17:49:56 +1300 [thread overview]
Message-ID: <1415249396-2985-1-git-send-email-chris.packham@alliedtelesis.co.nz> (raw)
The machine specific SMP operations can be configured either via
setup_arch or via arm_dt_init_cpu_maps. For the ARMADA_370_XP_DT devices
both of these are called and setup_arch wins because it is called last.
This means that it is not possible to substitute a different set of SMP
operations via the device-tree.
All of the ARMADA_370_XP_DT compatible devices are either single core or
declare an enable-method in the dts (via one of armada-xp-mv78230.dtsi,
armada-xp-mv78260.dtsi or armada-xp-mv78460.dtsi). Remove the smp
assignment from board-v7.c so that the SMP operations set via the
device-tree aren't discarded.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Hi,
(This is the first patch I've sent to the arm-lkml so beware of my newbie-ness)
I'm working on a new board that uses a integrated CPU that according to the
vendor is "based on the ARMADA-XP", more on that to come in the future
hopefully. For the most part things just work if I use a .dts based on the
mv78260.
One difference I've encountered is in the way the secondary CPU is initialised,
which requires me to supply a slightly different set of machine specific SMP
operations so I can bring up the 2nd core. It looks like I should be able to
supply a different /cpus/enable-method in the .dts and once I define the
corresponding set of operations it should be picked up.
Which leads me to what I think could be a bug (or just a lack of clear
specification). The smp ops are set by both arm_dt_init_cpu_maps (from the
enable-method) and setup_arch (from mdesc). The latter always wins because it
is called last and doesn't check to see if smp_ops has already been set.
This is my attempt at fixing the problem by not setting mdesc.smp for the
ARMADA_370_XP_DT machines thus preventing setup_arch from overriding what has
been setup by arm_dt_init_cpu_maps.
Thanks,
Chris
arch/arm/mach-mvebu/board-v7.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 6478626..894974b 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -206,7 +206,6 @@ static const char * const armada_370_xp_dt_compat[] = {
DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
.l2c_aux_val = 0,
.l2c_aux_mask = ~0,
- .smp = smp_ops(armada_xp_smp_ops),
.init_machine = mvebu_dt_init,
.init_irq = mvebu_init_irq,
.restart = mvebu_restart,
--
2.2.0.rc0
next reply other threads:[~2014-11-06 4:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 4:49 Chris Packham [this message]
2014-11-06 14:49 ` [RFC PATCH] ARM: mvebu: Let the device-tree determine smp_ops Andrew Lunn
2014-11-06 19:49 ` Chris Packham
2014-11-06 20:03 ` Andrew Lunn
2014-11-06 14:58 ` Thomas Petazzoni
2014-11-06 15:21 ` Andrew Lunn
2014-11-06 15:33 ` Thomas Petazzoni
2014-11-06 19:56 ` Chris Packham
2014-11-06 20:16 ` Andrew Lunn
2014-11-07 2:33 ` [RFC PATCHv2] " Chris Packham
2014-11-16 22:40 ` [RFC PATCHv3] " Chris Packham
2014-11-17 8:45 ` [RFC PATCHv2] " Thomas Petazzoni
2014-11-17 8:56 ` Thomas Petazzoni
2014-11-17 20:46 ` Chris Packham
2014-11-17 23:34 ` Chris Packham
2014-11-18 0:31 ` Chris Packham
2014-11-18 8:21 ` Maxime Ripard
2014-11-18 19:43 ` Chris Packham
2014-11-18 23:37 ` [RFC PATCHv4] ARM: mvebu: use dt_fixup to provide fallback for enable-method Chris Packham
2014-11-18 8:16 ` [RFC PATCHv2] ARM: mvebu: Let the device-tree determine smp_ops Maxime Ripard
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=1415249396-2985-1-git-send-email-chris.packham@alliedtelesis.co.nz \
--to=chris.packham@alliedtelesis.co.nz \
--cc=linux-arm-kernel@lists.infradead.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).