Go to the documentation of this file.
25 #ifndef __ASM_CELL_PMU_H__
26 #define __ASM_CELL_PMU_H__
31 #define NR_PHYS_CTRS 4
32 #define NR_CTRS (NR_PHYS_CTRS * 2)
35 #define CBE_PM_16BIT_CTR(ctr) (1 << (24 - ((ctr) & (NR_PHYS_CTRS - 1))))
36 #define CBE_PM_ENABLE_PERF_MON 0x80000000
37 #define CBE_PM_STOP_AT_MAX 0x40000000
38 #define CBE_PM_TRACE_MODE_GET(pm_control) (((pm_control) >> 28) & 0x3)
39 #define CBE_PM_TRACE_MODE_SET(mode) (((mode) & 0x3) << 28)
40 #define CBE_PM_TRACE_BUF_OVFLW(bit) (((bit) & 0x1) << 17)
41 #define CBE_PM_COUNT_MODE_SET(count) (((count) & 0x3) << 18)
42 #define CBE_PM_FREEZE_ALL_CTRS 0x00100000
43 #define CBE_PM_ENABLE_EXT_TRACE 0x00008000
44 #define CBE_PM_SPU_ADDR_TRACE_SET(msk) (((msk) & 0x3) << 9)
47 #define CBE_PM_TRACE_BUF_FULL 0x00000800
48 #define CBE_PM_TRACE_BUF_EMPTY 0x00000400
49 #define CBE_PM_TRACE_BUF_DATA_COUNT(ta) ((ta) & 0x3ff)
50 #define CBE_PM_TRACE_BUF_MAX_COUNT 0x400
53 #define CBE_PM_CTR_INPUT_MUX(pm07_control) (((pm07_control) >> 26) & 0x3f)
54 #define CBE_PM_CTR_INPUT_CONTROL 0x02000000
55 #define CBE_PM_CTR_POLARITY 0x01000000
56 #define CBE_PM_CTR_COUNT_CYCLES 0x00800000
57 #define CBE_PM_CTR_ENABLE 0x00400000
58 #define PM07_CTR_INPUT_MUX(x) (((x) & 0x3F) << 26)
59 #define PM07_CTR_INPUT_CONTROL(x) (((x) & 1) << 25)
60 #define PM07_CTR_POLARITY(x) (((x) & 1) << 24)
61 #define PM07_CTR_COUNT_CYCLES(x) (((x) & 1) << 23)
62 #define PM07_CTR_ENABLE(x) (((x) & 1) << 22)
65 #define CBE_PM_CTR_OVERFLOW_INTR(ctr) (1 << (31 - ((ctr) & 7)))
102 #define CBE_COUNT_SUPERVISOR_MODE 0
103 #define CBE_COUNT_HYPERVISOR_MODE 1
104 #define CBE_COUNT_PROBLEM_MODE 2
105 #define CBE_COUNT_ALL_MODES 3