From: Stefan Agner <stefan@agner.ch>
To: Marc Zyngier <marc.zyngier@arm.com>, Jon Hunter <jonathanh@nvidia.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
nicolas.pitre@linaro.org, Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irqchip: gic: Add a cpu map for each GIC instance
Date: Thu, 30 Jul 2015 14:14:50 +0200 [thread overview]
Message-ID: <e9c6df1524d9e11b090222c1443dba1a@agner.ch> (raw)
In-Reply-To: <55B9F0A5.8030309@arm.com>
On 2015-07-30 11:38, Marc Zyngier wrote:
> On 30/07/15 10:30, Jon Hunter wrote:
>> Yes the "other CPU" may not run Linux, but it is certainly under the
>> control of Linux as a slave CPU. Linux will decide whether it wants to
>> receive the interrupts from this GIC or route them to the other CPU.
>>
>> Yes, I see that this may not be technically a cpu map and may be that is
>> a mis-use. Following that I assume that using set_affinity here would
>> also not be correct and a custom API should be employed?
>
> Indeed. set_affinity is only concerned with delivering interrupts to the
> CPUs, and not to other entities. It looks like we need an different API,
> but I would refrain from declaring it "custom". There is at least one
> other example of a platform doing similar things (vybrid), and I'd like
> to see some collaboration on that (Stefan on CC).
The Vybrid SoC allows to assign CPU "complex" affinity through something
called interrupt router (which is part of a miscellaneous module, hence
the driver is called vf610-mscm-ir). Typically on the secondary core
(Cortex-M4) a RTOS has been used. So far each CPU complex configured the
affinity of the interrupts to the own CPU on interrupt enable (e.g.
under Linux handled the vf610-mscm-ir driver). In this mode, the whole
router is somewhat pointless since you could also only mask/unmask your
local interrupt controller. Either way, this can lead to conflicts,
hence it is up to the developer to configure the operating systems
peripheral access (and hence interrupts) orthogonal.
The question in those heterogeneous architectures is who should be
responsible for resource control? The vf610-mscm-ir driver only cares
about the local CPU, so no "resource control" for the other CPU complex.
I guess from a security standpoint one should be the master and restrict
access of the other CPU complex as much as possible. On Vybrid, there
are only limited options in that regard, and access to the interrupt
router could not be disabled without disabling other peripherals too.
Newer heterogeneous Freescale SoCs (e.g. i.MX 7) don't have this
interrupt router at all. However, there is now a Resource Domain
Controller which allow to restrict access of memory regions
(peripherals..). However, afaik there is no control over interrupts
there, so only the local interrupt controller which allow to
enable/disable the shared peripheral interrupts.
--
Stefan
next prev parent reply other threads:[~2015-07-31 23:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 14:43 Jon Hunter
2015-07-29 15:39 ` Nicolas Pitre
2015-07-29 16:10 ` Thomas Gleixner
2015-07-30 7:19 ` Marc Zyngier
2015-07-30 8:08 ` Jon Hunter
2015-07-30 9:02 ` Marc Zyngier
2015-07-29 18:33 ` Russell King - ARM Linux
2015-07-29 19:27 ` Jon Hunter
2015-07-30 8:20 ` Marc Zyngier
2015-07-30 8:33 ` Jon Hunter
2015-07-30 9:04 ` Marc Zyngier
2015-07-30 9:30 ` Jon Hunter
2015-07-30 9:38 ` Marc Zyngier
2015-07-30 12:14 ` Stefan Agner [this message]
2015-07-30 12:19 ` Nicolas Pitre
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=e9c6df1524d9e11b090222c1443dba1a@agner.ch \
--to=stefan@agner.ch \
--cc=jason@lakedaemon.net \
--cc=jonathanh@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=nicolas.pitre@linaro.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®