cmb.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _UAPIS390_CMB_H
  3. #define _UAPIS390_CMB_H
  4. #include <linux/types.h>
  5. /**
  6. * struct cmbdata - channel measurement block data for user space
  7. * @size: size of the stored data
  8. * @elapsed_time: time since last sampling
  9. * @ssch_rsch_count: number of ssch and rsch
  10. * @sample_count: number of samples
  11. * @device_connect_time: time of device connect
  12. * @function_pending_time: time of function pending
  13. * @device_disconnect_time: time of device disconnect
  14. * @control_unit_queuing_time: time of control unit queuing
  15. * @device_active_only_time: time of device active only
  16. * @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, especially
  20. * in 32 bit emulation mode. All time values are normalized to
  21. * nanoseconds.
  22. * Currently, two formats are known, which differ by the size of
  23. * this structure, i.e. the last two members are only set when
  24. * the extended channel measurement facility (first shipped in
  25. * z990 machines) is activated.
  26. * Potentially, more fields could be added, which would result in a
  27. * new ioctl number.
  28. */
  29. struct 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. };
  44. /* enable channel measurement */
  45. #define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER, 32)
  46. /* enable channel measurement */
  47. #define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER, 33)
  48. /* read channel measurement data */
  49. #define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER, 33, struct cmbdata)
  50. #endif /* _UAPIS390_CMB_H */