summaryrefslogtreecommitdiff
path: root/tools/perf/util/include/asm
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-10-17 19:12:33 +0400
committerIngo Molnar <mingo@elte.hu>2009-10-19 11:26:34 +0400
commit5a116dd2797677cad48fee2f42267e3cb69f5502 (patch)
tree94bc08d8c234e26c8b8caa156815964e0a56f159 /tools/perf/util/include/asm
parent11018201b831e19304c0d639f105ad6c27e120b1 (diff)
downloadlinux-5a116dd2797677cad48fee2f42267e3cb69f5502.tar.xz
perf tools: Use kernel bitmap library
Use the kernel bitmap library for internal perf tools uses. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <1255792354-11304-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/include/asm')
-rw-r--r--tools/perf/util/include/asm/bitops.h6
-rw-r--r--tools/perf/util/include/asm/byteorder.h2
-rw-r--r--tools/perf/util/include/asm/swab.h1
-rw-r--r--tools/perf/util/include/asm/types.h17
-rw-r--r--tools/perf/util/include/asm/uaccess.h14
5 files changed, 40 insertions, 0 deletions
diff --git a/tools/perf/util/include/asm/bitops.h b/tools/perf/util/include/asm/bitops.h
new file mode 100644
index 000000000000..fbe4d9212919
--- /dev/null
+++ b/tools/perf/util/include/asm/bitops.h
@@ -0,0 +1,6 @@
+#include "../../../../include/asm-generic/bitops/__fls.h"
+#include "../../../../include/asm-generic/bitops/fls.h"
+#include "../../../../include/asm-generic/bitops/fls64.h"
+#include "../../../../include/asm-generic/bitops/__ffs.h"
+#include "../../../../include/asm-generic/bitops/ffz.h"
+#include "../../../../include/asm-generic/bitops/hweight.h"
diff --git a/tools/perf/util/include/asm/byteorder.h b/tools/perf/util/include/asm/byteorder.h
new file mode 100644
index 000000000000..39f367cfaf56
--- /dev/null
+++ b/tools/perf/util/include/asm/byteorder.h
@@ -0,0 +1,2 @@
+#include "../asm/types.h"
+#include "../../../../include/linux/swab.h"
diff --git a/tools/perf/util/include/asm/swab.h b/tools/perf/util/include/asm/swab.h
new file mode 100644
index 000000000000..ed538942523d
--- /dev/null
+++ b/tools/perf/util/include/asm/swab.h
@@ -0,0 +1 @@
+/* stub */
diff --git a/tools/perf/util/include/asm/types.h b/tools/perf/util/include/asm/types.h
new file mode 100644
index 000000000000..06703c6cd50e
--- /dev/null
+++ b/tools/perf/util/include/asm/types.h
@@ -0,0 +1,17 @@
+#ifndef PERF_ASM_TYPES_H_
+#define PERF_ASM_TYPES_H_
+
+#include <linux/compiler.h>
+#include "../../types.h"
+#include <sys/types.h>
+
+/* CHECKME: Not sure both always match */
+#define BITS_PER_LONG __WORDSIZE
+
+typedef u64 __u64;
+typedef u32 __u32;
+typedef u16 __u16;
+typedef u8 __u8;
+typedef s64 __s64;
+
+#endif /* PERF_ASM_TYPES_H_ */
diff --git a/tools/perf/util/include/asm/uaccess.h b/tools/perf/util/include/asm/uaccess.h
new file mode 100644
index 000000000000..d0f72b8fcc35
--- /dev/null
+++ b/tools/perf/util/include/asm/uaccess.h
@@ -0,0 +1,14 @@
+#ifndef _PERF_ASM_UACCESS_H_
+#define _PERF_ASM_UACCESS_H_
+
+#define __get_user(src, dest) \
+({ \
+ (src) = *dest; \
+ 0; \
+})
+
+#define get_user __get_user
+
+#define access_ok(type, addr, size) 1
+
+#endif