drivers/s390/cio/chp.h
Source file repositories/reference/linux-study-clean/drivers/s390/cio/chp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/cio/chp.h- Extension
.h- Size
- 2008 bytes
- Lines
- 79
- 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/device.hlinux/mutex.hasm/chpid.hchsc.hcss.h
Detected Declarations
struct chp_linkstruct channel_pathfunction chp_test_bit
Annotated Snippet
struct chp_link {
struct chp_id chpid;
u32 fla_mask;
u16 fla;
};
static inline int chp_test_bit(u8 *bitmap, int num)
{
int byte = num >> 3;
int mask = 128 >> (num & 7);
return (bitmap[byte] & mask) ? 1 : 0;
}
struct channel_path {
struct device dev;
struct chp_id chpid;
struct mutex lock; /* Serialize access to below members. */
int state;
struct channel_path_desc_fmt0 desc;
struct channel_path_desc_fmt1 desc_fmt1;
struct channel_path_desc_fmt3 desc_fmt3;
/* Channel-measurement related stuff: */
int cmg;
int shared;
int extended;
unsigned long speed;
struct cmg_chars cmg_chars;
struct cmg_cmcb cmcb;
};
/* Return channel_path struct for given chpid. */
static inline struct channel_path *chpid_to_chp(struct chp_id chpid)
{
return css_by_id(chpid.cssid)->chps[chpid.id];
}
int chp_get_status(struct chp_id chpid);
u8 chp_get_sch_opm(struct subchannel *sch);
int chp_is_registered(struct chp_id chpid);
struct channel_path_desc_fmt0 *chp_get_chp_desc(struct chp_id chpid);
void chp_remove_cmg_attr(struct channel_path *chp);
int chp_add_cmg_attr(struct channel_path *chp);
int chp_update_desc(struct channel_path *chp);
int chp_new(struct chp_id chpid);
void chp_cfg_schedule(struct chp_id chpid, int configure);
void chp_cfg_cancel_deconfigure(struct chp_id chpid);
int chp_info_get_status(struct chp_id chpid);
int chp_ssd_get_mask(struct chsc_ssd_info *, struct chp_link *);
#endif /* S390_CHP_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/device.h`, `linux/mutex.h`, `asm/chpid.h`, `chsc.h`, `css.h`.
- Detected declarations: `struct chp_link`, `struct channel_path`, `function chp_test_bit`.
- 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.