diff options
| author | Pratyush Yadav (Google) <pratyush@kernel.org> | 2026-09-22 06:13:15 +0200 |
|---|---|---|
| committer | Mike Rapoport <rppt@kernel.org> | 2026-10-09 18:13:27 +0200 |
| commit | 8ebd2eb87f50b7bdd5a87929da320514ca91726f (patch) | |
| tree | e60ca4ae6acecb40190cc9a9f6b3ae617b382960 /include | |
| parent | 48edec475144a9acb9515d37475bda4752912727 (diff) | |
| download | linux-next-8ebd2eb87f50b7bdd5a87929da320514ca91726f.tar.gz linux-next-8ebd2eb87f50b7bdd5a87929da320514ca91726f.zip | |
kho: rename KHO scratch to KHO bootmem
The term "KHO scratch" is vague and overloaded.
For one, it does not accurately describe what the memory is for. From
KHO's perspective, it is memory passed by the previous kernel that is
guaranteed to have no allocations and hence it is safe to allocate from.
For another, the term is overloaded. KHO also knows to discover other
ranges of memory that don't have any preservations and are safe to
allocate from. This is done by kho_extend_scratch(). These areas, while
called "scratch", are completely different from the chunk of memory
passed by the previous kernel for early boot allocations.
Rename "KHO scratch" to "KHO boot memory", or "KHO bootmem" in short.
Update all function names, variable names, comments, and documentation
to use this.
Call the discovered areas "noprsrv", matching what memblock would see
them as. Rename kho_extend_scratch() to reflect this.
This patch largely has no functional changes. The only functional
changes are renames of debugfs files from "scratch_phys" and
"scratch_len" to "bootmem_phys" and "bootmem_len" respectively.
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Link: https://patch.msgid.link/20260922041321.233986-4-pratyush@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/kexec_handover.h | 2 | ||||
| -rw-r--r-- | include/linux/kexec.h | 2 | ||||
| -rw-r--r-- | include/linux/kexec_handover.h | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/include/asm-generic/kexec_handover.h b/include/asm-generic/kexec_handover.h index 50839fb5ee8e..cf73d9b34c3c 100644 --- a/include/asm-generic/kexec_handover.h +++ b/include/asm-generic/kexec_handover.h @@ -4,7 +4,7 @@ #include <linux/types.h> -struct kho_scratch { +struct kho_bootmem { phys_addr_t addr; phys_addr_t size; }; diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 0af8ae4fdd08..e8d92c7e8c30 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -418,7 +418,7 @@ struct kimage { #endif struct { - struct kexec_segment *scratch; + struct kexec_segment *bootmem; phys_addr_t fdt; } kho; diff --git a/include/linux/kexec_handover.h b/include/linux/kexec_handover.h index 46de86dc343e..ef2b188c8ed0 100644 --- a/include/linux/kexec_handover.h +++ b/include/linux/kexec_handover.h @@ -36,15 +36,15 @@ int kho_retrieve_subtree(const char *name, phys_addr_t *phys, size_t *size); void kho_memory_init(void); void kho_memory_init_early(void); -void kho_populate(phys_addr_t fdt_phys, u64 fdt_len, phys_addr_t scratch_phys, - u64 scratch_len); +void kho_populate(phys_addr_t fdt_phys, u64 fdt_len, phys_addr_t bootmem_phys, + u64 bootmem_len); -bool kho_scratch_overlap(phys_addr_t phys, size_t size); +bool kho_bootmem_overlap(phys_addr_t phys, size_t size); -static inline enum migratetype kho_scratch_migratetype(unsigned long pfn, +static inline enum migratetype kho_bootmem_migratetype(unsigned long pfn, enum migratetype mt) { - if (kho_scratch_overlap(PFN_PHYS(pfn), pageblock_nr_pages << PAGE_SHIFT)) + if (kho_bootmem_overlap(PFN_PHYS(pfn), pageblock_nr_pages << PAGE_SHIFT)) return MIGRATE_CMA; return mt; } @@ -123,16 +123,16 @@ static inline void kho_memory_init(void) { } static inline void kho_memory_init_early(void) { } static inline void kho_populate(phys_addr_t fdt_phys, u64 fdt_len, - phys_addr_t scratch_phys, u64 scratch_len) + phys_addr_t bootmem_phys, u64 bootmem_len) { } -static inline bool kho_scratch_overlap(phys_addr_t phys, size_t size) +static inline bool kho_bootmem_overlap(phys_addr_t phys, size_t size) { return false; } -static inline enum migratetype kho_scratch_migratetype(unsigned long pfn, +static inline enum migratetype kho_bootmem_migratetype(unsigned long pfn, enum migratetype mt) { return mt; |
