From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] arm_pmu: acpi: check for mismatched PPIs
Date: Mon, 11 Dec 2017 17:37:07 +0000 [thread overview]
Message-ID: <20171211173707.GD3275@arm.com> (raw)
In-Reply-To: <20171101141239.45340-4-mark.rutland@arm.com>
On Wed, Nov 01, 2017 at 02:12:37PM +0000, Mark Rutland wrote:
> The arm_pmu platform code explicitly checks for mismatched PPIs at probe
> time, while the ACPI code leaves this to the core code. Future
> refactoring will make this difficult for the core code to check, so
> let's have the ACPI code check this explicitly.
>
> As before, upon a failure we'll continue on without an interrupt. Ho
> hum.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> drivers/perf/arm_pmu.c | 16 ++++------------
> drivers/perf/arm_pmu_acpi.c | 42 ++++++++++++++++++++++++++++++++++++++----
> 2 files changed, 42 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
> index 3d6d4c5f2356..e0242103d904 100644
> --- a/drivers/perf/arm_pmu.c
> +++ b/drivers/perf/arm_pmu.c
> @@ -557,18 +557,10 @@ int armpmu_request_irq(struct arm_pmu *armpmu, int cpu)
> if (!irq)
> return 0;
>
> - if (irq_is_percpu_devid(irq) && cpumask_empty(&armpmu->active_irqs)) {
> - err = request_percpu_irq(irq, handler, "arm-pmu",
> - &hw_events->percpu_pmu);
> - } else if (irq_is_percpu_devid(irq)) {
> - int other_cpu = cpumask_first(&armpmu->active_irqs);
> - int other_irq = per_cpu(hw_events->irq, other_cpu);
> -
> - if (irq != other_irq) {
> - pr_warn("mismatched PPIs detected.\n");
> - err = -EINVAL;
> - goto err_out;
> - }
> + if (irq_is_percpu_devid(irq)) {
> + if (cpumask_empty(&armpmu->active_irqs))
Why not leave this as before, with a '&&' operator?
Will
next prev parent reply other threads:[~2017-12-11 17:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 14:12 [PATCH 0/5] arm_pmu: fix lockdep issues with ACPI systems Mark Rutland
2017-11-01 14:12 ` [PATCH 1/5] arm_pmu: fold platform helpers into platform code Mark Rutland
2017-11-01 14:12 ` [PATCH 2/5] arm_pmu: have armpmu_alloc() take GFP flags Mark Rutland
2017-12-06 6:54 ` Zhangshaokun
2017-12-11 17:37 ` Will Deacon
2017-12-11 18:02 ` Mark Rutland
2017-11-01 14:12 ` [PATCH 3/5] arm_pmu: acpi: check for mismatched PPIs Mark Rutland
2017-12-11 17:37 ` Will Deacon [this message]
2017-12-11 18:08 ` Mark Rutland
2017-12-11 18:43 ` Will Deacon
2017-11-01 14:12 ` [PATCH 4/5] arm_pmu: note IRQs/PMUs per-cpu Mark Rutland
2017-12-11 17:36 ` Will Deacon
2017-12-11 18:15 ` Mark Rutland
2017-11-01 14:12 ` [PATCH 5/5] arm_pmu: acpi: request IRQs up-front Mark Rutland
2017-12-11 17:36 ` Will Deacon
2017-12-11 17:55 ` Mark Rutland
2017-12-11 18:45 ` Will Deacon
2017-11-01 17:02 ` [PATCH 0/5] arm_pmu: fix lockdep issues with ACPI systems Tyler Baicar
2017-12-11 17:38 ` Will Deacon
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=20171211173707.GD3275@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).