External programming interfaces

6.18 LPAR mode

Applications can use the CHSC subchannel device driver through ioctls.

Programmers: This information is intended for programmers who want to program additional functions for the CHSC subchannel device driver.

Issue ioctls on the misc character device /dev/chsc to obtain information on the current I/O configuration and to dynamically change the I/O configuration. The ioctls and the structures that are passed are defined in the header file arch/s390/include/chsc.h.

To use an ioctl, for example CHSC_START, issue a call of the form:
rc = ioctl(fd, CHSC_START, <pointer to chsc_async_area>);
Table 1 lists the ioctls that are defined.
Table 1. The CHSC ioctls

The table has three columns, the first column lists IO controls, the second lists the structure that is passed, and the third column contains a description.

Name Structure passed Description
CHSC_START struct chsc_async_area Use to start an asynchronous chsc request that changes the I/O configuration.
CHSC_INFO_CHANNEL_PATH struct chsc_chp_cd Use to obtain information about a specific channel path.
CHSC_INFO_CU struct chsc_cu_cd Use to obtain information about a specific control unit.
CHSC_INFO_SCH_CU struct chsc_sch_cud Use CHSC_INFO_SCH_CU to obtain information about control units on a subchannel.
CHSC_INFO_CI struct chsc_conf_info CHSC_INFO_CI can be used to obtain the configuration information as needed by the dynamic I/O configuration chscs.
CHSC_INFO_CCL struct chsc_comp_list CHSC_INFO_CCL can be used to obtain information about various configuration components.
CHSC_INFO_CPD struct chsc_cpd_info Use CHSC_INFO_CPD to obtain a description of a specified channel path.
CHSC_INFO_DCAL struct chsc_dcal Use CHSC_INFO_DCAL to obtain domain attributes of the configuration.
CHSC_START_SYNC struct chsc_sync_area Use CHSC_START_SYNC to start a synchronous chsc request.
CHSC_ON_CLOSE_SET struct chsc_async_area Install the asynchronous on close chsc request. This request is executed when the device node is closed.
CHSC_ON_CLOSE_REMOVE none Remove the asynchronous on close chsc request.