include/linux/ipmi.h
Source file repositories/reference/linux-study-clean/include/linux/ipmi.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ipmi.h- Extension
.h- Size
- 11841 bytes
- Lines
- 358
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
uapi/linux/ipmi.hlinux/list.hlinux/proc_fs.hlinux/acpi.h
Detected Declarations
struct modulestruct devicestruct ipmi_userstruct ipmi_recv_msgstruct ipmi_user_hndlstruct ipmi_smi_watcherstruct ipmi_smi_infoenum ipmi_addr_src
Annotated Snippet
struct ipmi_recv_msg {
struct list_head link;
/*
* The type of message as defined in the "Receive Types"
* defines above.
*/
int recv_type;
struct ipmi_user *user;
struct ipmi_addr addr;
long msgid;
struct kernel_ipmi_msg msg;
/*
* The user_msg_data is the data supplied when a message was
* sent, if this is a response to a sent message. If this is
* not a response to a sent message, then user_msg_data will
* be NULL. If the user above is NULL, then this will be the
* intf.
*/
void *user_msg_data;
/*
* Call this when done with the message. It will presumably free
* the message and do any other necessary cleanup.
*/
void (*done)(struct ipmi_recv_msg *msg);
/*
* Place-holder for the data, don't make any assumptions about
* the size or existence of this, since it may change.
*/
unsigned char msg_data[IPMI_MAX_MSG_LENGTH];
};
#define INIT_IPMI_RECV_MSG(done_handler) \
{ \
.done = done_handler \
}
/* Allocate and free the receive message. */
void ipmi_free_recv_msg(struct ipmi_recv_msg *msg);
struct ipmi_user_hndl {
/*
* Routine type to call when a message needs to be routed to
* the upper layer. This will be called with some locks held,
* the only IPMI routines that can be called are ipmi_request
* and the alloc/free operations. The handler_data is the
* variable supplied when the receive handler was registered.
*/
void (*ipmi_recv_hndl)(struct ipmi_recv_msg *msg,
void *user_msg_data);
/*
* Called when the interface detects a watchdog pre-timeout. If
* this is NULL, it will be ignored for the user. Note that you
* can't do any IPMI calls from here, it's called with locks held.
*/
void (*ipmi_watchdog_pretimeout)(void *handler_data);
/*
* If not NULL, called at panic time after the interface has
* been set up to handle run to completion.
*/
void (*ipmi_panic_handler)(void *handler_data);
/*
* Called when the interface has been removed. After this returns
* the user handle will be invalid. The interface may or may
* not be usable when this is called, but it will return errors
* if it is not usable.
*/
void (*shutdown)(void *handler_data);
};
/* Create a new user of the IPMI layer on the given interface number. */
int ipmi_create_user(unsigned int if_num,
const struct ipmi_user_hndl *handler,
void *handler_data,
struct ipmi_user **user);
/*
* Destroy the given user of the IPMI layer. Note that after this
* function returns, the system is guaranteed to not call any
* callbacks for the user. Thus as long as you destroy all the users
* before you unload a module, you will be safe. And if you destroy
* the users before you destroy the callback structures, it should be
* safe, too.
Annotation
- Immediate include surface: `uapi/linux/ipmi.h`, `linux/list.h`, `linux/proc_fs.h`, `linux/acpi.h`.
- Detected declarations: `struct module`, `struct device`, `struct ipmi_user`, `struct ipmi_recv_msg`, `struct ipmi_user_hndl`, `struct ipmi_smi_watcher`, `struct ipmi_smi_info`, `enum ipmi_addr_src`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.