1 #ifndef LINUX_POWERPC_PERF_HV_GPCI_H_
2 #define LINUX_POWERPC_PERF_HV_GPCI_H_
4 #include <linux/types.h>
6 /* From the document "H_GetPerformanceCounterInfo Interface" v1.07 */
8 /* H_GET_PERF_COUNTER_INFO argument */
9 struct hv_get_perf_counter_info_params
{
10 __be32 counter_request
; /* I */
11 __be32 starting_index
; /* IO */
12 __be16 secondary_index
; /* IO */
13 __be16 returned_values
; /* O */
14 __be32 detail_rc
; /* O, only needed when called via *_norets() */
17 * O, size each of counter_value element in bytes, only set for version
20 __be16 cv_element_size
;
22 /* I, 0 (zero) for versions < 0x3 */
23 __u8 counter_info_version_in
;
25 /* O, 0 (zero) if version < 0x3. Must be set to 0 when making hcall */
26 __u8 counter_info_version_out
;
32 * counter info version => fw version/reference (spec version)
35 * [7 is skipped by spec 1.07]
37 * 5 => v7r7m0.phyp (1.05)
39 * 3 => v7r6m0.phyp (?)
41 * 0 => v7r{2,3,4}m0.phyp (?)
43 #define COUNTER_INFO_VERSION_CURRENT 0x8
45 /* capability mask masks. */
47 HV_GPCI_CM_GA
= (1 << 7),
48 HV_GPCI_CM_EXPANDED
= (1 << 6),
49 HV_GPCI_CM_LAB
= (1 << 5)
52 #define REQUEST_FILE "../hv-gpci-requests.h"
53 #define NAME_LOWER hv_gpci
54 #define NAME_UPPER HV_GPCI
55 #include "req-gen/perf.h"