include/linux/crash_reserve.h
Source file repositories/reference/linux-study-clean/include/linux/crash_reserve.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/crash_reserve.h- Extension
.h- Size
- 1847 bytes
- Lines
- 67
- 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/linkage.hlinux/elfcore.hlinux/elf.hasm/crash_reserve.h
Detected Declarations
function arch_add_crash_res_to_iomemfunction reserve_crashkernel_generic
Annotated Snippet
#ifndef LINUX_CRASH_RESERVE_H
#define LINUX_CRASH_RESERVE_H
#include <linux/linkage.h>
#include <linux/elfcore.h>
#include <linux/elf.h>
#ifdef CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
#include <asm/crash_reserve.h>
#endif
/* Location of a reserved region to hold the crash kernel.
*/
extern struct resource crashk_res;
extern struct resource crashk_low_res;
extern struct range crashk_cma_ranges[];
#if defined(CONFIG_CMA) && defined(CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION)
#define CRASHKERNEL_CMA
#define CRASHKERNEL_CMA_RANGES_MAX 4
extern int crashk_cma_cnt;
#else
#define crashk_cma_cnt 0
#define CRASHKERNEL_CMA_RANGES_MAX 0
#endif
int __init parse_crashkernel(char *cmdline, unsigned long long system_ram,
unsigned long long *crash_size, unsigned long long *crash_base,
unsigned long long *low_size, unsigned long long *cma_size,
bool *high);
void __init reserve_crashkernel_cma(unsigned long long cma_size);
#ifdef CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
#ifndef arch_add_crash_res_to_iomem
static inline bool arch_add_crash_res_to_iomem(void)
{
return true;
}
#endif
#ifndef DEFAULT_CRASH_KERNEL_LOW_SIZE
#define DEFAULT_CRASH_KERNEL_LOW_SIZE (128UL << 20)
#endif
#ifndef CRASH_ALIGN
#define CRASH_ALIGN SZ_2M
#endif
#ifndef CRASH_ADDR_LOW_MAX
#define CRASH_ADDR_LOW_MAX SZ_4G
#endif
#ifndef CRASH_ADDR_HIGH_MAX
#define CRASH_ADDR_HIGH_MAX memblock_end_of_DRAM()
#endif
void __init reserve_crashkernel_generic(unsigned long long crash_size,
unsigned long long crash_base,
unsigned long long crash_low_size,
bool high);
#else
static inline void __init reserve_crashkernel_generic(
unsigned long long crash_size,
unsigned long long crash_base,
unsigned long long crash_low_size,
bool high)
{}
#endif
#endif /* LINUX_CRASH_RESERVE_H */
Annotation
- Immediate include surface: `linux/linkage.h`, `linux/elfcore.h`, `linux/elf.h`, `asm/crash_reserve.h`.
- Detected declarations: `function arch_add_crash_res_to_iomem`, `function reserve_crashkernel_generic`.
- 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.