drivers/pci/hotplug/cpci_hotplug.h
Source file repositories/reference/linux-study-clean/drivers/pci/hotplug/cpci_hotplug.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pci/hotplug/cpci_hotplug.h- Extension
.h- Size
- 2514 bytes
- Lines
- 100
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: implementation source
- Status
- source implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/pci.hlinux/pci_hotplug.h
Detected Declarations
struct slotstruct cpci_hp_controller_opsstruct cpci_hp_controllerfunction cpci_hotplug_init
Annotated Snippet
struct slot {
u8 number;
unsigned int devfn;
struct pci_bus *bus;
struct pci_dev *dev;
unsigned int latch_status:1;
unsigned int adapter_status:1;
unsigned int extracting;
struct hotplug_slot hotplug_slot;
struct list_head slot_list;
};
struct cpci_hp_controller_ops {
int (*query_enum)(void);
int (*enable_irq)(void);
int (*disable_irq)(void);
int (*check_irq)(void *dev_id);
};
struct cpci_hp_controller {
unsigned int irq;
unsigned long irq_flags;
char *devname;
void *dev_id;
char *name;
struct cpci_hp_controller_ops *ops;
};
static inline const char *slot_name(struct slot *slot)
{
return hotplug_slot_name(&slot->hotplug_slot);
}
static inline struct slot *to_slot(struct hotplug_slot *hotplug_slot)
{
return container_of(hotplug_slot, struct slot, hotplug_slot);
}
int cpci_hp_register_controller(struct cpci_hp_controller *controller);
int cpci_hp_unregister_controller(struct cpci_hp_controller *controller);
int cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last);
int cpci_hp_unregister_bus(struct pci_bus *bus);
int cpci_hp_start(void);
int cpci_hp_stop(void);
/* Global variables */
extern int cpci_debug;
/*
* Internal function prototypes, these functions should not be used by
* board/chassis drivers.
*/
u8 cpci_get_attention_status(struct slot *slot);
u16 cpci_get_hs_csr(struct slot *slot);
int cpci_set_attention_status(struct slot *slot, int status);
int cpci_check_and_clear_ins(struct slot *slot);
int cpci_check_ext(struct slot *slot);
int cpci_clear_ext(struct slot *slot);
int cpci_led_on(struct slot *slot);
int cpci_led_off(struct slot *slot);
int cpci_configure_slot(struct slot *slot);
int cpci_unconfigure_slot(struct slot *slot);
#ifdef CONFIG_HOTPLUG_PCI_CPCI
int cpci_hotplug_init(int debug);
#else
static inline int cpci_hotplug_init(int debug) { return 0; }
#endif
#endif /* _CPCI_HOTPLUG_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/pci.h`, `linux/pci_hotplug.h`.
- Detected declarations: `struct slot`, `struct cpci_hp_controller_ops`, `struct cpci_hp_controller`, `function cpci_hotplug_init`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- 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.