arch/s390/include/asm/diag.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/diag.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/diag.h- Extension
.h- Size
- 7913 bytes
- Lines
- 378
- 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.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/if_ether.hlinux/percpu.hasm/asm-extable.hasm/sclp.hasm/cio.h
Detected Declarations
struct hypfs_diag0c_entrystruct diag210struct diag8cstruct diag204_info_blk_hdrstruct diag204_x_info_blk_hdrstruct diag204_part_hdrstruct diag204_x_part_hdrstruct diag204_cpu_infostruct diag204_x_cpu_infostruct diag204_phys_hdrstruct diag204_x_phys_hdrstruct diag204_phys_cpustruct diag204_x_phys_cpustruct diag204_x_part_blockstruct diag204_x_phys_blockstruct diag26c_vnic_reqstruct diag26c_vnic_respstruct diag26c_mac_reqstruct diag26c_mac_respstruct hypfs_diag0c_entrystruct diag_opsenum diag_stat_enumenum diag204_scenum diag204_formatenum diag204_cpu_flagsenum diag26c_scenum diag26c_versionenum diag49c_scfunction diag10_rangefunction diag204_has_bif
Annotated Snippet
struct diag210 {
u16 vrdcdvno; /* device number (input) */
u16 vrdclen; /* data block length (input) */
u8 vrdcvcla; /* virtual device class (output) */
u8 vrdcvtyp; /* virtual device type (output) */
u8 vrdcvsta; /* virtual device status (output) */
u8 vrdcvfla; /* virtual device flags (output) */
u8 vrdcrccl; /* real device class (output) */
u8 vrdccrty; /* real device type (output) */
u8 vrdccrmd; /* real device model (output) */
u8 vrdccrft; /* real device feature (output) */
} __packed __aligned(4);
extern int diag210(struct diag210 *addr);
struct diag8c {
u8 flags;
u8 num_partitions;
u16 width;
u16 height;
u8 data[];
} __packed __aligned(4);
extern int diag8c(struct diag8c *out, struct ccw_dev_id *devno);
/* bit is set in flags, when physical cpu info is included in diag 204 data */
#define DIAG204_LPAR_PHYS_FLG 0x80
#define DIAG204_LPAR_NAME_LEN 8 /* lpar name len in diag 204 data */
#define DIAG204_CPU_NAME_LEN 16 /* type name len of cpus in diag224 name table */
/* diag 204 subcodes */
enum diag204_sc {
DIAG204_SUBC_STIB4 = 4,
DIAG204_SUBC_RSI = 5,
DIAG204_SUBC_STIB6 = 6,
DIAG204_SUBC_STIB7 = 7
};
#define DIAG204_SUBCODE_MASK 0xffff
#define DIAG204_BIF_BIT 0x80000000
#define DIAG204_BUSY_WAIT (HZ / 10)
/* The two available diag 204 data formats */
enum diag204_format {
DIAG204_INFO_SIMPLE = 0,
DIAG204_INFO_EXT = 0x00010000
};
enum diag204_cpu_flags {
DIAG204_CPU_ONLINE = 0x20,
DIAG204_CPU_CAPPED = 0x40,
};
struct diag204_info_blk_hdr {
__u8 npar;
__u8 flags;
__u16 tslice;
__u16 phys_cpus;
__u16 this_part;
__u64 curtod;
} __packed;
struct diag204_x_info_blk_hdr {
__u8 npar;
__u8 flags;
__u16 tslice;
__u16 phys_cpus;
__u16 this_part;
__u64 curtod1;
__u64 curtod2;
char reserved[40];
} __packed;
struct diag204_part_hdr {
__u8 pn;
__u8 cpus;
char reserved[6];
char part_name[DIAG204_LPAR_NAME_LEN];
} __packed;
struct diag204_x_part_hdr {
__u8 pn;
__u8 cpus;
__u8 rcpus;
__u8 pflag;
__u32 mlu;
char part_name[DIAG204_LPAR_NAME_LEN];
char lpc_name[8];
char os_name[8];
__u64 online_cs;
Annotation
- Immediate include surface: `linux/if_ether.h`, `linux/percpu.h`, `asm/asm-extable.h`, `asm/sclp.h`, `asm/cio.h`.
- Detected declarations: `struct hypfs_diag0c_entry`, `struct diag210`, `struct diag8c`, `struct diag204_info_blk_hdr`, `struct diag204_x_info_blk_hdr`, `struct diag204_part_hdr`, `struct diag204_x_part_hdr`, `struct diag204_cpu_info`, `struct diag204_x_cpu_info`, `struct diag204_phys_hdr`.
- Atlas domain: Architecture Layer / arch/s390.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.