From: Mark Rutland <mark.rutland@arm.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: tglx@linutronix.de, nicolas.pitre@linaro.org,
linux-samsung-soc@vger.kernel.org, vincent.guittot@linaro.org,
kernel@stlinux.com, kvm@vger.kernel.org, rafael@kernel.org,
peterz@infradead.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
linux-snps-arc@lists.infradead.org, kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org, will.deacon@arm.com,
marc.zyngier@arm.com
Subject: Re: [PATCH V8 1/3] irq: Add flags to request_percpu_irq function
Date: Thu, 23 Mar 2017 18:54:52 +0000 [thread overview]
Message-ID: <20170323185449.GA21359@leverpostej> (raw)
In-Reply-To: <1490290924-12958-1-git-send-email-daniel.lezcano@linaro.org>
Hi Daniel,
On Thu, Mar 23, 2017 at 06:42:01PM +0100, Daniel Lezcano wrote:
> In the next changes, we track the interrupts but we discard the timers as
> that does not make sense. The next interrupt on a timer is predictable.
Sorry, but I could not parse this.
[...]
> diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
> index 9612b84..0f5ab4a 100644
> --- a/drivers/perf/arm_pmu.c
> +++ b/drivers/perf/arm_pmu.c
> @@ -661,7 +661,7 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler)
>
> irq = platform_get_irq(pmu_device, 0);
> if (irq > 0 && irq_is_percpu(irq)) {
> - err = request_percpu_irq(irq, handler, "arm-pmu",
> + err = request_percpu_irq(irq, 0, handler, "arm-pmu",
> &hw_events->percpu_pmu);
> if (err) {
> pr_err("unable to request IRQ%d for ARM PMU counters\n",
Please Cc myself and Will Deacon when modifying the arm_pmu driver, as
per MAINTAINERS. I only spotted this patch by chance.
This conflicts with arm_pmu changes I have queued for v4.12 [1].
So, can we leave the prototype of request_percpu_irq() as-is?
Why not add a new request_percpu_irq_flags() function, and leave
request_percpu_irq() as a wrapper for that? e.g.
static inline int
request_percpu_irq(unsigned int irq, irq_handler_t handler,
const char *devname, void __percpu *percpu_dev_id)
{
return request_percpu_irq_flags(irq, handler, devname,
percpu_dev_id, 0);
}
... that would avoid having to touch any non-timer driver for now.
[...]
> -request_percpu_irq(unsigned int irq, irq_handler_t handler,
> - const char *devname, void __percpu *percpu_dev_id);
> +request_percpu_irq(unsigned int irq, unsigned long flags,
> + irq_handler_t handler, const char *devname,
> + void __percpu *percpu_dev_id);
>
Looking at request_irq, the prototype is:
int __must_check
request_irq(unsigned int irq, irq_handler_t handler,
unsigned long flags, const char *name,
void *dev);
... surely it would be better to share the same argument order? i.e.
int __must_check
request_percpu_irq(unsigned int irq, irq_handler_t handler,
unsigned long flags, const char *devname,
void __percpu *percpu_dev_id);
Thanks,
Mark.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm/perf/refactoring
next prev parent reply other threads:[~2017-03-23 18:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 17:42 [PATCH V8 1/3] irq: Add flags to request_percpu_irq function Daniel Lezcano
2017-03-23 18:34 ` Vineet Gupta
2017-03-23 18:54 ` Mark Rutland [this message]
2017-03-23 19:19 ` Daniel Lezcano
2017-03-27 8:44 ` Andrew Jones
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=20170323185449.GA21359@leverpostej \
--to=mark.rutland@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=kernel@stlinux.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=marc.zyngier@arm.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=will.deacon@arm.com \
--cc=xen-devel@lists.xenproject.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