From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: gic_set_affinity
Date: Mon, 5 Nov 2012 12:05:49 +0000 [thread overview]
Message-ID: <20121105120548.GH3351@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CAOmFF10ZvpoJ4gaW5WWhzvV4ecxrYJx-kobvNVmaNxBria6Jzg@mail.gmail.com>
On Fri, Nov 02, 2012 at 11:32:50AM +0000, Robert Beckett wrote:
> (CC maintainers)
>
> On 1 November 2012 17:54, Robert Beckett <bob.beckett@gmail.com> wrote:
> > Hello,
> >
> > I was looking through the arm gic code while debugging a problem I am
> > having, and noticed something in gic_set_affinity.
> >
> > When something comes along and setts an irq affinity mask (e.g.
> > through /proc/irq/<irq>/smp_affinity_mask), the calls goes like so :
> >
> > ...
> > 1. irq_set_affinity : grabs the desc->lock
> > 2. __irq_set_affinity_locked : calls chip->irq_set_affinity
> > 3. gic_set_affinity : writes a new mask to the gic distributor
> >
> > my question is, what happens if an interrupt is raised between 1 and 3?
> > To me, it looks like the interrupt could end up being handled on 2
> > cpus. When it is raised, the handler will be called and sit spinning
> > for desc->lock (e.g. in handle_fasteoi_irq). The mask will be set to
> > set the affinity to the new cpu, the new cpu will receive the
> > interrupt as it has not been ackd or disabled yet
The interrupt will have been acked in gic_handle_irq before the flow handler
is invoked, so it will transition to the active state and will not get
signalled to another CPU. Since we never set more than one target CPU at the
distributor level, the interrupt will only be forwarded to one CPU interface
at any given time.
Will
next prev parent reply other threads:[~2012-11-05 12:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 17:54 gic_set_affinity Robert Beckett
2012-11-02 11:32 ` gic_set_affinity Robert Beckett
2012-11-05 12:05 ` Will Deacon [this message]
2012-11-07 17:08 ` gic_set_affinity Robert Beckett
2012-11-07 17:13 ` gic_set_affinity Will Deacon
2012-11-07 17:18 ` gic_set_affinity Robert Beckett
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=20121105120548.GH3351@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