arch/s390/include/asm/cio.h

Source file repositories/reference/linux-study-clean/arch/s390/include/asm/cio.h

File Facts

System
Linux kernel
Corpus path
arch/s390/include/asm/cio.h
Extension
.h
Size
9263 bytes
Lines
384
Domain
Architecture Layer
Bucket
arch/s390
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ccw1 {
	__u8  cmd_code;
	__u8  flags;
	__u16 count;
	dma32_t cda;
} __attribute__ ((packed,aligned(8)));

/**
 * struct ccw0 - channel command word
 * @cmd_code: command code
 * @cda: data address
 * @flags: flags, like IDA addressing, etc.
 * @reserved: will be ignored
 * @count: byte count
 *
 * The format-0 ccw structure.
 */
struct ccw0 {
	__u8 cmd_code;
	__u32 cda : 24;
	__u8  flags;
	__u8  reserved;
	__u16 count;
} __packed __aligned(8);

#define CCW_FLAG_DC		0x80
#define CCW_FLAG_CC		0x40
#define CCW_FLAG_SLI		0x20
#define CCW_FLAG_SKIP		0x10
#define CCW_FLAG_PCI		0x08
#define CCW_FLAG_IDA		0x04
#define CCW_FLAG_SUSPEND	0x02

#define CCW_CMD_READ_IPL	0x02
#define CCW_CMD_NOOP		0x03
#define CCW_CMD_BASIC_SENSE	0x04
#define CCW_CMD_TIC		0x08
#define CCW_CMD_STLCK           0x14
#define CCW_CMD_SENSE_PGID	0x34
#define CCW_CMD_SUSPEND_RECONN	0x5B
#define CCW_CMD_RDC		0x64
#define CCW_CMD_RELEASE		0x94
#define CCW_CMD_SET_PGID	0xAF
#define CCW_CMD_SENSE_ID	0xE4
#define CCW_CMD_DCTL		0xF3

#define SENSE_MAX_COUNT		0x20

/**
 * struct erw - extended report word
 * @res0: reserved
 * @auth: authorization check
 * @pvrf: path-verification-required flag
 * @cpt: channel-path timeout
 * @fsavf: failing storage address validity flag
 * @cons: concurrent sense
 * @scavf: secondary ccw address validity flag
 * @fsaf: failing storage address format
 * @scnt: sense count, if @cons == %1
 * @res16: reserved
 */
struct erw {
	__u32 res0  : 3;
	__u32 auth  : 1;
	__u32 pvrf  : 1;
	__u32 cpt   : 1;
	__u32 fsavf : 1;
	__u32 cons  : 1;
	__u32 scavf : 1;
	__u32 fsaf  : 1;
	__u32 scnt  : 6;
	__u32 res16 : 16;
} __attribute__ ((packed));

/**
 * struct erw_eadm - EADM Subchannel extended report word
 * @b: aob error
 * @r: arsb error
 */
struct erw_eadm {
	__u32 : 16;
	__u32 b : 1;
	__u32 r : 1;
	__u32  : 14;
} __packed;

/**
 * struct sublog - subchannel logout area
 * @res0: reserved
 * @esf: extended status flags

Annotation

Implementation Notes