diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-05-06 11:47:52 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-05-25 08:24:09 -0400 |
commit | 7db79172908990c3ea540fcc6819330d273f9f1c (patch) | |
tree | b81e71dbda26a19ca0396cb0a7b98fd513104b5c /arch/blackfin/include/asm | |
parent | 93f1742c631a87f02622e6a4570e65479f598672 (diff) |
Blackfin: initial perf_event support
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/include/asm')
-rw-r--r-- | arch/blackfin/include/asm/bfin_pfmon.h | 44 | ||||
-rw-r--r-- | arch/blackfin/include/asm/perf_event.h | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/bfin_pfmon.h b/arch/blackfin/include/asm/bfin_pfmon.h new file mode 100644 index 000000000000..accd47e2db40 --- /dev/null +++ b/arch/blackfin/include/asm/bfin_pfmon.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Blackfin Performance Monitor definitions | ||
3 | * | ||
4 | * Copyright 2005-2011 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the ADI BSD license or GPL-2 (or later). | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_BFIN_PFMON_H__ | ||
10 | #define __ASM_BFIN_PFMON_H__ | ||
11 | |||
12 | /* PFCTL Masks */ | ||
13 | #define PFMON_MASK 0xff | ||
14 | #define PFCEN_MASK 0x3 | ||
15 | #define PFCEN_DISABLE 0x0 | ||
16 | #define PFCEN_ENABLE_USER 0x1 | ||
17 | #define PFCEN_ENABLE_SUPV 0x2 | ||
18 | #define PFCEN_ENABLE_ALL (PFCEN_ENABLE_USER | PFCEN_ENABLE_SUPV) | ||
19 | |||
20 | #define PFPWR_P 0 | ||
21 | #define PEMUSW0_P 2 | ||
22 | #define PFCEN0_P 3 | ||
23 | #define PFMON0_P 5 | ||
24 | #define PEMUSW1_P 13 | ||
25 | #define PFCEN1_P 14 | ||
26 | #define PFMON1_P 16 | ||
27 | #define PFCNT0_P 24 | ||
28 | #define PFCNT1_P 25 | ||
29 | |||
30 | #define PFPWR (1 << PFPWR_P) | ||
31 | #define PEMUSW(n, x) ((x) << ((n) ? PEMUSW1_P : PEMUSW0_P)) | ||
32 | #define PEMUSW0 PEMUSW(0, 1) | ||
33 | #define PEMUSW1 PEMUSW(1, 1) | ||
34 | #define PFCEN(n, x) ((x) << ((n) ? PFCEN1_P : PFCEN0_P)) | ||
35 | #define PFCEN0 PFCEN(0, PFCEN_MASK) | ||
36 | #define PFCEN1 PFCEN(1, PFCEN_MASK) | ||
37 | #define PFCNT(n, x) ((x) << ((n) ? PFCNT1_P : PFCNT0_P)) | ||
38 | #define PFCNT0 PFCNT(0, 1) | ||
39 | #define PFCNT1 PFCNT(1, 1) | ||
40 | #define PFMON(n, x) ((x) << ((n) ? PFMON1_P : PFMON0_P)) | ||
41 | #define PFMON0 PFMON(0, PFMON_MASK) | ||
42 | #define PFMON1 PFMON(1, PFMON_MASK) | ||
43 | |||
44 | #endif | ||
diff --git a/arch/blackfin/include/asm/perf_event.h b/arch/blackfin/include/asm/perf_event.h new file mode 100644 index 000000000000..3d2b1716322f --- /dev/null +++ b/arch/blackfin/include/asm/perf_event.h | |||
@@ -0,0 +1 @@ | |||
#define MAX_HWEVENTS 2 | |||