linux-mips
[Top] [All Lists]

[PATCH 1/4] MIPS/Perf-events: update the map of unsupported events for 7

To: <linux-mips@linux-mips.org>, <ralf@linux-mips.org>
Subject: [PATCH 1/4] MIPS/Perf-events: update the map of unsupported events for 74K
From: Deng-Cheng Zhu <dczhu@mips.com>
Date: Mon, 24 Oct 2011 18:55:59 +0800
Cc: Deng-Cheng Zhu <dczhu@mips.com>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>, Arnaldo Carvalho de Melo <acme@ghostprotocols.net>, David Daney <david.daney@cavium.com>
In-reply-to: <1319453762-12962-1-git-send-email-dczhu@mips.com>
References: <1319453762-12962-1-git-send-email-dczhu@mips.com>
Sender: linux-mips-bounce@linux-mips.org
Update the raw event info for 74K according to the latest document.

Signed-off-by: Deng-Cheng Zhu <dczhu@mips.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: David Daney <david.daney@cavium.com>
---
 arch/mips/kernel/perf_event_mipsxx.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/mips/kernel/perf_event_mipsxx.c 
b/arch/mips/kernel/perf_event_mipsxx.c
index e5ad09a..1f654ca 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -858,13 +858,16 @@ mipsxx_pmu_disable_event(int idx)
 #endif
 
 /* 74K */
+/*
+ * MIPS document MD00519 (MIPS32(r) 74K(tm) Processor Core Family Software
+ * User's Manual, Revision 01.05)
+ */
 #define IS_UNSUPPORTED_74K_EVENT(r, b)                                 \
-       ((r) == 5 || ((r) >= 135 && (r) <= 137) ||                      \
-        ((b) >= 10 && (b) <= 12) || (b) == 22 || (b) == 27 ||          \
-        (b) == 33 || (b) == 34 || ((b) >= 47 && (b) <= 49) ||          \
-        (r) == 178 || (b) == 55 || (b) == 57 || (b) == 60 ||           \
-        (b) == 61 || (r) == 62 || (r) == 191 ||                        \
-        ((b) >= 64 && (b) <= 127))
+       ((r) == 5 || (r) == 135 || ((b) >= 10 && (b) <= 12) ||          \
+        (b) == 27 || (b) == 33 || (b) == 34 || (b) == 47 ||            \
+        (b) == 48 || (r) == 178 || (r) == 187 || (b) == 60 ||          \
+        (b) == 61 || (r) == 191 || (r) == 71 || (r) == 72 ||           \
+        (b) == 73 || ((b) >= 77 && (b) <= 127))
 #define IS_BOTH_COUNTERS_74K_EVENT(b)                                  \
        ((b) == 0 || (b) == 1)
 
-- 
1.7.1


<Prev in Thread] Current Thread [Next in Thread>