Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1294103
| From | "Suzuki K. Poulose" <suzuki.poulose@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 04/12] arm-cci: Fix the flags for pmu_start called from pmu_add |
| Date | 2015-12-17 19:00 +0100 |
| Message-ID | <qGL0n-2Bm-31@gated-at.bofh.it> (permalink) |
| References | <qGKQG-2xR-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The cci PMU always reprograms the counter value in pmu->start() irrespective of the mode it is called from, making sure that the hwc->state is PERF_HES_UPTODATE. When pmu->add() is called with PERF_EF_START, we invoke pmu->start() with PERF_EF_RELOAD removing the PERF_EF_START. This makes it impossible to detect where the pmu->start() is called from, i.e, PERF_EF_START or a real PERF_EF_RELOAD. This patch fixes the issue by, passing the right flags down to the pmu->start() when called from pmu->add(). 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index f6b8717..f00cbce 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -1020,7 +1020,7 @@ static int cci_pmu_add(struct perf_event *event, int flags) hwc->state = PERF_HES_STOPPED | PERF_HES_UPTODATE; if (flags & PERF_EF_START) - cci_pmu_start(event, PERF_EF_RELOAD); + cci_pmu_start(event, flags); /* Propagate our changes to the userspace mapping. */ perf_event_update_userpage(event); -- 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 — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv4 00/12] arm-cci: PMU updates "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 18:50 +0100
[PATCH v4 09/12] arm-cci: Provide hook for writing to PMU counters "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 18:50 +0100
[PATCH v4 08/12] arm-cci: Add routines to save/restore all counters "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 18:50 +0100
[PATCH v4 11/12] arm-cci500: Rearrange PMU driver for code sharing with CCI-550 PMU "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 18:50 +0100
[PATCH v4 10/12] arm-cci: CCI-500: Work around PMU counter writes "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
[PATCH v4 02/12] arm-cci: Refactor pmu_write_counter "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
[PATCH v4 01/12] arm-cci: Define CCI counter period "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
[PATCH v4 06/12] arm-cci: Refactor CCI PMU enable/disable methods "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
[PATCH v4 05/12] arm-cci: PMU: Add support for transactions "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions Peter Zijlstra <peterz@infradead.org> - 2015-12-17 19:50 +0100
Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2015-12-18 11:30 +0100
Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions Peter Zijlstra <peterz@infradead.org> - 2015-12-18 11:50 +0100
Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2015-12-18 12:00 +0100
Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions Peter Zijlstra <peterz@infradead.org> - 2015-12-18 12:50 +0100
[PATCH v4 07/12] arm-cci: Get the status of a counter "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
[PATCH v4 03/12] arm-cci: Group writes to counter "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
[PATCH v4 04/12] arm-cci: Fix the flags for pmu_start called from pmu_add "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
[PATCH v4 12/12] arm-cci: CoreLink CCI-550 PMU driver "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-12-17 19:00 +0100
csiph-web