1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef LINUX_POWERPC_PERF_HV_GPCI_H_
3 #define LINUX_POWERPC_PERF_HV_GPCI_H_
5 #include <linux/types.h>
7 /* From the document "H_GetPerformanceCounterInfo Interface" v1.07 */
9 /* H_GET_PERF_COUNTER_INFO argument */
10 struct hv_get_perf_counter_info_params
{
11 __be32 counter_request
; /* I */
12 __be32 starting_index
; /* IO */
13 __be16 secondary_index
; /* IO */
14 __be16 returned_values
; /* O */
15 __be32 detail_rc
; /* O, only needed when called via *_norets() */
18 * O, size each of counter_value element in bytes, only set for version
21 __be16 cv_element_size
;
23 /* I, 0 (zero) for versions < 0x3 */
24 __u8 counter_info_version_in
;
26 /* O, 0 (zero) if version < 0x3. Must be set to 0 when making hcall */
27 __u8 counter_info_version_out
;
33 * counter info version => fw version/reference (spec version)
36 * [7 is skipped by spec 1.07]
38 * 5 => v7r7m0.phyp (1.05)
40 * 3 => v7r6m0.phyp (?)
42 * 0 => v7r{2,3,4}m0.phyp (?)
44 #define COUNTER_INFO_VERSION_CURRENT 0x8
46 /* capability mask masks. */
48 HV_GPCI_CM_GA
= (1 << 7),
49 HV_GPCI_CM_EXPANDED
= (1 << 6),
50 HV_GPCI_CM_LAB
= (1 << 5)
53 #define REQUEST_FILE "../hv-gpci-requests.h"
54 #define NAME_LOWER hv_gpci
55 #define NAME_UPPER HV_GPCI
56 #include "req-gen/perf.h"