powerpc/perf/hv-24x7: Modify definition of request and result buffers
The parameters to the 24x7 HCALL have variable number of elements in them. Set the minimum number of such elements to 1 rather than 0 and eliminate the temporary structures. This would enable us to submit multiple counter requests and process multiple results from a single HCALL (in a follow on patch). Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
ed59190e41
commit
145264e212
@@ -50,7 +50,7 @@ struct hv_24x7_request_buffer {
|
||||
__u8 interface_version;
|
||||
__u8 num_requests;
|
||||
__u8 reserved[0xE];
|
||||
struct hv_24x7_request requests[];
|
||||
struct hv_24x7_request requests[1];
|
||||
} __packed;
|
||||
|
||||
struct hv_24x7_result_element {
|
||||
@@ -66,7 +66,7 @@ struct hv_24x7_result_element {
|
||||
__be32 lpar_cfg_instance_id;
|
||||
|
||||
/* size = @result_element_data_size of cointaining result. */
|
||||
__u8 element_data[];
|
||||
__u64 element_data[1];
|
||||
} __packed;
|
||||
|
||||
struct hv_24x7_result {
|
||||
@@ -87,7 +87,7 @@ struct hv_24x7_result {
|
||||
/* WARNING: only valid for first result element due to variable sizes
|
||||
* of result elements */
|
||||
/* struct hv_24x7_result_element[@num_elements_returned] */
|
||||
struct hv_24x7_result_element elements[];
|
||||
struct hv_24x7_result_element elements[1];
|
||||
} __packed;
|
||||
|
||||
struct hv_24x7_data_result_buffer {
|
||||
@@ -103,7 +103,7 @@ struct hv_24x7_data_result_buffer {
|
||||
__u8 reserved2[0x8];
|
||||
/* WARNING: only valid for the first result due to variable sizes of
|
||||
* results */
|
||||
struct hv_24x7_result results[]; /* [@num_results] */
|
||||
struct hv_24x7_result results[1]; /* [@num_results] */
|
||||
} __packed;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user