linux/arch/s390/include/uapi/asm/chsc.h
<<
>>
Prefs
   1/*
   2 * ioctl interface for /dev/chsc
   3 *
   4 * Copyright IBM Corp. 2008, 2012
   5 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
   6 */
   7
   8#ifndef _ASM_CHSC_H
   9#define _ASM_CHSC_H
  10
  11#include <linux/types.h>
  12#include <linux/ioctl.h>
  13#include <asm/chpid.h>
  14#include <asm/schid.h>
  15
  16#define CHSC_SIZE 0x1000
  17
  18struct chsc_async_header {
  19        __u16 length;
  20        __u16 code;
  21        __u32 cmd_dependend;
  22        __u32 key : 4;
  23        __u32 : 28;
  24        struct subchannel_id sid;
  25} __attribute__ ((packed));
  26
  27struct chsc_async_area {
  28        struct chsc_async_header header;
  29        __u8 data[CHSC_SIZE - sizeof(struct chsc_async_header)];
  30} __attribute__ ((packed));
  31
  32struct chsc_header {
  33        __u16 length;
  34        __u16 code;
  35} __attribute__ ((packed));
  36
  37struct chsc_sync_area {
  38        struct chsc_header header;
  39        __u8 data[CHSC_SIZE - sizeof(struct chsc_header)];
  40} __attribute__ ((packed));
  41
  42struct chsc_response_struct {
  43        __u16 length;
  44        __u16 code;
  45        __u32 parms;
  46        __u8 data[CHSC_SIZE - 2 * sizeof(__u16) - sizeof(__u32)];
  47} __attribute__ ((packed));
  48
  49struct chsc_chp_cd {
  50        struct chp_id chpid;
  51        int m;
  52        int fmt;
  53        struct chsc_response_struct cpcb;
  54};
  55
  56struct chsc_cu_cd {
  57        __u16 cun;
  58        __u8 cssid;
  59        int m;
  60        int fmt;
  61        struct chsc_response_struct cucb;
  62};
  63
  64struct chsc_sch_cud {
  65        struct subchannel_id schid;
  66        int fmt;
  67        struct chsc_response_struct scub;
  68};
  69
  70struct conf_id {
  71        int m;
  72        __u8 cssid;
  73        __u8 ssid;
  74};
  75
  76struct chsc_conf_info {
  77        struct conf_id id;
  78        int fmt;
  79        struct chsc_response_struct scid;
  80};
  81
  82struct ccl_parm_chpid {
  83        int m;
  84        struct chp_id chp;
  85};
  86
  87struct ccl_parm_cssids {
  88        __u8 f_cssid;
  89        __u8 l_cssid;
  90};
  91
  92struct chsc_comp_list {
  93        struct {
  94                enum {
  95                        CCL_CU_ON_CHP = 1,
  96                        CCL_CHP_TYPE_CAP = 2,
  97                        CCL_CSS_IMG = 4,
  98                        CCL_CSS_IMG_CONF_CHAR = 5,
  99                        CCL_IOP_CHP = 6,
 100                } ctype;
 101                int fmt;
 102                struct ccl_parm_chpid chpid;
 103                struct ccl_parm_cssids cssids;
 104        } req;
 105        struct chsc_response_struct sccl;
 106};
 107
 108struct chsc_dcal {
 109        struct {
 110                enum {
 111                        DCAL_CSS_IID_PN = 4,
 112                } atype;
 113                __u32 list_parm[2];
 114                int fmt;
 115        } req;
 116        struct chsc_response_struct sdcal;
 117};
 118
 119struct chsc_cpd_info {
 120        struct chp_id chpid;
 121        int m;
 122        int fmt;
 123        int rfmt;
 124        int c;
 125        struct chsc_response_struct chpdb;
 126};
 127
 128#define CHSC_IOCTL_MAGIC 'c'
 129
 130#define CHSC_START _IOWR(CHSC_IOCTL_MAGIC, 0x81, struct chsc_async_area)
 131#define CHSC_INFO_CHANNEL_PATH _IOWR(CHSC_IOCTL_MAGIC, 0x82, \
 132                                    struct chsc_chp_cd)
 133#define CHSC_INFO_CU _IOWR(CHSC_IOCTL_MAGIC, 0x83, struct chsc_cu_cd)
 134#define CHSC_INFO_SCH_CU _IOWR(CHSC_IOCTL_MAGIC, 0x84, struct chsc_sch_cud)
 135#define CHSC_INFO_CI _IOWR(CHSC_IOCTL_MAGIC, 0x85, struct chsc_conf_info)
 136#define CHSC_INFO_CCL _IOWR(CHSC_IOCTL_MAGIC, 0x86, struct chsc_comp_list)
 137#define CHSC_INFO_CPD _IOWR(CHSC_IOCTL_MAGIC, 0x87, struct chsc_cpd_info)
 138#define CHSC_INFO_DCAL _IOWR(CHSC_IOCTL_MAGIC, 0x88, struct chsc_dcal)
 139#define CHSC_START_SYNC _IOWR(CHSC_IOCTL_MAGIC, 0x89, struct chsc_sync_area)
 140#define CHSC_ON_CLOSE_SET _IOWR(CHSC_IOCTL_MAGIC, 0x8a, struct chsc_async_area)
 141#define CHSC_ON_CLOSE_REMOVE _IO(CHSC_IOCTL_MAGIC, 0x8b)
 142
 143#endif
 144