From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B3A3C98304 for ; Tue, 22 Sep 2026 04:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Bvaf0w5QPzwCv2wIIdqM/Z0E7fX8LOsuubg/s4zocj8=; b=hD67thfVHEhnkY0wv9XJ2Jb/BA N4J6CCGF58v8rDwv/6NZz8FQ2kFSqCgtCiOD1Qq/+Z6yLDnIZu4ks7dwjtA5pcAh/Er2g0fnQWcPQ 0QxB4IH9iw7yVbJtjJSTaM1EM+ysj/z+HWzZh1nLcPKRHPLqeYlz/TFDMYzTeskZ+MSC5ulIr6Uq3 +R+x3ZRv0w59oxRn4iYxTk8e8fbANNirxgRcUnIFxueh3uigPHHCGET+NGiMOKqiDSz+V85PYLqHR AYwDi//qSSZHlOPMgf8LVYl4FuSUuAufVCXO2634Znd8vtgo9Xy4sijLwh9DZ/nSf6x2xl/ag3fGC ZRIVLIaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8rt3-000000049p9-49IR; Tue, 22 Sep 2026 04:13:45 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8rt2-000000049ob-2dLG for kexec@lists.infradead.org; Tue, 22 Sep 2026 04:13:44 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 11BDB447B2; Tue, 22 Sep 2026 04:13:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1DB61F00893; Tue, 22 Sep 2026 04:13:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790050423; bh=Bvaf0w5QPzwCv2wIIdqM/Z0E7fX8LOsuubg/s4zocj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oi0FZIVxsm91tPtVwvsPGXW0aKx05qvNQ7tGCYojBE48ngWMLK9ZVIQ2nEN4xYbrr FPBM5iaelIEPM/Y0sRlJ6oJq9WdnxuMkTAU2nGesa7MP4BZTlITEZSaCNb2xeQRjyZ jLc3bBy/pYHNnvDMwJ2NukNsHp/8cYyh7IC7FoYXDl4WCMrkNEKTaO1MBt5ACR/tLi 5ei3tTaUWvWCTQrmJCLGjWdXAgXjmEszRukgRdrBONVk4aPJsxckUHP/0zFBr6fo2h bt0lvoeDR5xdVQkqapnwPokzOY7zZNY64iIlyvmmNazPfXwp+sg6znIrkQIAaF/tKd G2X/auQdvBbFA== From: Pratyush Yadav To: Jonathan Corbet , Shuah Khan , Mike Rapoport , Pasha Tatashin , Pratyush Yadav , Alexander Graf , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ard Biesheuvel , Ilias Apalodimas , Rob Herring , Saravana Kannan , Arnd Bergmann , Baoquan He Cc: x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org, linux-efi@vger.kernel.org, devicetree@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH v3 1/4] memblock: get rid of CONFIG_MEMBLOCK_KHO_SCRATCH Date: Tue, 22 Sep 2026 06:13:13 +0200 Message-ID: <20260922041321.233986-2-pratyush@kernel.org> X-Mailer: git-send-email 2.55.0.1082.g2b9226bbc0-goog In-Reply-To: <20260922041321.233986-1-pratyush@kernel.org> References: <20260922041321.233986-1-pratyush@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org From: "Pratyush Yadav (Google)" This config is only a proxy for CONFIG_KEXEC_HANDOVER. It is only enabled by KHO. No point in the indirection. Use CONFIG_KEXEC_HANDOVER directly. Signed-off-by: Pratyush Yadav (Google) --- include/linux/memblock.h | 2 +- kernel/liveupdate/Kconfig | 1 - mm/Kconfig | 4 ---- mm/memblock.c | 4 ++-- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index d62db9e776cf..db3b106c6335 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -614,7 +614,7 @@ static inline void early_memtest(phys_addr_t start, phys_addr_t end) { } static inline void memtest_report_meminfo(struct seq_file *m) { } #endif -#ifdef CONFIG_MEMBLOCK_KHO_SCRATCH +#ifdef CONFIG_KEXEC_HANDOVER void memblock_set_kho_scratch_only(void); void memblock_clear_kho_scratch_only(void); #else diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig index c13af38ba23a..f50daee8eff0 100644 --- a/kernel/liveupdate/Kconfig +++ b/kernel/liveupdate/Kconfig @@ -5,7 +5,6 @@ menu "Live Update and Kexec HandOver" config KEXEC_HANDOVER bool "kexec handover" depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE - select MEMBLOCK_KHO_SCRATCH select KEXEC_FILE select LIBFDT select CMA diff --git a/mm/Kconfig b/mm/Kconfig index 604c58199acb..631a410eaee9 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -483,10 +483,6 @@ config HAVE_GUP_FAST depends on MMU bool -# Enable memblock support for scratch memory which is needed for kexec handover -config MEMBLOCK_KHO_SCRATCH - bool - # Don't discard allocated memory used to track "memory" and "reserved" memblocks # after early boot, so it can still be used to test for validity of memory. # Also, memblocks are updated with memory hot(un)plug. diff --git a/mm/memblock.c b/mm/memblock.c index 9ce86349a29f..197d854c18d5 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -113,7 +113,7 @@ unsigned long min_low_pfn; unsigned long max_pfn; unsigned long long max_possible_pfn; -#ifdef CONFIG_MEMBLOCK_KHO_SCRATCH +#ifdef CONFIG_KEXEC_HANDOVER /* When set to true, only allocate from MEMBLOCK_KHO_SCRATCH ranges */ static bool kho_scratch_only; #else @@ -2596,7 +2596,7 @@ int reserve_mem_release_by_name(const char *name) return 1; } -#ifdef CONFIG_MEMBLOCK_KHO_SCRATCH +#ifdef CONFIG_KEXEC_HANDOVER __init void memblock_set_kho_scratch_only(void) { kho_scratch_only = true; -- 2.55.0.1082.g2b9226bbc0-goog