[PATCH 4/6] kho: use unsigned long for kho_preserve_pages() and co when KHO=n

From: Pratyush Yadav

Date: Fri Nov 27 2026 - 07:26:09 EST


From: "Pratyush Yadav (Google)" <pratyush@xxxxxxxxxx>

Commit 840fe43d371f ("kho: use unsigned long for nr_pages") changed
nr_pages to unsigned long, but it forgot to update the KEXEC_HANDOVER=n
stubs.

Fixes: 840fe43d371f ("kho: use unsigned long for nr_pages")
Signed-off-by: Pratyush Yadav (Google) <pratyush@xxxxxxxxxx>

---

I don't think this is stable material since there is no problem in
practice.
---
include/linux/kexec_handover.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/kexec_handover.h b/include/linux/kexec_handover.h
index ef2b188c8ed0..a20456b8da20 100644
--- a/include/linux/kexec_handover.h
+++ b/include/linux/kexec_handover.h
@@ -66,12 +66,12 @@ static inline int kho_preserve_folio(struct folio *folio)

static inline void kho_unpreserve_folio(struct folio *folio) { }

-static inline int kho_preserve_pages(struct page *page, unsigned int nr_pages)
+static inline int kho_preserve_pages(struct page *page, unsigned long nr_pages)
{
return -EOPNOTSUPP;
}

-static inline void kho_unpreserve_pages(struct page *page, unsigned int nr_pages) { }
+static inline void kho_unpreserve_pages(struct page *page, unsigned long nr_pages) { }

static inline int kho_preserve_vmalloc(void *ptr,
struct kho_vmalloc *preservation)
@@ -95,7 +95,7 @@ static inline struct folio *kho_restore_folio(phys_addr_t phys)
}

static inline struct page *kho_restore_pages(phys_addr_t phys,
- unsigned int nr_pages)
+ unsigned long nr_pages)
{
return NULL;
}
--
2.56.1.839.g22a8290db9-goog