Path: blob/master/arch/s390/include/uapi/asm/hwctrset.h
26481 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* Copyright IBM Corp. 20213* Interface implementation for communication with the CPU Measurement4* counter facility device driver.5*6* Author(s): Thomas Richter <[email protected]>7*8* Define for ioctl() commands to communicate with the CPU Measurement9* counter facility device driver.10*/1112#ifndef _PERF_CPUM_CF_DIAG_H13#define _PERF_CPUM_CF_DIAG_H1415#include <linux/ioctl.h>16#include <linux/types.h>1718#define S390_HWCTR_DEVICE "hwctr"19#define S390_HWCTR_START_VERSION 12021struct s390_ctrset_start { /* Set CPUs to operate on */22__u64 version; /* Version of interface */23__u64 data_bytes; /* # of bytes required */24__u64 cpumask_len; /* Length of CPU mask in bytes */25__u64 *cpumask; /* Pointer to CPU mask */26__u64 counter_sets; /* Bit mask of counter sets to get */27};2829struct s390_ctrset_setdata { /* Counter set data */30__u32 set; /* Counter set number */31__u32 no_cnts; /* # of counters stored in cv[] */32__u64 cv[]; /* Counter values (variable length) */33};3435struct s390_ctrset_cpudata { /* Counter set data per CPU */36__u32 cpu_nr; /* CPU number */37__u32 no_sets; /* # of counters sets in data[] */38struct s390_ctrset_setdata data[];39};4041struct s390_ctrset_read { /* Structure to get all ctr sets */42__u64 no_cpus; /* Total # of CPUs data taken from */43struct s390_ctrset_cpudata data[];44};4546#define S390_HWCTR_MAGIC 'C' /* Random magic # for ioctls */47#define S390_HWCTR_START _IOWR(S390_HWCTR_MAGIC, 1, struct s390_ctrset_start)48#define S390_HWCTR_STOP _IO(S390_HWCTR_MAGIC, 2)49#define S390_HWCTR_READ _IOWR(S390_HWCTR_MAGIC, 3, struct s390_ctrset_read)50#endif515253