Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _UAPIS390_CMB_H
0003 #define _UAPIS390_CMB_H
0004 
0005 #include <linux/types.h>
0006 
0007 /**
0008  * struct cmbdata - channel measurement block data for user space
0009  * @size: size of the stored data
0010  * @elapsed_time: time since last sampling
0011  * @ssch_rsch_count: number of ssch and rsch
0012  * @sample_count: number of samples
0013  * @device_connect_time: time of device connect
0014  * @function_pending_time: time of function pending
0015  * @device_disconnect_time: time of device disconnect
0016  * @control_unit_queuing_time: time of control unit queuing
0017  * @device_active_only_time: time of device active only
0018  * @device_busy_time: time of device busy (ext. format)
0019  * @initial_command_response_time: initial command response time (ext. format)
0020  *
0021  * All values are stored as 64 bit for simplicity, especially
0022  * in 32 bit emulation mode. All time values are normalized to
0023  * nanoseconds.
0024  * Currently, two formats are known, which differ by the size of
0025  * this structure, i.e. the last two members are only set when
0026  * the extended channel measurement facility (first shipped in
0027  * z990 machines) is activated.
0028  * Potentially, more fields could be added, which would result in a
0029  * new ioctl number.
0030  */
0031 struct cmbdata {
0032     __u64 size;
0033     __u64 elapsed_time;
0034  /* basic and exended format: */
0035     __u64 ssch_rsch_count;
0036     __u64 sample_count;
0037     __u64 device_connect_time;
0038     __u64 function_pending_time;
0039     __u64 device_disconnect_time;
0040     __u64 control_unit_queuing_time;
0041     __u64 device_active_only_time;
0042  /* extended format only: */
0043     __u64 device_busy_time;
0044     __u64 initial_command_response_time;
0045 };
0046 
0047 /* enable channel measurement */
0048 #define BIODASDCMFENABLE    _IO(DASD_IOCTL_LETTER, 32)
0049 /* enable channel measurement */
0050 #define BIODASDCMFDISABLE   _IO(DASD_IOCTL_LETTER, 33)
0051 /* read channel measurement data */
0052 #define BIODASDREADALLCMB   _IOWR(DASD_IOCTL_LETTER, 33, struct cmbdata)
0053 
0054 #endif /* _UAPIS390_CMB_H */