public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mischa Jonker <Mischa.Jonker@synopsys.com>
To: linux-kernel@vger.kernel.org
Cc: Mischa Jonker <Mischa.Jonker@synopsys.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Vineet Gupta <Vineet.Gupta1@synopsys.com>
Subject: [PATCH] ARC: perf: ARC 700 PMU doesn't support sampling events
Date: Wed, 13 Nov 2013 16:06:06 +0100	[thread overview]
Message-ID: <1384355166-21409-1-git-send-email-mjonker@synopsys.com> (raw)

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


             reply	other threads:[~2013-11-13 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 15:06 Mischa Jonker [this message]
2013-11-13 15:18 ` [PATCH] ARC: perf: ARC 700 PMU doesn't support sampling events Peter Zijlstra

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=1384355166-21409-1-git-send-email-mjonker@synopsys.com \
    --to=mischa.jonker@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.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