memblock: always include KHO headers

In a coming commit, memblock will start using kho_scratch_overlap()
without a compile guard. The compile guard for the function is in
kexec_handover.h and provides a stub when CONFIG_KEXEC_HANDOVER is
disabled.

Since in memblock the call will exist unconditionally, always include
the KHO headers.

Including these headers unconditionally breaks memblock test
compilation. Add stubs to fix that.

Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Link: https://patch.msgid.link/20260801084833.1897543-20-pratyush@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This commit is contained in:
Pratyush Yadav (Google) 2026-08-01 10:48:28 +02:00 committed by Mike Rapoport (Microsoft)
parent 14773e2aa4
commit 2776661130
4 changed files with 28 additions and 2 deletions

View File

@ -19,11 +19,9 @@
#include <linux/mutex.h>
#include <linux/string_helpers.h>
#ifdef CONFIG_KEXEC_HANDOVER
#include <linux/libfdt.h>
#include <linux/kexec_handover.h>
#include <linux/kho/abi/memblock.h>
#endif /* CONFIG_KEXEC_HANDOVER */
#include <asm/sections.h>
#include <linux/io.h>

View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef LINUX_KEXEC_HANDOVER_H
#define LINUX_KEXEC_HANDOVER_H
/*
* Header stub to avoid test build breakage; we don't need to actually implement
* any KHO functions as they are not used in the tests.
*/
#endif /* LINUX_KEXEC_HANDOVER_H */

View File

@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_KHO_ABI_MEMBLOCK_H
#define _LINUX_KHO_ABI_MEMBLOCK_H
/*
* Header stub to avoid test build breakage; we don't need to actually define
* any ABI as they are not used in the tests.
*/
#endif /* _LINUX_KHO_ABI_MEMBLOCK_H */

View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _INCLUDE_LIBFDT_H_
#define _INCLUDE_LIBFDT_H_
/*
* Header stub to avoid test build breakage; we don't need to actually implement
* any FDT functions as they are not used in the tests.
*/
#endif /* _INCLUDE_LIBFDT_H_ */