From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7B213D9678 for ; Sat, 1 Aug 2026 08:49:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785574184; cv=none; b=pksUEPZwbATUnxw4eMAFxXvG9hlPyYKJSDkmH3SYRfozJjciQT5dB/uxu3YiAPvg6SdAcMNgdiyn8/gsedPinRuUf/9PDD6zGqgEBcMI69+GV5aN0LUYhfTjJkeicCwD9qDY0NOFn+4BLTe3KceM2/ZcyzP6L8dFDc2bSks2Uuk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785574184; c=relaxed/simple; bh=/lmFf/vlxKI6iAWIb79ImTC7158JYv1KrpCTwn0NPKs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qvnLK69l+4YYckLAzBPhtyckVaKWbFyqjd+e3blfrbia9NjkYzx06zS+OrPkQxauTJzjEiKJiKiGTp0v7UIG9hSEgwxdr4vUMT766vYGirGCTs+wV4orSQyJMOyglgxS4vCeA8al7x48av0gLUqiTwe/8Q4dJ/B5v6/JTRC+SKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Kt4e7q6D; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Kt4e7q6D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5867C1F00ACF; Sat, 1 Aug 2026 08:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785574180; bh=c/vB3WD/7Dj176UGptU16rqTkNJk3eC17XvdFm9X+ws=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Kt4e7q6DHaIsNzhM8Hw4l1ztlRsErtKU4viX9Gl/BNomAKQpvGAAA9c1FE0iHWYQj nrVNtyiE5aY63+cESIDyPXCrFy7e2q74mPOoylQJMu4gGxMWF2kr5NzUI1BDn65pn8 jbJOTl9xHM5zcJvjqZIvC21TOnnJt1G/0IO99ACEjJ+VrShTKRZM/9QzwPoCWcTdtE r3qs7ag92TaD5qxD6N3WLvhQAz0SVdJ9h/4nHr6Gsk5rhGUP/XMf8/RRA1RpcYXbNI 7rWXFthAp+VPTyzkn1FdzeneJP4Id5dqbZvQqvFml7AyqYtfzeZLWVcG4OH0AfBGby rgUfQXBanMW9w== From: Pratyush Yadav To: Mike Rapoport , Pasha Tatashin , Pratyush Yadav , Alexander Graf , Muchun Song , Oscar Salvador , David Hildenbrand , Andrew Morton , Jason Miu , Jork Loeser Cc: kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 19/22] memblock: always include KHO headers Date: Sat, 1 Aug 2026 10:48:28 +0200 Message-ID: <20260801084833.1897543-20-pratyush@kernel.org> X-Mailer: git-send-email 2.55.0.571.g244d577d93-goog In-Reply-To: <20260801084833.1897543-1-pratyush@kernel.org> References: <20260801084833.1897543-1-pratyush@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pratyush Yadav (Google)" 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) --- mm/memblock.c | 2 -- tools/testing/memblock/linux/kexec_handover.h | 9 +++++++++ tools/testing/memblock/linux/kho/abi/memblock.h | 10 ++++++++++ tools/testing/memblock/linux/libfdt.h | 9 +++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 tools/testing/memblock/linux/kexec_handover.h create mode 100644 tools/testing/memblock/linux/kho/abi/memblock.h create mode 100644 tools/testing/memblock/linux/libfdt.h diff --git a/mm/memblock.c b/mm/memblock.c index 8b2e551435ae..ea735bcd4dd1 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -19,11 +19,9 @@ #include #include -#ifdef CONFIG_KEXEC_HANDOVER #include #include #include -#endif /* CONFIG_KEXEC_HANDOVER */ #include #include diff --git a/tools/testing/memblock/linux/kexec_handover.h b/tools/testing/memblock/linux/kexec_handover.h new file mode 100644 index 000000000000..bdfd9445b1fd --- /dev/null +++ b/tools/testing/memblock/linux/kexec_handover.h @@ -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 */ diff --git a/tools/testing/memblock/linux/kho/abi/memblock.h b/tools/testing/memblock/linux/kho/abi/memblock.h new file mode 100644 index 000000000000..71cf6982a2b9 --- /dev/null +++ b/tools/testing/memblock/linux/kho/abi/memblock.h @@ -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 */ diff --git a/tools/testing/memblock/linux/libfdt.h b/tools/testing/memblock/linux/libfdt.h new file mode 100644 index 000000000000..6137b788fe8d --- /dev/null +++ b/tools/testing/memblock/linux/libfdt.h @@ -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_ */ -- 2.55.0.571.g244d577d93-goog