aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/pmu/Makefile
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2013-08-06 03:42:37 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-14 00:57:10 -0400
commitcb96143defbd5516c351595d56b608ed915b525e (patch)
tree427dc6a4231f1c3b1ed9f7a327676223487d2b07 /tools/testing/selftests/powerpc/pmu/Makefile
parent2fae0d7ced53ef2e7b4d87d84986ec3ff7cf798f (diff)
selftests: Add test of PMU instruction counting on powerpc
This commit adds a test of instruction counting using the PMU on powerpc. Although the bulk of the code is architecture agnostic, the code needs to run a precisely sized loop which is implemented in assembler. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'tools/testing/selftests/powerpc/pmu/Makefile')
-rw-r--r--tools/testing/selftests/powerpc/pmu/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/pmu/Makefile b/tools/testing/selftests/powerpc/pmu/Makefile
new file mode 100644
index 000000000000..7216f0091655
--- /dev/null
+++ b/tools/testing/selftests/powerpc/pmu/Makefile
@@ -0,0 +1,23 @@
1noarg:
2 $(MAKE) -C ../
3
4PROGS := count_instructions
5EXTRA_SOURCES := ../harness.c event.c
6
7all: $(PROGS)
8
9$(PROGS): $(EXTRA_SOURCES)
10
11# loop.S can only be built 64-bit
12count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES)
13 $(CC) $(CFLAGS) -m64 -o $@ $^
14
15run_tests: all
16 @-for PROG in $(PROGS); do \
17 ./$$PROG; \
18 done;
19
20clean:
21 rm -f $(PROGS) loop.o
22
23.PHONY: all run_tests clean