From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 3/8] arm_pmu: fold platform helpers into platform code
Date: Mon, 5 Feb 2018 16:41:57 +0000 [thread overview]
Message-ID: <20180205164202.26502-4-mark.rutland@arm.com> (raw)
In-Reply-To: <20180205164202.26502-1-mark.rutland@arm.com>
The armpmu_{request,free}_irqs() helpers are only used by
arm_pmu_platform.c, so let's fold them in and make them static.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
---
drivers/perf/arm_pmu.c | 21 ---------------------
drivers/perf/arm_pmu_platform.c | 21 +++++++++++++++++++++
include/linux/perf/arm_pmu.h | 2 --
3 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index 82b09d1cb42c..373dfd7d8a1d 100644
--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -534,14 +534,6 @@ void armpmu_free_irq(struct arm_pmu *armpmu, int cpu)
free_irq(irq, per_cpu_ptr(&hw_events->percpu_pmu, cpu));
}
-void armpmu_free_irqs(struct arm_pmu *armpmu)
-{
- int cpu;
-
- for_each_cpu(cpu, &armpmu->supported_cpus)
- armpmu_free_irq(armpmu, cpu);
-}
-
int armpmu_request_irq(struct arm_pmu *armpmu, int cpu)
{
int err = 0;
@@ -593,19 +585,6 @@ int armpmu_request_irq(struct arm_pmu *armpmu, int cpu)
return err;
}
-int armpmu_request_irqs(struct arm_pmu *armpmu)
-{
- int cpu, err;
-
- for_each_cpu(cpu, &armpmu->supported_cpus) {
- err = armpmu_request_irq(armpmu, cpu);
- if (err)
- break;
- }
-
- return err;
-}
-
static int armpmu_get_cpu_irq(struct arm_pmu *pmu, int cpu)
{
struct pmu_hw_events __percpu *hw_events = pmu->hw_events;
diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c
index 46501cc79fd7..244558cfdbce 100644
--- a/drivers/perf/arm_pmu_platform.c
+++ b/drivers/perf/arm_pmu_platform.c
@@ -164,6 +164,27 @@ static int pmu_parse_irqs(struct arm_pmu *pmu)
return 0;
}
+static int armpmu_request_irqs(struct arm_pmu *armpmu)
+{
+ int cpu, err;
+
+ for_each_cpu(cpu, &armpmu->supported_cpus) {
+ err = armpmu_request_irq(armpmu, cpu);
+ if (err)
+ break;
+ }
+
+ return err;
+}
+
+static void armpmu_free_irqs(struct arm_pmu *armpmu)
+{
+ int cpu;
+
+ for_each_cpu(cpu, &armpmu->supported_cpus)
+ armpmu_free_irq(armpmu, cpu);
+}
+
int arm_pmu_device_probe(struct platform_device *pdev,
const struct of_device_id *of_table,
const struct pmu_probe_info *probe_table)
diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h
index 712764b35c6a..899bc7ef0881 100644
--- a/include/linux/perf/arm_pmu.h
+++ b/include/linux/perf/arm_pmu.h
@@ -159,8 +159,6 @@ static inline int arm_pmu_acpi_probe(armpmu_init_fn init_fn) { return 0; }
struct arm_pmu *armpmu_alloc(void);
void armpmu_free(struct arm_pmu *pmu);
int armpmu_register(struct arm_pmu *pmu);
-int armpmu_request_irqs(struct arm_pmu *armpmu);
-void armpmu_free_irqs(struct arm_pmu *armpmu);
int armpmu_request_irq(struct arm_pmu *armpmu, int cpu);
void armpmu_free_irq(struct arm_pmu *armpmu, int cpu);
--
2.11.0
next prev parent reply other threads:[~2018-02-05 16:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 16:41 [PATCHv2 0/8] arm_pmu: fix lockdep issues with ACPI systems Mark Rutland
2018-02-05 16:41 ` [PATCHv2 1/8] ARM: ux500: remove PMU IRQ bouncer Mark Rutland
2018-02-05 19:05 ` Linus Walleij
2018-02-06 11:26 ` Mark Rutland
2018-02-05 16:41 ` [PATCHv2 2/8] arm_pmu: kill arm_pmu_platdata Mark Rutland
2018-02-05 16:41 ` Mark Rutland [this message]
2018-02-05 16:41 ` [PATCHv2 4/8] arm_pmu: add armpmu_alloc_atomic() Mark Rutland
2018-02-05 16:41 ` [PATCHv2 5/8] arm_pmu: acpi: check for mismatched PPIs Mark Rutland
2018-02-05 16:42 ` [PATCHv2 6/8] arm_pmu: explicitly enable/disable SPIs at hotplug Mark Rutland
2018-02-26 15:16 ` Geert Uytterhoeven
2018-02-26 15:22 ` Will Deacon
2018-02-26 15:56 ` Geert Uytterhoeven
2018-02-26 16:01 ` Mark Rutland
2018-02-05 16:42 ` [PATCHv2 7/8] arm_pmu: note IRQs and PMUs per-cpu Mark Rutland
2018-02-05 17:07 ` Robin Murphy
2018-02-05 17:13 ` Mark Rutland
2018-02-14 13:11 ` Will Deacon
2018-02-14 13:24 ` Mark Rutland
2018-02-14 13:26 ` Will Deacon
2018-02-14 13:45 ` Mark Rutland
2018-02-14 18:22 ` Mark Rutland
2018-02-05 16:42 ` [PATCHv2 8/8] arm_pmu: acpi: request IRQs up-front Mark Rutland
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=20180205164202.26502-4-mark.rutland@arm.com \
--to=mark.rutland@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).