public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARC: perf: ARC 700 PMU doesn't support sampling events
@ 2013-11-13 15:06 Mischa Jonker
  2013-11-13 15:18 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Mischa Jonker @ 2013-11-13 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mischa Jonker, Peter Zijlstra, Vineet Gupta

The ARC 700 does not have an interrupt associated with it, and as
such it cannot trigger when a counter overflows. As the counters are
48 bit, it will usually take at least 100 days before a counter
overflows, so for mere counting of events, there is no problem.
Sampling is not supported though.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
---
 arch/arc/kernel/perf_event.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
index 759e5f3..e46d81f 100644
--- a/arch/arc/kernel/perf_event.c
+++ b/arch/arc/kernel/perf_event.c
@@ -99,6 +99,10 @@ 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)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARC: perf: ARC 700 PMU doesn't support sampling events
  2013-11-13 15:06 [PATCH] ARC: perf: ARC 700 PMU doesn't support sampling events Mischa Jonker
@ 2013-11-13 15:18 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2013-11-13 15:18 UTC (permalink / raw)
  To: Mischa Jonker; +Cc: linux-kernel, Vineet Gupta

On Wed, Nov 13, 2013 at 04:06:06PM +0100, Mischa Jonker wrote:
> The ARC 700 does not have an interrupt associated with it, and as
> such it cannot trigger when a counter overflows. As the counters are
> 48 bit, it will usually take at least 100 days before a counter
> overflows, so for mere counting of events, there is no problem.
> Sampling is not supported though.

Acked-by: Peter Zijlstra <peterz@infradead.org>

> Cc: Vineet Gupta <vgupta@synopsys.com>
> Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
> ---
>  arch/arc/kernel/perf_event.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
> index 759e5f3..e46d81f 100644
> --- a/arch/arc/kernel/perf_event.c
> +++ b/arch/arc/kernel/perf_event.c
> @@ -99,6 +99,10 @@ 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)
> -- 
> 1.7.9.5
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-13 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13 15:06 [PATCH] ARC: perf: ARC 700 PMU doesn't support sampling events Mischa Jonker
2013-11-13 15:18 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox