80085444b1a0eaee79deb141d11776e460ffaa68
[firefly-linux-kernel-4.4.55.git] / arch / powerpc / perf / hv-gpci-requests.h
1
2 #include "req-gen/_begin.h"
3
4 /*
5  * Based on the document "getPerfCountInfo v1.07"
6  */
7
8 /*
9  * #define REQUEST_NAME counter_request_name
10  * #define REQUEST_NUM r_num
11  * #define REQUEST_IDX_KIND starting_index_kind
12  * #include I(REQUEST_BEGIN)
13  * REQUEST(
14  *      __field(...)
15  *      __field(...)
16  *      __array(...)
17  *      __count(...)
18  * )
19  * #include I(REQUEST_END)
20  *
21  * - starting_index_kind is one of the following, depending on the event:
22  *
23  *   chip_id: hardware chip id or -1 for current hw chip
24  *   phys_processor_idx:
25  *   0xffffffffffffffff: or -1, which means it is irrelavant for the event
26  *
27  * __count(offset, bytes, name):
28  *      a counter that should be exposed via perf
29  * __field(offset, bytes, name)
30  *      a normal field
31  * __array(offset, bytes, name)
32  *      an array of bytes
33  *
34  *
35  *      @bytes for __count, and __field _must_ be a numeral token
36  *      in decimal, not an expression and not in hex.
37  *
38  *
39  * TODO:
40  *      - expose secondary index (if any counter ever uses it, only 0xA0
41  *        appears to use it right now, and it doesn't have any counters)
42  *      - embed versioning info
43  *      - include counter descriptions
44  */
45 #define REQUEST_NAME dispatch_timebase_by_processor
46 #define REQUEST_NUM 0x10
47 #define REQUEST_IDX_KIND "phys_processor_idx=?"
48 #include I(REQUEST_BEGIN)
49 REQUEST(__count(0,      8,      processor_time_in_timebase_cycles)
50         __field(0x8,    4,      hw_processor_id)
51         __field(0xC,    2,      owning_part_id)
52         __field(0xE,    1,      processor_state)
53         __field(0xF,    1,      version)
54         __field(0x10,   4,      hw_chip_id)
55         __field(0x14,   4,      phys_module_id)
56         __field(0x18,   4,      primary_affinity_domain_idx)
57         __field(0x1C,   4,      secondary_affinity_domain_idx)
58         __field(0x20,   4,      processor_version)
59         __field(0x24,   2,      logical_processor_idx)
60         __field(0x26,   2,      reserved)
61         __field(0x28,   4,      processor_id_register)
62         __field(0x2C,   4,      phys_processor_idx)
63 )
64 #include I(REQUEST_END)
65
66 #define REQUEST_NAME system_performance_capabilities
67 #define REQUEST_NUM 0x40
68 #define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff"
69 #include I(REQUEST_BEGIN)
70 REQUEST(__field(0,      1,      perf_collect_privileged)
71         __field(0x1,    1,      capability_mask)
72         __array(0x2,    0xE,    reserved)
73 )
74 #include I(REQUEST_END)
75
76 #include "req-gen/_end.h"