include/linux/ipack.h
Source file repositories/reference/linux-study-clean/include/linux/ipack.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ipack.h- Extension
.h- Size
- 9188 bytes
- Lines
- 294
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mod_devicetable.hlinux/device.hlinux/interrupt.h
Detected Declarations
struct ipack_bus_opsstruct ipack_driverstruct ipack_regionstruct ipack_devicestruct ipack_driver_opsstruct ipack_driverstruct ipack_bus_opsstruct ipack_bus_deviceenum ipack_spacefunction arrayfunction ipack_put_carrier
Annotated Snippet
struct device_driver driver;
const struct ipack_device_id *id_table;
const struct ipack_driver_ops *ops;
};
/**
* struct ipack_bus_ops - available operations on a bridge module
*
* @map_space: map IP address space
* @unmap_space: unmap IP address space
* @request_irq: request IRQ
* @free_irq: free IRQ
* @get_clockrate: Returns the clockrate the carrier is currently
* communicating with the device at.
* @set_clockrate: Sets the clock-rate for carrier / module communication.
* Should return -EINVAL if the requested speed is not supported.
* @get_error: Returns the error state for the slot the device is attached
* to.
* @get_timeout: Returns 1 if the communication with the device has
* previously timed out.
* @reset_timeout: Resets the state returned by get_timeout.
*/
struct ipack_bus_ops {
int (*request_irq) (struct ipack_device *dev,
irqreturn_t (*handler)(void *), void *arg);
int (*free_irq) (struct ipack_device *dev);
int (*get_clockrate) (struct ipack_device *dev);
int (*set_clockrate) (struct ipack_device *dev, int mherz);
int (*get_error) (struct ipack_device *dev);
int (*get_timeout) (struct ipack_device *dev);
int (*reset_timeout) (struct ipack_device *dev);
};
/**
* struct ipack_bus_device - IPack bus representation
*
* @dev: pointer to carrier device
* @slots: number of slots available
* @bus_nr: ipack bus number
* @ops: bus operations for the mezzanine drivers
*/
struct ipack_bus_device {
struct module *owner;
struct device *parent;
int slots;
int bus_nr;
const struct ipack_bus_ops *ops;
};
/**
* ipack_bus_register -- register a new ipack bus
*
* @parent: pointer to the parent device, if any.
* @slots: number of slots available in the bus device.
* @ops: bus operations for the mezzanine drivers.
*
* The carrier board device should call this function to register itself as
* available bus device in ipack.
*
* Return: %NULL on error or &struct ipack_bus_device on success
*/
struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
const struct ipack_bus_ops *ops,
struct module *owner);
/**
* ipack_bus_unregister -- unregister an ipack bus
*
* Return: %0
*/
int ipack_bus_unregister(struct ipack_bus_device *bus);
/**
* ipack_driver_register -- Register a new ipack device driver
*
* Called by a ipack driver to register itself as a driver
* that can manage ipack devices.
*
* Return: zero on success or error code on failure.
*/
int ipack_driver_register(struct ipack_driver *edrv, struct module *owner,
const char *name);
void ipack_driver_unregister(struct ipack_driver *edrv);
/**
* ipack_device_init -- initialize an IPack device
* @dev: the new device to initialize.
*
* Initialize a new IPack device ("module" in IndustryPack jargon). The call
* is done by the carrier driver. The carrier should populate the fields
Annotation
- Immediate include surface: `linux/mod_devicetable.h`, `linux/device.h`, `linux/interrupt.h`.
- Detected declarations: `struct ipack_bus_ops`, `struct ipack_driver`, `struct ipack_region`, `struct ipack_device`, `struct ipack_driver_ops`, `struct ipack_driver`, `struct ipack_bus_ops`, `struct ipack_bus_device`, `enum ipack_space`, `function array`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.