From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: perf: add support for percpu pmu interrupt
Date: Wed, 16 Oct 2013 15:15:18 +0100 [thread overview]
Message-ID: <20131016141517.GI5403@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CAPrCYkdyCSEcUvQ4y-62wvQvuffaN+kJrzq8H-n87_SMEANjUQ@mail.gmail.com>
On Tue, Oct 15, 2013 at 12:54:57PM +0100, Vinayak Kale wrote:
> On Tue, Oct 15, 2013 at 2:51 PM, Will Deacon <will.deacon@arm.com> wrote:
> >> > A better way to do this is to try request_percpu_irq first. If that fails,
> >> > then try request_irq. However, the error reporting out of request_percpu_irq
> >> > could do with some cleanup (rather than just return -EINVAL) so we can
> >> > detect the difference between `this interrupt isn't per-cpu' and `this
> >> > per-cpu interrupt is invalid'. This can help us avoid the WARN_ON in
> >> > request_irq when it is passed a per-cpu interrupt.
> >> >
> >>
> >> Trying request_percpu_irq first seems better. But if it fails then we
> >> would straight away
> >> assume it's not per-cpu interrupt and try request_irq. In this case we
> >> may not be able to
> >> detect 'this per-cpu interrupt is invalid' case.
> >
> > Right, but you could have a patch to fix the core code as part of this
> > series, as I hinted at above.
> >
>
> Modifying core code to change return value of request_percpu_irq seems
> risky as other drivers might be checking the error code.
Well, grepping for "request_percpu_irq" shows a handful of callers, which
doesn't look too onerous to audit.
> As you said, passing invalid ppi to request_irq would cause unwanted
> WARN_ON. But this would be rare case and platform specific. Can we
> just live with this WARN_ON in such rare cases?
Just fix the fundamental problem rather than paper over it.
Will
prev parent reply other threads:[~2013-10-16 14:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 6:46 [PATCH] arm64: perf: add support for percpu pmu interrupt Vinayak Kale
2013-10-14 12:34 ` Will Deacon
2013-10-15 6:33 ` Vinayak Kale
2013-10-15 9:21 ` Will Deacon
2013-10-15 11:54 ` Vinayak Kale
2013-10-16 14:15 ` Will Deacon [this message]
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=20131016141517.GI5403@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