summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-25 17:33:22 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-25 17:33:22 -1000
commitb3593aba315322d875f295eef8b1a19e24658ba6 (patch)
tree3294c7ad1453b0fe3570f936f6eb0dc834fe82e6 /include
parent394023fbe34fccec5d4db2576169d21e14c8d3d4 (diff)
parent833d2b79ed9520e77c5d83eb11644e5239b2c5bb (diff)
Merge tag 'kexec-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
Pull kexec updates from Mike Rapoport: - Fix probe error codes and error propagation: - make architecture functions that probe loaded image consistenly return -ENOEXEC when they do not recognize the image format - make kexec_image_probe_default() distinguish image format mismatches (-ENOEXEC) from real errors (e.g. -ENOMEM), propagating real errors immediately and only continuing to the next loader on -ENOEXEC - Make sure the next kernel does not land on hardware-poisoned pages - Remove unused arch_kexec_locate_mem_hole hook * tag 'kexec-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux: kexec_file: remove unused arch_kexec_locate_mem_hole hook kexec: fix error propagation in kexec_image_probe_default() kexec: return -ENOEXEC from image probe functions on mismatch kexec: keep the next kernel off hardware-poisoned pages kexec_file: stop the top-down search before it underflows
Diffstat (limited to 'include')
-rw-r--r--include/linux/kexec.h15
-rw-r--r--include/linux/mm.h14
2 files changed, 14 insertions, 15 deletions
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index 0af8ae4fdd08..e5f1cfc11fef 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -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
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 6882ad400935..691cef038d1e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -5234,6 +5234,8 @@ extern const struct attribute_group memory_failure_attr_group;
extern void memory_failure_queue(unsigned long pfn, int flags);
void num_poisoned_pages_inc(unsigned long pfn);
void num_poisoned_pages_sub(unsigned long pfn, long i);
+phys_addr_t range_first_hwpoison(phys_addr_t start, unsigned long size);
+phys_addr_t range_last_hwpoison(phys_addr_t start, unsigned long size);
#else
static inline void memory_failure_queue(unsigned long pfn, int flags)
{
@@ -5246,6 +5248,18 @@ static inline void num_poisoned_pages_inc(unsigned long pfn)
static inline void num_poisoned_pages_sub(unsigned long pfn, long i)
{
}
+
+static inline phys_addr_t range_first_hwpoison(phys_addr_t start,
+ unsigned long size)
+{
+ return PHYS_ADDR_MAX;
+}
+
+static inline phys_addr_t range_last_hwpoison(phys_addr_t start,
+ unsigned long size)
+{
+ return PHYS_ADDR_MAX;
+}
#endif
#if defined(CONFIG_MEMORY_FAILURE) && defined(CONFIG_MEMORY_HOTPLUG)