]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
FRV: Add basic performance counter support
authorDavid Howells <dhowells@redhat.com>
Wed, 1 Jul 2009 23:46:21 +0000 (00:46 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 2 Jul 2009 02:38:31 +0000 (19:38 -0700)
Add basic performance counter support to the FRV arch.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/frv/Kconfig
arch/frv/include/asm/perf_counter.h [new file with mode: 0644]
arch/frv/lib/Makefile
arch/frv/lib/perf_counter.c [new file with mode: 0644]

index 8a5bd7a9c6f533b452b21de81127c476b1826765..b86e19c9b5b0a137c297f5a1a55e1be49b7d250b 100644 (file)
@@ -7,6 +7,7 @@ config FRV
        default y
        select HAVE_IDE
        select HAVE_ARCH_TRACEHOOK
+       select HAVE_PERF_COUNTERS
 
 config ZONE_DMA
        bool
diff --git a/arch/frv/include/asm/perf_counter.h b/arch/frv/include/asm/perf_counter.h
new file mode 100644 (file)
index 0000000..ccf726e
--- /dev/null
@@ -0,0 +1,17 @@
+/* FRV performance counter support
+ *
+ * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_PERF_COUNTER_H
+#define _ASM_PERF_COUNTER_H
+
+#define PERF_COUNTER_INDEX_OFFSET      0
+
+#endif /* _ASM_PERF_COUNTER_H */
index 4ff2fb1e6b1694848eb688700e8be330a41a9c51..0a377210c89b3117dec4145769b39998721a3f8a 100644 (file)
@@ -5,4 +5,4 @@
 lib-y := \
        __ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o __ucmpdi2.o \
        checksum.o memcpy.o memset.o atomic-ops.o atomic64-ops.o \
-       outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o
+       outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o perf_counter.o
diff --git a/arch/frv/lib/perf_counter.c b/arch/frv/lib/perf_counter.c
new file mode 100644 (file)
index 0000000..2000fee
--- /dev/null
@@ -0,0 +1,19 @@
+/* Performance counter handling
+ *
+ * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#include <linux/perf_counter.h>
+
+/*
+ * mark the performance counter as pending
+ */
+void set_perf_counter_pending(void)
+{
+}