include/linux/kexec_handover.h
Source file repositories/reference/linux-study-clean/include/linux/kexec_handover.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/kexec_handover.h- Extension
.h- Size
- 3022 bytes
- Lines
- 122
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/err.hlinux/errno.hlinux/types.h
Detected Declarations
struct kho_scratchstruct kho_vmallocstruct foliostruct pagefunction kho_is_enabledfunction is_kho_bootfunction kho_preserve_foliofunction kho_unpreserve_foliofunction kho_unpreserve_pagesfunction kho_unpreserve_vmallocfunction kho_unpreserve_freefunction kho_add_subtreefunction kho_remove_subtreefunction kho_memory_init
Annotated Snippet
struct kho_scratch {
phys_addr_t addr;
phys_addr_t size;
};
struct kho_vmalloc;
struct folio;
struct page;
#ifdef CONFIG_KEXEC_HANDOVER
bool kho_is_enabled(void);
bool is_kho_boot(void);
int kho_preserve_folio(struct folio *folio);
void kho_unpreserve_folio(struct folio *folio);
int kho_preserve_pages(struct page *page, unsigned long nr_pages);
void kho_unpreserve_pages(struct page *page, unsigned long nr_pages);
int kho_preserve_vmalloc(void *ptr, struct kho_vmalloc *preservation);
void kho_unpreserve_vmalloc(struct kho_vmalloc *preservation);
void *kho_alloc_preserve(size_t size);
void kho_unpreserve_free(void *mem);
void kho_restore_free(void *mem);
struct folio *kho_restore_folio(phys_addr_t phys);
struct page *kho_restore_pages(phys_addr_t phys, unsigned long nr_pages);
void *kho_restore_vmalloc(const struct kho_vmalloc *preservation);
int kho_add_subtree(const char *name, void *blob, size_t size);
void kho_remove_subtree(void *blob);
int kho_retrieve_subtree(const char *name, phys_addr_t *phys, size_t *size);
void kho_memory_init(void);
void kho_populate(phys_addr_t fdt_phys, u64 fdt_len, phys_addr_t scratch_phys,
u64 scratch_len);
#else
static inline bool kho_is_enabled(void)
{
return false;
}
static inline bool is_kho_boot(void)
{
return false;
}
static inline int kho_preserve_folio(struct folio *folio)
{
return -EOPNOTSUPP;
}
static inline void kho_unpreserve_folio(struct folio *folio) { }
static inline int kho_preserve_pages(struct page *page, unsigned int nr_pages)
{
return -EOPNOTSUPP;
}
static inline void kho_unpreserve_pages(struct page *page, unsigned int nr_pages) { }
static inline int kho_preserve_vmalloc(void *ptr,
struct kho_vmalloc *preservation)
{
return -EOPNOTSUPP;
}
static inline void kho_unpreserve_vmalloc(struct kho_vmalloc *preservation) { }
static inline void *kho_alloc_preserve(size_t size)
{
return ERR_PTR(-EOPNOTSUPP);
}
static inline void kho_unpreserve_free(void *mem) { }
static inline void kho_restore_free(void *mem) { }
static inline struct folio *kho_restore_folio(phys_addr_t phys)
{
return NULL;
}
static inline struct page *kho_restore_pages(phys_addr_t phys,
unsigned int nr_pages)
{
return NULL;
}
static inline void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
{
return NULL;
}
Annotation
- Immediate include surface: `linux/err.h`, `linux/errno.h`, `linux/types.h`.
- Detected declarations: `struct kho_scratch`, `struct kho_vmalloc`, `struct folio`, `struct page`, `function kho_is_enabled`, `function is_kho_boot`, `function kho_preserve_folio`, `function kho_unpreserve_folio`, `function kho_unpreserve_pages`, `function kho_unpreserve_vmalloc`.
- 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.