linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: ux500: Initialize irq affinity
Date: Sun, 22 Jan 2012 12:54:11 +0000	[thread overview]
Message-ID: <20120122125411.GA27821@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <20120120174456.GB11845@n2100.arm.linux.org.uk>

Hi Russell,

On Fri, Jan 20, 2012 at 05:44:57PM +0000, Russell King - ARM Linux wrote:
> | 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.

I think this *could* be a problem if, as in Linus's case, some interrupts
have a hardcoded affinity enforced by the hardware (i.e. there are sticky bits
in the GIC distributor CPU targets registers). If we boot on a CPU that is
different from the hardcoded affinity, we could end up initialising an
interrupt with multiple targets. I suspect this will just lead to spurious
interrupts at the end of the day, but there's a potential performance impact
too.

So we could change gic_dist_init to ignore interrupts with sticky bits when
setting up the targets (assuming that the hardcoded target is limited to a
single CPU...) although we also need a way to prevent those interrupts being
moved later on.

For the time being we can just limit ux500 to booting on (physical) CPU 0
and wait and see if anybody hardcodes their targets to point at secondary
CPUs in the future.

Will

  parent reply	other threads:[~2012-01-22 12:54 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
2012-01-20 21:28       ` Per Fransson
2012-01-22 12:54       ` Will Deacon [this message]
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=20120122125411.GA27821@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --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).