162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _UAPIS390_CMB_H 362306a36Sopenharmony_ci#define _UAPIS390_CMB_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <linux/types.h> 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci/** 862306a36Sopenharmony_ci * struct cmbdata - channel measurement block data for user space 962306a36Sopenharmony_ci * @size: size of the stored data 1062306a36Sopenharmony_ci * @elapsed_time: time since last sampling 1162306a36Sopenharmony_ci * @ssch_rsch_count: number of ssch and rsch 1262306a36Sopenharmony_ci * @sample_count: number of samples 1362306a36Sopenharmony_ci * @device_connect_time: time of device connect 1462306a36Sopenharmony_ci * @function_pending_time: time of function pending 1562306a36Sopenharmony_ci * @device_disconnect_time: time of device disconnect 1662306a36Sopenharmony_ci * @control_unit_queuing_time: time of control unit queuing 1762306a36Sopenharmony_ci * @device_active_only_time: time of device active only 1862306a36Sopenharmony_ci * @device_busy_time: time of device busy (ext. format) 1962306a36Sopenharmony_ci * @initial_command_response_time: initial command response time (ext. format) 2062306a36Sopenharmony_ci * 2162306a36Sopenharmony_ci * All values are stored as 64 bit for simplicity, especially 2262306a36Sopenharmony_ci * in 32 bit emulation mode. All time values are normalized to 2362306a36Sopenharmony_ci * nanoseconds. 2462306a36Sopenharmony_ci * Currently, two formats are known, which differ by the size of 2562306a36Sopenharmony_ci * this structure, i.e. the last two members are only set when 2662306a36Sopenharmony_ci * the extended channel measurement facility (first shipped in 2762306a36Sopenharmony_ci * z990 machines) is activated. 2862306a36Sopenharmony_ci * Potentially, more fields could be added, which would result in a 2962306a36Sopenharmony_ci * new ioctl number. 3062306a36Sopenharmony_ci */ 3162306a36Sopenharmony_cistruct cmbdata { 3262306a36Sopenharmony_ci __u64 size; 3362306a36Sopenharmony_ci __u64 elapsed_time; 3462306a36Sopenharmony_ci /* basic and extended format: */ 3562306a36Sopenharmony_ci __u64 ssch_rsch_count; 3662306a36Sopenharmony_ci __u64 sample_count; 3762306a36Sopenharmony_ci __u64 device_connect_time; 3862306a36Sopenharmony_ci __u64 function_pending_time; 3962306a36Sopenharmony_ci __u64 device_disconnect_time; 4062306a36Sopenharmony_ci __u64 control_unit_queuing_time; 4162306a36Sopenharmony_ci __u64 device_active_only_time; 4262306a36Sopenharmony_ci /* extended format only: */ 4362306a36Sopenharmony_ci __u64 device_busy_time; 4462306a36Sopenharmony_ci __u64 initial_command_response_time; 4562306a36Sopenharmony_ci}; 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* enable channel measurement */ 4862306a36Sopenharmony_ci#define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER, 32) 4962306a36Sopenharmony_ci/* enable channel measurement */ 5062306a36Sopenharmony_ci#define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER, 33) 5162306a36Sopenharmony_ci/* read channel measurement data */ 5262306a36Sopenharmony_ci#define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER, 33, struct cmbdata) 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci#endif /* _UAPIS390_CMB_H */ 55