mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
kexec_file: remove unused arch_kexec_locate_mem_hole hook
No architecture provides an implementation of arch_kexec_locate_mem_hole(). Use kexec_locate_mem_hole() directly and remove the unused fallback wrapper from the kexec header. This simplifies the kexec memory allocation path without changing its behavior. No functional changes intended. The arch hook was introduced by commitf891f19736("kexec_file: Allow archs to handle special regions while locating memory hole"), and its last user was removed by commit6e5250eaa6("powerpc/crash: use generic APIs to locate memory hole for kdump"). Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Mike Rapoport <rppt@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Pasha Tatashin <pasha.tatashin@soleen.com> Cc: Paul Walmsley <pjw@kernel.org> Cc: Pratyush Yadav <pratyush@kernel.org> Cc: linux-riscv@lists.infradead.org Cc: kexec@lists.infradead.org Acked-by: Baoquan He <baoquan.he@linux.dev> Reviewed-by: Mukesh Pilaniya <mpilaniy@redhat.com> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com> Link: https://patch.msgid.link/20260905145835.501635-1-sourabhjain@linux.ibm.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This commit is contained in:
parent
c7add4fee3
commit
06ce2863e7
|
|
@ -91,7 +91,7 @@ static int elf_find_pbase(struct kimage *image, unsigned long kernel_len,
|
|||
kbuf.memsz = ALIGN(kernel_len, PAGE_SIZE);
|
||||
kbuf.cma = NULL;
|
||||
kbuf.top_down = false;
|
||||
ret = arch_kexec_locate_mem_hole(&kbuf);
|
||||
ret = kexec_locate_mem_hole(&kbuf);
|
||||
if (!ret) {
|
||||
*old_pbase = lowest_paddr;
|
||||
*new_pbase = kbuf.mem;
|
||||
|
|
|
|||
|
|
@ -259,21 +259,6 @@ int kexec_kernel_verify_pe_sig(const char *kernel, unsigned long kernel_len);
|
|||
extern int kexec_add_buffer(struct kexec_buf *kbuf);
|
||||
int kexec_locate_mem_hole(struct kexec_buf *kbuf);
|
||||
|
||||
#ifndef arch_kexec_locate_mem_hole
|
||||
/**
|
||||
* arch_kexec_locate_mem_hole - Find free memory to place the segments.
|
||||
* @kbuf: Parameters for the memory search.
|
||||
*
|
||||
* On success, kbuf->mem will have the start address of the memory region found.
|
||||
*
|
||||
* Return: 0 on success, negative errno on error.
|
||||
*/
|
||||
static inline int arch_kexec_locate_mem_hole(struct kexec_buf *kbuf)
|
||||
{
|
||||
return kexec_locate_mem_hole(kbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef arch_kexec_apply_relocations_add
|
||||
/*
|
||||
* arch_kexec_apply_relocations_add - apply relocations of type RELA
|
||||
|
|
|
|||
|
|
@ -802,7 +802,7 @@ int kexec_add_buffer(struct kexec_buf *kbuf)
|
|||
kbuf->cma = NULL;
|
||||
|
||||
/* Walk the RAM ranges and allocate a suitable range for the buffer */
|
||||
ret = arch_kexec_locate_mem_hole(kbuf);
|
||||
ret = kexec_locate_mem_hole(kbuf);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user