Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300664
| From | "Suzuki K. Poulose" <suzuki.poulose@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v5 03/11] arm-cci: Group writes to counter |
| Date | 2016-01-04 13:00 +0100 |
| Message-ID | <qNbXP-2ZX-1@gated-at.bofh.it> (permalink) |
| References | <qNbXP-2ZX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Add a helper to group the writes to PMU counter, this will be
used to delay setting the event period to pmu::pmu_enable()
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
---
drivers/bus/arm-cci.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index ce0d3ef..f6b8717 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -785,6 +785,21 @@ static void pmu_write_counter(struct perf_event *event, u32 value)
__pmu_write_counter(cci_pmu, value, idx);
}
+/* Write a value to a given set of counters */
+static void __pmu_write_counters(struct cci_pmu *cci_pmu, unsigned long *mask, u32 value)
+{
+ int i;
+
+ for_each_set_bit(i, mask, cci_pmu->num_cntrs)
+ __pmu_write_counter(cci_pmu, value, i);
+}
+
+static void __maybe_unused
+pmu_write_counters(struct cci_pmu *cci_pmu, unsigned long *mask, u32 value)
+{
+ __pmu_write_counters(cci_pmu, mask, value);
+}
+
static u64 pmu_event_update(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v5 03/11] arm-cci: Group writes to counter "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2016-01-04 13:00 +0100
Re: [PATCH v5 03/11] arm-cci: Group writes to counter Mark Rutland <mark.rutland@arm.com> - 2016-01-04 20:10 +0100
Re: [PATCH v5 03/11] arm-cci: Group writes to counter "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-01-05 12:00 +0100
Re: [PATCH v5 03/11] arm-cci: Group writes to counter Mark Rutland <mark.rutland@arm.com> - 2016-01-11 11:50 +0100
Re: [PATCH v5 03/11] arm-cci: Group writes to counter "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-01-11 11:50 +0100
csiph-web