* [PATCH 1/6] arc,perf: Use common PMU interrupt disabled code
@ 2014-06-15 6:00 Vince Weaver
2014-06-16 13:16 ` Vineet Gupta
2014-06-19 12:37 ` [tip:perf/core] arc, perf: " tip-bot for Vince Weaver
0 siblings, 2 replies; 3+ messages in thread
From: Vince Weaver @ 2014-06-15 6:00 UTC (permalink / raw)
To: Vince Weaver; +Cc: linux-kernel, Peter Zijlstra, Ingo Molnar, Vineet Gupta
Transition to using the new generic PERF_PMU_CAP_NO_INTERRUPT method for
failing a sampling event when no PMU interrupt is available.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
index 63177e4..b9a5685 100644
--- a/arch/arc/kernel/perf_event.c
+++ b/arch/arc/kernel/perf_event.c
@@ -99,10 +99,6 @@ static int arc_pmu_event_init(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
int ret;
- /* ARC 700 PMU does not support sampling events */
- if (is_sampling_event(event))
- return -ENOENT;
-
switch (event->attr.type) {
case PERF_TYPE_HARDWARE:
if (event->attr.config >= PERF_COUNT_HW_MAX)
@@ -298,6 +294,9 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
.read = arc_pmu_read,
};
+ /* ARC 700 PMU does not support sampling events */
+ arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
+
ret = perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
return ret;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 1/6] arc,perf: Use common PMU interrupt disabled code
2014-06-15 6:00 [PATCH 1/6] arc,perf: Use common PMU interrupt disabled code Vince Weaver
@ 2014-06-16 13:16 ` Vineet Gupta
2014-06-19 12:37 ` [tip:perf/core] arc, perf: " tip-bot for Vince Weaver
1 sibling, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2014-06-16 13:16 UTC (permalink / raw)
To: Vince Weaver; +Cc: linux-kernel, Peter Zijlstra, Ingo Molnar
On Sunday 15 June 2014 11:25 AM, Vince Weaver wrote:
> Transition to using the new generic PERF_PMU_CAP_NO_INTERRUPT method for
> failing a sampling event when no PMU interrupt is available.
>
> Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Thx,
-Vineet
>
> diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
> index 63177e4..b9a5685 100644
> --- a/arch/arc/kernel/perf_event.c
> +++ b/arch/arc/kernel/perf_event.c
> @@ -99,10 +99,6 @@ static int arc_pmu_event_init(struct perf_event *event)
> struct hw_perf_event *hwc = &event->hw;
> int ret;
>
> - /* ARC 700 PMU does not support sampling events */
> - if (is_sampling_event(event))
> - return -ENOENT;
> -
> switch (event->attr.type) {
> case PERF_TYPE_HARDWARE:
> if (event->attr.config >= PERF_COUNT_HW_MAX)
> @@ -298,6 +294,9 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
> .read = arc_pmu_read,
> };
>
> + /* ARC 700 PMU does not support sampling events */
> + arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
> +
> ret = perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
>
> return ret;
>
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip:perf/core] arc, perf: Use common PMU interrupt disabled code
2014-06-15 6:00 [PATCH 1/6] arc,perf: Use common PMU interrupt disabled code Vince Weaver
2014-06-16 13:16 ` Vineet Gupta
@ 2014-06-19 12:37 ` tip-bot for Vince Weaver
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Vince Weaver @ 2014-06-19 12:37 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, paulus, grant.likely, hpa, mingo, peterz, acme,
vincent.weaver, vgupta, robh+dt, tglx
Commit-ID: 2cc9e588b0ff80c209c59a3e369c73e591535ba8
Gitweb: http://git.kernel.org/tip/2cc9e588b0ff80c209c59a3e369c73e591535ba8
Author: Vince Weaver <vincent.weaver@maine.edu>
AuthorDate: Sun, 15 Jun 2014 02:00:18 -0400
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 18 Jun 2014 18:43:44 +0200
arc, perf: Use common PMU interrupt disabled code
Transition to using the new generic PERF_PMU_CAP_NO_INTERRUPT method for
failing a sampling event when no PMU interrupt is available.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rob Herring <robh+dt@kernel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1406150159280.16738@vincent-weaver-1.umelst.maine.edu
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/arc/kernel/perf_event.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
index 63177e4..b9a5685 100644
--- a/arch/arc/kernel/perf_event.c
+++ b/arch/arc/kernel/perf_event.c
@@ -99,10 +99,6 @@ static int arc_pmu_event_init(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
int ret;
- /* ARC 700 PMU does not support sampling events */
- if (is_sampling_event(event))
- return -ENOENT;
-
switch (event->attr.type) {
case PERF_TYPE_HARDWARE:
if (event->attr.config >= PERF_COUNT_HW_MAX)
@@ -298,6 +294,9 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
.read = arc_pmu_read,
};
+ /* ARC 700 PMU does not support sampling events */
+ arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
+
ret = perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
return ret;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-19 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-15 6:00 [PATCH 1/6] arc,perf: Use common PMU interrupt disabled code Vince Weaver
2014-06-16 13:16 ` Vineet Gupta
2014-06-19 12:37 ` [tip:perf/core] arc, perf: " tip-bot for Vince Weaver
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome