From: Alex Elder <elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Tim Kryger <tim.kryger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Matt Porter <mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Christian Daudt <bcm-xK7y4jjYLqYh9ZMKESR00Q@public.gmane.org>,
Device Tree List
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
Broadcom Kernel Feedback List
<bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
ARM Kernel List
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/5] ARM: add SMP support for Broadcom mobile SoCs
Date: Fri, 04 Apr 2014 13:56:54 -0500 [thread overview]
Message-ID: <533F0076.4090407@linaro.org> (raw)
In-Reply-To: <CAAYSxhqOh4F=vSDJYUwFE85og-Tgc9Hi8c79biEZYYjb8z1Qkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 04/04/2014 10:30 AM, Tim Kryger wrote:
> On Thu, Apr 3, 2014 at 7:18 PM, Alex Elder <elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>
>> diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c
>> new file mode 100644
>> index 0000000..46a64f2
>> --- /dev/null
>> +++ b/arch/arm/mach-bcm/platsmp.c
>
>> +/* Size of mapped Cortex A9 SCU address space */
>> +#define SCU_SIZE 0x58
>
>> +/*
>> + * Enable the Cortex A9 Snoop Control Unit
>> + *
>> + * By the time this is called we already know there are multiple
>> + * cores present. We assume we're running on a Cortex A9 processor,
>> + * so any trouble getting the base address register or getting the
>> + * SCU base is a problem.
>> + *
>> + * Return 0 if successful or an error code otherwise.
>> + */
>> +static int __init scu_a9_enable(void)
>> +{
>> + unsigned long config_base;
>> + void __iomem *scu_base;
>> +
>> + if (!scu_a9_has_base()) {
>> + pr_err("no configuration base address register!\n");
>> + return -ENXIO;
>> + }
>> +
>> + /* Config base address register value is zero for uniprocessor */
>> + config_base = scu_a9_get_base();
>> + if (!config_base) {
>> + pr_err("hardware reports only one core; disabling SMP\n");
>> + return -ENOENT;
>> + }
>> +
>> + scu_base = ioremap((phys_addr_t)config_base, SCU_SIZE);
>> + if (!scu_base) {
>> + pr_err("failed to remap config base (%lu/%u) for SCU\n",
>> + config_base, SCU_SIZE);
>> + return -ENOMEM;
>> + }
>> +
>> + scu_enable(scu_base);
>> +
>> + iounmap(scu_base); /* That's the last we'll need of this */
>> +
>> + return 0;
>> +}
>
> This function seems useful for Cortex A9 MPCore in general.
>
> While you gave it a generic name, you put it in a Broadcom file.
>
> Is there a better location for this code?
I think it belongs in arch/arm/kernel/smp_scu.c. I was thinking
it might be generally useful when I wrote it (hence the more
complete header comment, for example). And I'll gladly move
it there, I just didn't want anybody to get hung up on that.
-Alex
--
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 prev parent reply other threads:[~2014-04-04 18:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 2:18 [PATCH 0/5] ARM: SMP: support Broadcom mobile SoCs Alex Elder
2014-04-04 2:18 ` [PATCH 1/5] ARM: introduce CPU_METHOD_OF_DECLARE_SETUP() Alex Elder
2014-04-04 2:18 ` [PATCH 2/5] ARM: add SMP support for Broadcom mobile SoCs Alex Elder
[not found] ` <1396577891-2713-3-git-send-email-elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-04 2:26 ` Alex Elder
2014-04-04 15:30 ` Tim Kryger
[not found] ` <CAAYSxhqOh4F=vSDJYUwFE85og-Tgc9Hi8c79biEZYYjb8z1Qkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-04 18:56 ` Alex Elder [this message]
[not found] ` <533F0076.4090407-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-15 12:30 ` Alex Elder
2014-04-04 17:55 ` Stephen Boyd
[not found] ` <533EF21C.6000909-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-04-04 19:30 ` Alex Elder
2014-05-05 22:02 ` Alex Elder
[not found] ` <53680A5B.4060208-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-05-06 1:43 ` Stephen Boyd
[not found] ` <53683E40.1060909-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-05-06 4:05 ` Alex Elder
[not found] ` <1396577891-2713-1-git-send-email-elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-04 2:18 ` [PATCH 3/5] ARM: configs: enable SMP in bcm_defconfig Alex Elder
[not found] ` <1396577891-2713-4-git-send-email-elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-04 10:21 ` Alex Elder
2014-04-04 2:18 ` [PATCH 5/5] ARM: dts: enable SMP support for bcm21664 Alex Elder
2014-04-04 2:18 ` [PATCH 4/5] ARM: dts: enable SMP support for bcm28155 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=533F0076.4090407@linaro.org \
--to=elder-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=bcm-xK7y4jjYLqYh9ZMKESR00Q@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=tim.kryger-QSEj5FYQhm4dnm+yROfE0A@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).