#ifndef S390_CMB_H1#define S390_CMB_H23#include <linux/types.h>45/**6* struct cmbdata - channel measurement block data for user space7* @size: size of the stored data8* @elapsed_time: time since last sampling9* @ssch_rsch_count: number of ssch and rsch10* @sample_count: number of samples11* @device_connect_time: time of device connect12* @function_pending_time: time of function pending13* @device_disconnect_time: time of device disconnect14* @control_unit_queuing_time: time of control unit queuing15* @device_active_only_time: time of device active only16* @device_busy_time: time of device busy (ext. format)17* @initial_command_response_time: initial command response time (ext. format)18*19* All values are stored as 64 bit for simplicity, especially20* in 32 bit emulation mode. All time values are normalized to21* nanoseconds.22* Currently, two formats are known, which differ by the size of23* this structure, i.e. the last two members are only set when24* the extended channel measurement facility (first shipped in25* z990 machines) is activated.26* Potentially, more fields could be added, which would result in a27* new ioctl number.28*/29struct cmbdata {30__u64 size;31__u64 elapsed_time;32/* basic and exended format: */33__u64 ssch_rsch_count;34__u64 sample_count;35__u64 device_connect_time;36__u64 function_pending_time;37__u64 device_disconnect_time;38__u64 control_unit_queuing_time;39__u64 device_active_only_time;40/* extended format only: */41__u64 device_busy_time;42__u64 initial_command_response_time;43};4445/* enable channel measurement */46#define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER, 32)47/* enable channel measurement */48#define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER, 33)49/* read channel measurement data */50#define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER, 33, struct cmbdata)5152#ifdef __KERNEL__53struct ccw_device;54extern int enable_cmf(struct ccw_device *cdev);55extern int disable_cmf(struct ccw_device *cdev);56extern u64 cmf_read(struct ccw_device *cdev, int index);57extern int cmf_readall(struct ccw_device *cdev, struct cmbdata *data);5859#endif /* __KERNEL__ */60#endif /* S390_CMB_H */616263