drivers/s390/cio/css.h
Source file repositories/reference/linux-study-clean/drivers/s390/cio/css.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/cio/css.h- Extension
.h- Size
- 4906 bytes
- Lines
- 167
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mutex.hlinux/wait.hlinux/workqueue.hlinux/device.hlinux/types.hasm/cio.hasm/chpid.hasm/schid.hcio.h
Detected Declarations
struct path_statestruct extended_cssidstruct pgidstruct subchannelstruct chp_linkstruct css_driverstruct channel_subsystemstruct schibenum css_eval_cond
Annotated Snippet
struct device_driver drv;
void (*irq)(struct subchannel *);
int (*chp_event)(struct subchannel *, struct chp_link *, int);
int (*sch_event)(struct subchannel *, int);
int (*probe)(struct subchannel *);
void (*remove)(struct subchannel *);
void (*shutdown)(struct subchannel *);
int (*settle)(void);
};
#define to_cssdriver(n) container_of_const(n, struct css_driver, drv)
extern int css_driver_register(struct css_driver *);
extern void css_driver_unregister(struct css_driver *);
extern void css_sch_device_unregister(struct subchannel *);
extern int css_register_subchannel(struct subchannel *);
extern struct subchannel *css_alloc_subchannel(struct subchannel_id,
struct schib *schib);
extern struct subchannel *get_subchannel_by_schid(struct subchannel_id);
extern int css_init_done;
extern int max_ssid;
int for_each_subchannel_staged(int (*fn_known)(struct subchannel *, void *),
int (*fn_unknown)(struct subchannel_id,
void *), void *data);
extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *);
void css_update_ssd_info(struct subchannel *sch);
struct channel_subsystem {
u8 cssid;
u8 iid;
bool id_valid; /* cssid,iid */
struct channel_path *chps[__MAX_CHPID + 1];
struct device device;
struct pgid global_pgid;
struct mutex mutex;
/* channel measurement related */
int cm_enabled;
void *cub[CSS_NUM_CUB_PAGES];
void *ecub[CSS_NUM_ECUB_PAGES];
/* for orphaned ccw devices */
struct subchannel *pseudo_subchannel;
};
#define to_css(dev) container_of(dev, struct channel_subsystem, device)
extern struct channel_subsystem *channel_subsystems[];
/* Dummy helper which needs to change once we support more than one css. */
static inline struct channel_subsystem *css_by_id(u8 cssid)
{
return channel_subsystems[0];
}
/* Dummy iterator which needs to change once we support more than one css. */
#define for_each_css(css) \
for ((css) = channel_subsystems[0]; (css); (css) = NULL)
/* Helper functions to build lists for the slow path. */
void css_schedule_eval(struct subchannel_id schid);
void css_schedule_eval_all(void);
void css_schedule_eval_cond(enum css_eval_cond, unsigned long delay);
int css_complete_work(void);
int sch_is_pseudo_sch(struct subchannel *);
struct schib;
int css_sch_is_valid(struct schib *);
extern struct workqueue_struct *cio_work_q;
void css_wait_for_slow_path(void);
void css_sched_sch_todo(struct subchannel *sch, enum sch_todo todo);
#endif
Annotation
- Immediate include surface: `linux/mutex.h`, `linux/wait.h`, `linux/workqueue.h`, `linux/device.h`, `linux/types.h`, `asm/cio.h`, `asm/chpid.h`, `asm/schid.h`.
- Detected declarations: `struct path_state`, `struct extended_cssid`, `struct pgid`, `struct subchannel`, `struct chp_link`, `struct css_driver`, `struct channel_subsystem`, `struct schib`, `enum css_eval_cond`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: pattern 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.