include/linux/net/intel/libie/fwlog.h
Source file repositories/reference/linux-study-clean/include/linux/net/intel/libie/fwlog.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/net/intel/libie/fwlog.h- Extension
.h- Size
- 2990 bytes
- Lines
- 98
- 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
linux/net/intel/libie/adminq.h
Detected Declarations
struct libie_fwlog_module_entrystruct libie_fwlog_cfgstruct libie_fwlog_datastruct libie_fwlog_ringstruct libie_fwlogenum libie_fwlog_levelfunction libie_fwlog_initfunction libie_fwlog_deinit
Annotated Snippet
struct libie_fwlog_module_entry {
/* module ID for the corresponding firmware logging event */
u16 module_id;
/* verbosity level for the module_id */
u8 log_level;
};
struct libie_fwlog_cfg {
/* list of modules for configuring log level */
struct libie_fwlog_module_entry module_entries[LIBIE_AQC_FW_LOG_ID_MAX];
/* options used to configure firmware logging */
u16 options;
#define LIBIE_FWLOG_OPTION_ARQ_ENA BIT(0)
#define LIBIE_FWLOG_OPTION_UART_ENA BIT(1)
/* set before calling libie_fwlog_init() so the PF registers for
* firmware logging on initialization
*/
#define LIBIE_FWLOG_OPTION_REGISTER_ON_INIT BIT(2)
/* set in the libie_aq_fwlog_get() response if the PF is registered for
* FW logging events over ARQ
*/
#define LIBIE_FWLOG_OPTION_IS_REGISTERED BIT(3)
/* minimum number of log events sent per Admin Receive Queue event */
u16 log_resolution;
};
struct libie_fwlog_data {
u16 data_size;
u8 *data;
};
struct libie_fwlog_ring {
struct libie_fwlog_data *rings;
u16 index;
u16 size;
u16 head;
u16 tail;
};
#define LIBIE_FWLOG_RING_SIZE_INDEX_DFLT 3
#define LIBIE_FWLOG_RING_SIZE_DFLT 256
#define LIBIE_FWLOG_RING_SIZE_MAX 512
struct libie_fwlog {
struct libie_fwlog_cfg cfg;
bool supported; /* does hardware support FW logging? */
struct libie_fwlog_ring ring;
struct dentry *debugfs;
/* keep track of all the dentrys for FW log modules */
struct dentry **debugfs_modules;
struct_group_tagged(libie_fwlog_api, api,
struct pci_dev *pdev;
int (*send_cmd)(void *, struct libie_aq_desc *, void *, u16);
void *priv;
struct dentry *debugfs_root;
);
};
#if IS_ENABLED(CONFIG_LIBIE_FWLOG)
int libie_fwlog_init(struct libie_fwlog *fwlog, struct libie_fwlog_api *api);
void libie_fwlog_deinit(struct libie_fwlog *fwlog);
void libie_fwlog_reregister(struct libie_fwlog *fwlog);
void libie_get_fwlog_data(struct libie_fwlog *fwlog, u8 *buf, u16 len);
#else
static inline int libie_fwlog_init(struct libie_fwlog *fwlog,
struct libie_fwlog_api *api)
{
return -EOPNOTSUPP;
}
static inline void libie_fwlog_deinit(struct libie_fwlog *fwlog) { }
static inline void libie_fwlog_reregister(struct libie_fwlog *fwlog) { }
static inline void libie_get_fwlog_data(struct libie_fwlog *fwlog, u8 *buf,
u16 len) { }
#endif /* CONFIG_LIBIE_FWLOG */
#endif /* _LIBIE_FWLOG_H_ */
Annotation
- Immediate include surface: `linux/net/intel/libie/adminq.h`.
- Detected declarations: `struct libie_fwlog_module_entry`, `struct libie_fwlog_cfg`, `struct libie_fwlog_data`, `struct libie_fwlog_ring`, `struct libie_fwlog`, `enum libie_fwlog_level`, `function libie_fwlog_init`, `function libie_fwlog_deinit`.
- 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.