1 #ifndef LINUX_POWERPC_PERF_HV_24X7_H_
2 #define LINUX_POWERPC_PERF_HV_24X7_H_
4 #include <linux/types.h>
7 #define DOMAIN(n, v, x, c) HV_PERF_DOMAIN_##n = v,
8 #include "hv-24x7-domains.h"
13 struct hv_24x7_request
{
14 /* PHYSICAL domains require enabling via phyp/hmc. */
15 __u8 performance_domain
;
18 /* bytes to read starting at @data_offset. must be a multiple of 8 */
22 * byte offset within the perf domain to read from. must be 8 byte
28 * only valid for VIRTUAL_PROCESSOR domains, ignored for others.
29 * -1 means "current partition only"
30 * Enabling via phyp/hmc required for non-"-1" values. 0 forbidden
31 * unless requestor is 0.
33 __be16 starting_lpar_ix
;
36 * Ignored when @starting_lpar_ix == -1
37 * Ignored when @performance_domain is not VIRTUAL_PROCESSOR_*
38 * -1 means "infinite" or all
42 /* chip, core, or virtual processor based on @performance_domain */
47 struct hv_24x7_request_buffer
{
50 #define HV_24X7_IF_VERSION_CURRENT 0x01
51 __u8 interface_version
;
54 struct hv_24x7_request requests
[1];
57 struct hv_24x7_result_element
{
61 * represents the core, chip, or virtual processor based on the
62 * request's @performance_domain
66 /* -1 if @performance_domain does not refer to a virtual processor */
67 __be32 lpar_cfg_instance_id
;
69 /* size = @result_element_data_size of containing result. */
70 __u64 element_data
[1];
73 struct hv_24x7_result
{
77 * 0 = not all result elements fit into the buffer, additional requests
79 * 1 = all result elements were returned
81 __u8 results_complete
;
82 __be16 num_elements_returned
;
84 /* This is a copy of @data_size from the corresponding hv_24x7_request */
85 __be16 result_element_data_size
;
88 /* WARNING: only valid for first result element due to variable sizes
89 * of result elements */
90 /* struct hv_24x7_result_element[@num_elements_returned] */
91 struct hv_24x7_result_element elements
[1];
94 struct hv_24x7_data_result_buffer
{
95 /* See versioning for request buffer */
96 __u8 interface_version
;
100 __u8 failing_request_ix
;
102 __be64 cec_cfg_instance_id
;
103 __be64 catalog_version_num
;
105 /* WARNING: only valid for the first result due to variable sizes of
107 struct hv_24x7_result results
[1]; /* [@num_results] */