drivers/xen/events/events_internal.h
Source file repositories/reference/linux-study-clean/drivers/xen/events/events_internal.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/xen/events/events_internal.h- Extension
.h- Size
- 2530 bytes
- Lines
- 111
- Domain
- Driver Families
- Bucket
- drivers/xen
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct evtchn_loop_ctrlstruct evtchn_opsfunction xen_evtchn_max_channelsfunction xen_evtchn_port_setupfunction xen_evtchn_port_removefunction xen_evtchn_port_bind_to_cpufunction clear_evtchnfunction set_evtchnfunction test_evtchnfunction mask_evtchnfunction unmask_evtchnfunction xen_evtchn_handle_eventsfunction xen_evtchn_resume
Annotated Snippet
struct evtchn_ops {
unsigned (*max_channels)(void);
unsigned (*nr_channels)(void);
int (*setup)(evtchn_port_t port);
void (*remove)(evtchn_port_t port, unsigned int cpu);
void (*bind_to_cpu)(evtchn_port_t evtchn, unsigned int cpu,
unsigned int old_cpu);
void (*clear_pending)(evtchn_port_t port);
void (*set_pending)(evtchn_port_t port);
bool (*is_pending)(evtchn_port_t port);
void (*mask)(evtchn_port_t port);
void (*unmask)(evtchn_port_t port);
void (*handle_events)(unsigned cpu, struct evtchn_loop_ctrl *ctrl);
void (*resume)(void);
int (*percpu_init)(unsigned int cpu);
int (*percpu_deinit)(unsigned int cpu);
};
extern const struct evtchn_ops *evtchn_ops;
void handle_irq_for_port(evtchn_port_t port, struct evtchn_loop_ctrl *ctrl);
unsigned int cpu_from_evtchn(evtchn_port_t evtchn);
static inline unsigned xen_evtchn_max_channels(void)
{
return evtchn_ops->max_channels();
}
/*
* Do any ABI specific setup for a bound event channel before it can
* be unmasked and used.
*/
static inline int xen_evtchn_port_setup(evtchn_port_t evtchn)
{
if (evtchn_ops->setup)
return evtchn_ops->setup(evtchn);
return 0;
}
static inline void xen_evtchn_port_remove(evtchn_port_t evtchn,
unsigned int cpu)
{
if (evtchn_ops->remove)
evtchn_ops->remove(evtchn, cpu);
}
static inline void xen_evtchn_port_bind_to_cpu(evtchn_port_t evtchn,
unsigned int cpu,
unsigned int old_cpu)
{
evtchn_ops->bind_to_cpu(evtchn, cpu, old_cpu);
}
static inline void clear_evtchn(evtchn_port_t port)
{
evtchn_ops->clear_pending(port);
}
static inline void set_evtchn(evtchn_port_t port)
{
evtchn_ops->set_pending(port);
}
static inline bool test_evtchn(evtchn_port_t port)
{
return evtchn_ops->is_pending(port);
}
static inline void mask_evtchn(evtchn_port_t port)
{
return evtchn_ops->mask(port);
}
static inline void unmask_evtchn(evtchn_port_t port)
{
return evtchn_ops->unmask(port);
}
static inline void xen_evtchn_handle_events(unsigned cpu,
struct evtchn_loop_ctrl *ctrl)
{
return evtchn_ops->handle_events(cpu, ctrl);
}
static inline void xen_evtchn_resume(void)
Annotation
- Detected declarations: `struct evtchn_loop_ctrl`, `struct evtchn_ops`, `function xen_evtchn_max_channels`, `function xen_evtchn_port_setup`, `function xen_evtchn_port_remove`, `function xen_evtchn_port_bind_to_cpu`, `function clear_evtchn`, `function set_evtchn`, `function test_evtchn`, `function mask_evtchn`.
- Atlas domain: Driver Families / drivers/xen.
- 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.