drivers/misc/ibmasm/i2o.h
Source file repositories/reference/linux-study-clean/drivers/misc/ibmasm/i2o.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/ibmasm/i2o.h- Extension
.h- Size
- 1324 bytes
- Lines
- 64
- Domain
- Driver Families
- Bucket
- drivers/misc
- 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 i2o_headerstruct i2o_messagefunction outgoing_message_sizefunction incoming_data_size
Annotated Snippet
struct i2o_header {
u8 version;
u8 message_flags;
u16 message_size;
u8 target;
u8 initiator_and_target;
u8 initiator;
u8 function;
u32 initiator_context;
};
#pragma pack()
#define I2O_HEADER_TEMPLATE \
{ .version = 0x01, \
.message_flags = 0x00, \
.function = 0xFF, \
.initiator = 0x00, \
.initiator_and_target = 0x40, \
.target = 0x00, \
.initiator_context = 0x0 }
#define I2O_MESSAGE_SIZE 0x1000
#define I2O_COMMAND_SIZE (I2O_MESSAGE_SIZE - sizeof(struct i2o_header))
#pragma pack(1)
struct i2o_message {
struct i2o_header header;
void *data;
};
#pragma pack()
static inline unsigned short outgoing_message_size(unsigned int data_size)
{
unsigned int size;
unsigned short i2o_size;
if (data_size > I2O_COMMAND_SIZE)
data_size = I2O_COMMAND_SIZE;
size = sizeof(struct i2o_header) + data_size;
i2o_size = size / sizeof(u32);
if (size % sizeof(u32))
i2o_size++;
return i2o_size;
}
static inline u32 incoming_data_size(struct i2o_message *i2o_message)
{
return (sizeof(u32) * i2o_message->header.message_size);
}
Annotation
- Detected declarations: `struct i2o_header`, `struct i2o_message`, `function outgoing_message_size`, `function incoming_data_size`.
- Atlas domain: Driver Families / drivers/misc.
- 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.