include/acpi/ghes.h
Source file repositories/reference/linux-study-clean/include/acpi/ghes.h
File Facts
- System
- Linux kernel
- Corpus path
include/acpi/ghes.h- Extension
.h- Size
- 4050 bytes
- Lines
- 147
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/apei.hacpi/hed.h
Detected Declarations
struct ghesstruct ghes_estatus_nodestruct ghes_estatus_cachestruct notifier_blockfunction ghes_estatus_pool_region_freefunction acpi_hest_get_versionfunction acpi_hest_get_error_lengthfunction acpi_hest_get_sizefunction acpi_hest_get_record_sizefunction ghes_notify_sea
Annotated Snippet
struct ghes {
union {
struct acpi_hest_generic *generic;
struct acpi_hest_generic_v2 *generic_v2;
};
struct acpi_hest_generic_status *estatus;
unsigned int estatus_length;
unsigned long flags;
union {
struct list_head list;
struct timer_list timer;
unsigned int irq;
};
struct device *dev;
struct list_head elist;
void __iomem *error_status_vaddr;
};
struct ghes_estatus_node {
struct llist_node llnode;
struct acpi_hest_generic *generic;
struct ghes *ghes;
};
struct ghes_estatus_cache {
u32 estatus_len;
atomic_t count;
struct acpi_hest_generic *generic;
unsigned long long time_in;
struct rcu_head rcu;
};
enum {
GHES_SEV_NO = 0x0,
GHES_SEV_CORRECTED = 0x1,
GHES_SEV_RECOVERABLE = 0x2,
GHES_SEV_PANIC = 0x3,
};
#ifdef CONFIG_ACPI_APEI_GHES
/**
* ghes_register_vendor_record_notifier - register a notifier for vendor
* records that the kernel would otherwise ignore.
* @nb: pointer to the notifier_block structure of the event handler.
*
* return 0 : SUCCESS, non-zero : FAIL
*/
int ghes_register_vendor_record_notifier(struct notifier_block *nb);
/**
* ghes_unregister_vendor_record_notifier - unregister the previously
* registered vendor record notifier.
* @nb: pointer to the notifier_block structure of the vendor record handler.
*/
void ghes_unregister_vendor_record_notifier(struct notifier_block *nb);
/**
* devm_ghes_register_vendor_record_notifier - device-managed vendor
* record notifier registration.
* @dev: device that owns the notifier lifetime
* @nb: pointer to the notifier_block structure of the vendor record handler
*
* Return: 0 on success, negative errno on failure.
*/
int devm_ghes_register_vendor_record_notifier(struct device *dev,
struct notifier_block *nb);
struct list_head *ghes_get_devices(void);
void ghes_estatus_pool_region_free(unsigned long addr, u32 size);
#else
static inline struct list_head *ghes_get_devices(void) { return NULL; }
static inline void ghes_estatus_pool_region_free(unsigned long addr, u32 size) { return; }
#endif
int ghes_estatus_pool_init(unsigned int num_ghes);
static inline int acpi_hest_get_version(struct acpi_hest_generic_data *gdata)
{
return gdata->revision >> 8;
}
static inline void *acpi_hest_get_payload(struct acpi_hest_generic_data *gdata)
{
if (acpi_hest_get_version(gdata) >= 3)
return (void *)(((struct acpi_hest_generic_data_v300 *)(gdata)) + 1);
return gdata + 1;
}
Annotation
- Immediate include surface: `acpi/apei.h`, `acpi/hed.h`.
- Detected declarations: `struct ghes`, `struct ghes_estatus_node`, `struct ghes_estatus_cache`, `struct notifier_block`, `function ghes_estatus_pool_region_free`, `function acpi_hest_get_version`, `function acpi_hest_get_error_length`, `function acpi_hest_get_size`, `function acpi_hest_get_record_size`, `function ghes_notify_sea`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.