From: Alexey.Brodkin@synopsys.com (Alexey Brodkin)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH] ARCv2: intc: untangle SMP, MCIP and IDU
Date: Thu, 6 Oct 2016 09:10:53 +0000 [thread overview]
Message-ID: <1475745033.3301.5.camel@synopsys.com> (raw)
In-Reply-To: <1475699962-11711-1-git-send-email-vgupta@synopsys.com>
Hi Vineet,
On Wed, 2016-10-05@13:39 -0700, Vineet Gupta wrote:
> The IDU intc is technically part of MCIP (Multi-core IP) hence
> historically was only available in a SMP hardware build (and thus only
> in a SMP kernel build). Now that hardware restriction has been lifted,
> so a UP kernel needs to support it.
>
> This requires breaking mcip.c into parts which are strictly SMP
> (inter-core interrupts) and IDU which in reality is just another
> intc and thus has no bearing on SMP.
>
> This change allows IDU in UP builds and with a suitable device tree, we
> can have the cascaded intc system
>
> ????ARCv2 core intc <---> ARCv2 IDU intc <---> periperals
>
> Signed-off-by: Vineet Gupta <vgupta at synopsys.com>
> ---
[snip]
?
> +struct mcip_bcr {
> +#ifdef CONFIG_CPU_BIG_ENDIAN
> + unsigned int pad3:8,
> + ?????idu:1, llm:1, num_cores:6,
> + ?????iocoh:1,??gfrc:1, dbg:1, pad2:1,
> + ?????msg:1, sem:1, ipi:1, pad:1,
> + ?????ver:8;
> +#else
> + unsigned int ver:8,
> + ?????pad:1, ipi:1, sem:1, msg:1,
> + ?????pad2:1, dbg:1, gfrc:1, iocoh:1,
> + ?????num_cores:6, llm:1, idu:1,
> + ?????pad3:8;
> +#endif
> +};
IMHO we should stop using this kind of constructions because they
are ugly and what's more important not portable.
Even though we have it now working for both LE and BE configurations
it won't work for 64-bit cores. We'll need to add ifdeffed 32-bit paddings
then which will make that construction even more ugly.
Probably that's not the right patch to address my complaint but just
to reiterate this topic once again and think about clean-up series on
that regard :)
-Alexey
WARNING: multiple messages have this Message-ID (diff)
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Yuriy.Kolerov@synopsys.com" <Yuriy.Kolerov@synopsys.com>,
Vlad Zakharov <Vladislav.Zakharov@synopsys.com>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH] ARCv2: intc: untangle SMP, MCIP and IDU
Date: Thu, 6 Oct 2016 09:10:53 +0000 [thread overview]
Message-ID: <1475745033.3301.5.camel@synopsys.com> (raw)
In-Reply-To: <1475699962-11711-1-git-send-email-vgupta@synopsys.com>
Hi Vineet,
On Wed, 2016-10-05 at 13:39 -0700, Vineet Gupta wrote:
> The IDU intc is technically part of MCIP (Multi-core IP) hence
> historically was only available in a SMP hardware build (and thus only
> in a SMP kernel build). Now that hardware restriction has been lifted,
> so a UP kernel needs to support it.
>
> This requires breaking mcip.c into parts which are strictly SMP
> (inter-core interrupts) and IDU which in reality is just another
> intc and thus has no bearing on SMP.
>
> This change allows IDU in UP builds and with a suitable device tree, we
> can have the cascaded intc system
>
> ARCv2 core intc <---> ARCv2 IDU intc <---> periperals
>
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> ---
[snip]
> +struct mcip_bcr {
> +#ifdef CONFIG_CPU_BIG_ENDIAN
> + unsigned int pad3:8,
> + idu:1, llm:1, num_cores:6,
> + iocoh:1, gfrc:1, dbg:1, pad2:1,
> + msg:1, sem:1, ipi:1, pad:1,
> + ver:8;
> +#else
> + unsigned int ver:8,
> + pad:1, ipi:1, sem:1, msg:1,
> + pad2:1, dbg:1, gfrc:1, iocoh:1,
> + num_cores:6, llm:1, idu:1,
> + pad3:8;
> +#endif
> +};
IMHO we should stop using this kind of constructions because they
are ugly and what's more important not portable.
Even though we have it now working for both LE and BE configurations
it won't work for 64-bit cores. We'll need to add ifdeffed 32-bit paddings
then which will make that construction even more ugly.
Probably that's not the right patch to address my complaint but just
to reiterate this topic once again and think about clean-up series on
that regard :)
-Alexey
next prev parent reply other threads:[~2016-10-06 9:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-05 20:39 [PATCH] ARCv2: intc: untangle SMP, MCIP and IDU Vineet Gupta
2016-10-05 20:39 ` Vineet Gupta
2016-10-06 9:10 ` Alexey Brodkin [this message]
2016-10-06 9:10 ` Alexey Brodkin
2016-10-06 17:10 ` Vineet Gupta
2016-10-06 17:10 ` Vineet Gupta
2016-10-07 17:31 ` Alexey Brodkin
2016-10-07 17:31 ` Alexey Brodkin
2016-10-07 21:39 ` Vineet Gupta
2016-10-07 21:39 ` Vineet Gupta
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=1475745033.3301.5.camel@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=linux-snps-arc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.