1 #ifndef LINUX_POWERPC_PERF_HV_24X7_H_
2 #define LINUX_POWERPC_PERF_HV_24X7_H_
4 #include <linux/types.h>
6 struct hv_24x7_request {
7 /* PHYSICAL domains require enabling via phyp/hmc. */
8 #define HV_24X7_PERF_DOMAIN_PHYSICAL_CHIP 0x01
9 #define HV_24X7_PERF_DOMAIN_PHYSICAL_CORE 0x02
10 #define HV_24X7_PERF_DOMAIN_VIRTUAL_PROCESSOR_HOME_CORE 0x03
11 #define HV_24X7_PERF_DOMAIN_VIRTUAL_PROCESSOR_HOME_CHIP 0x04
12 #define HV_24X7_PERF_DOMAIN_VIRTUAL_PROCESSOR_HOME_NODE 0x05
13 #define HV_24X7_PERF_DOMAIN_VIRTUAL_PROCESSOR_REMOTE_NODE 0x06
14 __u8 performance_domain;
17 /* bytes to read starting at @data_offset. must be a multiple of 8 */
21 * byte offset within the perf domain to read from. must be 8 byte
27 * only valid for VIRTUAL_PROCESSOR domains, ignored for others.
28 * -1 means "current partition only"
29 * Enabling via phyp/hmc required for non-"-1" values. 0 forbidden
30 * unless requestor is 0.
32 __be16 starting_lpar_ix;
35 * Ignored when @starting_lpar_ix == -1
36 * Ignored when @performance_domain is not VIRTUAL_PROCESSOR_*
37 * -1 means "infinite" or all
41 /* chip, core, or virtual processor based on @performance_domain */
46 struct hv_24x7_request_buffer {
49 #define HV_24X7_IF_VERSION_CURRENT 0x01
50 __u8 interface_version;
53 struct hv_24x7_request requests[];
56 struct hv_24x7_result_element {
60 * represents the core, chip, or virtual processor based on the
61 * request's @performance_domain
65 /* -1 if @performance_domain does not refer to a virtual processor */
66 __be32 lpar_cfg_instance_id;
68 /* size = @result_element_data_size of cointaining result. */
72 struct hv_24x7_result {
76 * 0 = not all result elements fit into the buffer, additional requests
78 * 1 = all result elements were returned
80 __u8 results_complete;
81 __be16 num_elements_returned;
83 /* This is a copy of @data_size from the coresponding hv_24x7_request */
84 __be16 result_element_data_size;
87 /* WARNING: only valid for first result element due to variable sizes
88 * of result elements */
89 /* struct hv_24x7_result_element[@num_elements_returned] */
90 struct hv_24x7_result_element elements[];
93 struct hv_24x7_data_result_buffer {
94 /* See versioning for request buffer */
95 __u8 interface_version;
99 __u8 failing_request_ix;
101 __be64 cec_cfg_instance_id;
102 __be64 catalog_version_num;
104 /* WARNING: only valid for the first result due to variable sizes of
106 struct hv_24x7_result results[]; /* [@num_results] */