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 AB50C4D98EC for ; Wed, 29 Jul 2026 14:57:11 +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=1785337032; cv=none; b=YH+pWr4W3HoivExGWjevgFCJwyKWndF9g+lARoAWW3UJGDARJYV755gTDehuptVjYDsL7QvTSnwrk5Z3ogKhQEpGGSbmu07EOnT3zPWWHG42UZqDRh/mbvHJfNk+f4FScKCvpC/DHrESmtEeYfgxPdyJEp3NSsLMa9NojPDlzJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785337032; c=relaxed/simple; bh=rBZx5THt0iqAg80DTiEPGYWXzbGYlMfW74W3fpMpOS0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VF3xdlGJLYquxQuvtMTorXf8HMQaJNcdn3R2s9H/7nXI5O6ofBUE2ZY8mdJJgtDqcmGmUQdbKv6FvIhmNRdEUTreJ91Uev7pI/hD5mMZiOX81Bs/1L6W2gb8w2Ky3ar/vuoPsM60D0QVwy/1lbl5F6e5dgjT0xeMqJi2jRes9O8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cf9x6aKI; 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="cf9x6aKI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 691941F00A3A; Wed, 29 Jul 2026 14:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785337031; bh=q6LH/9ecwG0QZVB1+/Q90YQFyR/8a3d86KWwBNZduCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cf9x6aKILYb0+cw9MvgfAPR4eTx8J1YEUSEbB5IC57Vqco5iXOQWnbTPfH5GlANDT Uil/Us/GBd1g+LL3XbKWeaARmP2BjQvLQr6gmt36EMRmhm2pq61t4O9y1R8tnizkmU ct0zOuizvdy0TH8ulOIYsvOSkojBi4HPOd6n6Phkse1Wt4CU0XoB/k2tvknBTYPPYf W8M0c0kuqgVTx7in2/VrkwdvPNJMdhO6k5qnDUzbYRHB5w1wAcKbUPR5GNMxmD8M9G iCZVCSqWcF7Vbx6c0lFWJmqoygnD8O171erW4Jbbj4/KBPeJ+TqDAkFMYkFrTd8DhO 4gnuina7wvXLw== 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 v5 19/22] memblock: always include KHO headers Date: Wed, 29 Jul 2026 16:56:04 +0200 Message-ID: <20260729145610.2827231-20-pratyush@kernel.org> X-Mailer: git-send-email 2.55.0.508.g3f0d502094-goog In-Reply-To: <20260729145610.2827231-1-pratyush@kernel.org> References: <20260729145610.2827231-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.508.g3f0d502094-goog