From: jeremy.linton@arm.com (Jeremy Linton)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/8] arm64: pmu: Enable multiple PMUs in an ACPI system
Date: Mon, 20 Jun 2016 16:44:31 -0500 [thread overview]
Message-ID: <576863BF.6040800@arm.com> (raw)
In-Reply-To: <87h9cn6ckw.fsf@e105922-lin.cambridge.arm.com>
Hi Punit,
On 06/20/2016 11:37 AM, Punit Agrawal wrote:
> Jeremy Linton <jeremy.linton@arm.com> writes:
>
>> Its possible that an ACPI system has multiple CPU types in it
>> with differing PMU counters. Use the newly provided acpi_pmu routines
>> to detect that case, and instantiate more than one set of counters.
>>
>> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
>> ---
>> drivers/perf/arm_pmu.c | 7 +++-
>> drivers/perf/arm_pmu_acpi.c | 98 ++++++++++++++++++++-------------------------
>> 2 files changed, 50 insertions(+), 55 deletions(-)
>>
>
> [...]
>
>> diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
>> index a257fc0..8f9bea3 100644
>> --- a/drivers/perf/arm_pmu_acpi.c
>> +++ b/drivers/perf/arm_pmu_acpi.c
>> @@ -35,6 +35,11 @@ struct pmu_types {
>>
>> static struct pmu_irq pmu_irqs[NR_CPUS] __initdata;
>>
>> +/*
>> + * Called from acpi_map_gic_cpu_interface()'s MADT parsing during boot.
>> + * This routine saves off the GSI's and their trigger state for use when we are
>> + * ready to build the PMU platform device.
>> +*/
>> void __init arm_pmu_parse_acpi(int cpu, struct acpi_madt_generic_interrupt *gic)
>> {
>> pmu_irqs[cpu].gsi = gic->performance_interrupt;
>
>
> This hunk should be in Patch 3.
Ok...
>
>> @@ -47,7 +52,7 @@ void __init arm_pmu_parse_acpi(int cpu, struct acpi_madt_generic_interrupt *gic)
>> }
>>
>> /* Count number and type of CPU cores in the system. */
>> -void __init arm_pmu_acpi_determine_cpu_types(struct pmu_types *pmus)
>> +static void __init arm_pmu_acpi_determine_cpu_types(struct pmu_types *pmus)
>> {
>> int i, j;
>>
>
> Please move this and the following two hunks to the previous patch where you
> introduce the functions.
Oh, I did this on purpose to avoid:
"warning: 'xxx' defined but not used" messages.
>
>> @@ -74,7 +79,7 @@ void __init arm_pmu_acpi_determine_cpu_types(struct pmu_types *pmus)
>> * Registers the group of PMU interfaces which corrispond to the 'last_cpu_id'.
>> * This group utlizes 'count' resources in the 'res'.
>> */
>> -int __init arm_pmu_acpi_register_pmu(int count, struct resource *res,
>> +static int __init arm_pmu_acpi_register_pmu(int count, struct resource *res,
next prev parent reply other threads:[~2016-06-20 21:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 22:23 [PATCH 0/8] arm64: pmu: Detect multiple PMU types in an ACPI system Jeremy Linton
2016-06-09 22:23 ` [PATCH 1/8] arm64: pmu: add fallback probe table Jeremy Linton
2016-06-15 10:59 ` Will Deacon
2016-06-09 22:23 ` [PATCH 2/8] arm64: pmu: Probe default hw/cache counters Jeremy Linton
2016-06-15 11:14 ` Will Deacon
2016-06-09 22:23 ` [PATCH 3/8] arm64: pmu: Add support for probing with ACPI Jeremy Linton
2016-06-15 11:33 ` Will Deacon
2016-06-15 15:07 ` Jeremy Linton
2016-06-09 22:23 ` [PATCH 4/8] arm: arm64: Add routine to determine cpuid of other cpus Jeremy Linton
2016-06-20 16:49 ` Punit Agrawal
2016-06-09 22:23 ` [PATCH 5/8] arm: arm64: pmu: Assign platform PMU CPU affinity Jeremy Linton
2016-06-15 13:09 ` Will Deacon
2016-06-20 16:40 ` Punit Agrawal
2016-06-20 16:49 ` Jeremy Linton
2016-06-20 17:01 ` Punit Agrawal
2016-06-09 22:23 ` [PATCH 6/8] arm64: pmu: Add routines for detecting differing PMU types in the system Jeremy Linton
2016-06-09 22:23 ` [PATCH 7/8] arm64: pmu: Enable multiple PMUs in an ACPI system Jeremy Linton
2016-06-15 13:22 ` Will Deacon
2016-06-15 15:21 ` Jeremy Linton
2016-06-15 15:30 ` Will Deacon
2016-06-20 16:37 ` Punit Agrawal
2016-06-20 21:44 ` Jeremy Linton [this message]
2016-06-21 8:34 ` Punit Agrawal
2016-06-09 22:23 ` [PATCH 8/8] MAINTAINERS: Tweak ARM PMU maintainers Jeremy Linton
2016-06-20 16:47 ` [PATCH 0/8] arm64: pmu: Detect multiple PMU types in an ACPI system Punit Agrawal
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=576863BF.6040800@arm.com \
--to=jeremy.linton@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).