drivers/s390/char/sclp.h
Source file repositories/reference/linux-study-clean/drivers/s390/char/sclp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/char/sclp.h- Extension
.h- Size
- 11649 bytes
- Lines
- 386
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/list.hasm/asm-extable.hasm/machine.hasm/sclp.hasm/ebcdic.hasm/asm.h
Detected Declarations
struct init_sccbstruct read_cpu_info_sccbstruct read_info_sccbstruct read_storage_sccbstruct gds_subvectorstruct gds_vectorstruct sclp_reqstruct sclp_registerfunction sccb_get_maskfunction sccb_set_maskfunction sclp_fill_core_infofunction sclp_service_callfunction sclp_ascebcfunction sclp_ebcasc_strfunction sclp_ascebc_strfunction sclp_find_gds_vectorfunction sclp_find_gds_subvector
Annotated Snippet
struct init_sccb {
struct sccb_header header;
u16 _reserved;
u16 mask_length;
u8 masks[4 * 1021]; /* variable length */
/*
* u8 receive_mask[mask_length];
* u8 send_mask[mask_length];
* u8 sclp_receive_mask[mask_length];
* u8 sclp_send_mask[mask_length];
*/
} __attribute__((packed));
#define SCLP_MASK_SIZE_COMPAT 4
static inline sccb_mask_t sccb_get_mask(u8 *masks, size_t len, int i)
{
sccb_mask_t res = 0;
memcpy(&res, masks + i * len, min(sizeof(res), len));
return res;
}
static inline void sccb_set_mask(u8 *masks, size_t len, int i, sccb_mask_t val)
{
memset(masks + i * len, 0, len);
memcpy(masks + i * len, &val, min(sizeof(val), len));
}
#define sccb_get_generic_mask(sccb, i) \
({ \
__typeof__(sccb) __sccb = sccb; \
\
sccb_get_mask(__sccb->masks, __sccb->mask_length, i); \
})
#define sccb_get_recv_mask(sccb) sccb_get_generic_mask(sccb, 0)
#define sccb_get_send_mask(sccb) sccb_get_generic_mask(sccb, 1)
#define sccb_get_sclp_recv_mask(sccb) sccb_get_generic_mask(sccb, 2)
#define sccb_get_sclp_send_mask(sccb) sccb_get_generic_mask(sccb, 3)
#define sccb_set_generic_mask(sccb, i, val) \
({ \
__typeof__(sccb) __sccb = sccb; \
\
sccb_set_mask(__sccb->masks, __sccb->mask_length, i, val); \
})
#define sccb_set_recv_mask(sccb, val) sccb_set_generic_mask(sccb, 0, val)
#define sccb_set_send_mask(sccb, val) sccb_set_generic_mask(sccb, 1, val)
#define sccb_set_sclp_recv_mask(sccb, val) sccb_set_generic_mask(sccb, 2, val)
#define sccb_set_sclp_send_mask(sccb, val) sccb_set_generic_mask(sccb, 3, val)
struct read_cpu_info_sccb {
struct sccb_header header;
u16 nr_configured;
u16 offset_configured;
u16 nr_standby;
u16 offset_standby;
/*
* Without ext sccb, struct size is PAGE_SIZE.
* With ext sccb, struct size is EXT_SCCB_READ_CPU.
*/
u8 reserved[];
} __attribute__((packed, aligned(PAGE_SIZE)));
struct read_info_sccb {
struct sccb_header header; /* 0-7 */
u16 rnmax; /* 8-9 */
u8 rnsize; /* 10 */
u8 _pad_11[16 - 11]; /* 11-15 */
u16 ncpurl; /* 16-17 */
u16 cpuoff; /* 18-19 */
u8 _pad_20[24 - 20]; /* 20-23 */
u8 loadparm[8]; /* 24-31 */
u8 _pad_32[42 - 32]; /* 32-41 */
u8 fac42; /* 42 */
u8 fac43; /* 43 */
u8 _pad_44[48 - 44]; /* 44-47 */
u64 facilities; /* 48-55 */
u8 _pad_56[66 - 56]; /* 56-65 */
u8 fac66; /* 66 */
u8 _pad_67[76 - 67]; /* 67-83 */
u32 ibc; /* 76-79 */
u8 _pad80[84 - 80]; /* 80-83 */
u8 fac84; /* 84 */
u8 fac85; /* 85 */
u8 _pad_86[91 - 86]; /* 86-90 */
u8 fac91; /* 91 */
u8 _pad_92[98 - 92]; /* 92-97 */
u8 fac98; /* 98 */
u8 hamaxpow; /* 99 */
Annotation
- Immediate include surface: `linux/types.h`, `linux/list.h`, `asm/asm-extable.h`, `asm/machine.h`, `asm/sclp.h`, `asm/ebcdic.h`, `asm/asm.h`.
- Detected declarations: `struct init_sccb`, `struct read_cpu_info_sccb`, `struct read_info_sccb`, `struct read_storage_sccb`, `struct gds_subvector`, `struct gds_vector`, `struct sclp_req`, `struct sclp_register`, `function sccb_get_mask`, `function sccb_set_mask`.
- Atlas domain: Driver Families / drivers/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.