From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: ux500: Initialize irq affinity
Date: Fri, 20 Jan 2012 17:44:57 +0000 [thread overview]
Message-ID: <20120120174456.GB11845@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CACRpkdYgT-Q+ZEzhjOaOb_2Pihx0-pMXo+Dc-CESDT7BAWAOqg@mail.gmail.com>
On Fri, Jan 20, 2012 at 04:45:40PM +0100, Linus Walleij wrote:
> On Fri, Jan 20, 2012 at 2:03 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Fri, Jan 20, 2012 at 01:59:16PM +0100, Per Fransson wrote:
> >> Use irq_set_affinity() to initialize the kernel view of irq affinity
> >> when programming the GIC registers.
> >
> > Why is this necessary?
>
> Necessary: we don't quite know. (Maybe should have been RFC, but
> this patch is better than being silent of it...)
I'm afraid Per Fransson took the thread off the mailing lists,
so my reply to him also wasn't public. Here's what I said:
| The affinity starts off as "all CPUs", and the implementation is free
| to route the IRQ to any of those CPUs. On x86, some hardware is smart
| enough to route the IRQ to one of a set of CPUs, choosing which CPU
| to target in hardware.
|
| We don't have that ability, and trying to do that in software proved to
| be very problematic to get it to work satisfactorily. Given that there
| is a userspace daemon which helps to solve the problem, it was decided
| that we wouldn't bother with this i the kernel.
|
| So, we have to choose a CPU to route the IRQ to from the mask being
| requested - and the requested mask may contain anything from a single CPU
| to multiple CPUs.
|
| We choose to route it to the first online CPU in the set. That fits with
| the model, and does not require us to report back which CPU it's currently
| routed to. Indeed, architectures such as x86 can't tell you which CPU
| the next interrupt will hit.
|
| So we shouldn't even try to do this on ARM. Yes, we end up with all IRQs
| targetting CPU0 at boot, and with the masks showing 'all CPUs' but that's
| not a problem. Really not a problem.
next prev parent reply other threads:[~2012-01-20 17:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 12:59 [PATCH] ARM: ux500: Initialize irq affinity Per Fransson
2012-01-20 13:03 ` Russell King - ARM Linux
2012-01-20 15:45 ` Linus Walleij
2012-01-20 16:03 ` Marc Zyngier
2012-01-20 16:08 ` Will Deacon
2012-01-20 17:44 ` Russell King - ARM Linux [this message]
2012-01-20 21:28 ` Per Fransson
2012-01-22 12:54 ` Will Deacon
2012-01-22 15:27 ` Russell King - ARM Linux
2012-01-24 11:04 ` Will Deacon
2012-01-24 22:00 ` Linus Walleij
2012-01-20 17:50 ` Russell King - ARM Linux
2012-01-20 17:56 ` Linus Walleij
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=20120120174456.GB11845@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).