linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
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: Sun, 22 Jan 2012 15:27:10 +0000	[thread overview]
Message-ID: <20120122152710.GT1068@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20120122125411.GA27821@mudshark.cambridge.arm.com>

On Sun, Jan 22, 2012 at 12:54:11PM +0000, Will Deacon wrote:
> 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.

If we boot on a CPU which is incapable of receiving interrupts from
attached devices, we have a much larger problem than just affinity.
We potentially can't initialize those devices until their dependent
CPU comes online - we certainly can't start to use those devices until
that happens.

That's something we just don't deal with - and as far as userspace goes,
trying to set an affinity to just the offline CPU will return an error
code.

So, if you have interrupts which can only be serviced by a group of CPUs,
at least one of those CPUs must remain online at all times that those
dependent devices could produce an interrupt.

I think what we want instead is for the IRQ subsystem to record on a
per-IRQ basis which CPUs the interrupt /can/ be routed to, and if:

	affinity & cpus_online & allowable_cpus

becomes empty, the attempt to set the affinity is failed.  Also, a callback
in the hotplug code to error out if

	cpus_online & allowable_cpus & ~offlining_cpu

would become an empty set.

  reply	other threads:[~2012-01-22 15:27 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
2012-01-22 15:27         ` Russell King - ARM Linux [this message]
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=20120122152710.GT1068@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).