From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND 2/3] ARM: Meson6: Add SMP support for Amlogic Meson6
Date: Mon, 24 Nov 2014 16:20:45 +0100 [thread overview]
Message-ID: <201411241620.45412.arnd@arndb.de> (raw)
In-Reply-To: <1415982353-9293-3-git-send-email-carlo@caione.org>
On Friday 14 November 2014, Carlo Caione wrote:
> +static void __iomem *cpucfg_membase;
> +static void __iomem *scu_membase;
I don't think you need a global scu_membase variable, you use it only in
one function.
> +static DEFINE_SPINLOCK(cpu_lock);
> +
> +extern void meson_secondary_startup(void);
Better put the extern declaration into a header file.
> +static void __init meson6_smp_prepare_cpus(unsigned int max_cpus)
> +{
> + struct device_node *node;
> +
> + node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
> + if (!node) {
> + pr_err("Missing Meson6 SCU node\n");
> + return;
> + }
> +
> + scu_membase = of_iomap(node, 0);
> + if (!scu_membase) {
> + pr_err("Couln't map Meson6 SCU registers\n");
> + return;
> + }
> +
> + node = of_find_compatible_node(NULL, NULL, "amlogic,meson6-cpuconfig");
> + if (!node) {
> + pr_err("Missing Meson6 CPU config node\n");
> + return;
> + }
I'm not sure about the "amlogic,meson6-cpuconfig" device node. Since this
is just an 8-byte register range, I suspect it's actually part of a larger
device, so you should better represent that instead. We can now have
early "syscon" devices (in linux-next I think), so you could instead make
this a device that is compatible with "syscon" and have the smp code
look that up and apply an appropriate offset. Do you have an idea of
which device this is part of?
Arnd
next prev parent reply other threads:[~2014-11-24 15:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 16:25 [PATCH RESEND 0/3] ARM: Meson6: enable SMP Carlo Caione
2014-11-14 16:25 ` [PATCH RESEND 1/3] ARM: Meson6: docs: document bindings Carlo Caione
2014-11-14 16:25 ` [PATCH RESEND 2/3] ARM: Meson6: Add SMP support for Amlogic Meson6 Carlo Caione
2014-11-24 15:20 ` Arnd Bergmann [this message]
2014-11-14 16:25 ` [PATCH RESEND 3/3] ARM: Meson6: enable SMP in DTS/DTSI Carlo Caione
2014-11-23 11:48 ` [PATCH RESEND 0/3] ARM: Meson6: enable SMP Carlo Caione
2014-11-24 14:24 ` Arnd Bergmann
2014-11-24 14:46 ` Carlo Caione
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=201411241620.45412.arnd@arndb.de \
--to=arnd@arndb.de \
--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).