[RFC PATCH 1/3] kernel/liveupdate: make KEXEC_HANDOVER depend on KEXEC_FILE instead of selecting it

Sourabh Jain <[email protected]>
Newsgroups gmane.linux.kernel.kexec,gmane.linux.ports.ppc64.devel,gmane.linux.kernel
Message-ID <[email protected]>
An upcoming patch makes ARCH_SUPPORTS_KEXEC_HANDOVER depend on
CRASH_DUMP on powerpc:

    config ARCH_SUPPORTS_KEXEC_HANDOVER
    	def_bool y
    	depends on PPC64
    	depends on !CRASH_DUMP

That triggers a recursive dependency error:

    error: recursive dependency detected!
    	symbol KEXEC_HANDOVER depends on ARCH_SUPPORTS_KEXEC_HANDOVER
    	symbol ARCH_SUPPORTS_KEXEC_HANDOVER depends on CRASH_DUMP
    	symbol CRASH_DUMP depends on KEXEC_CORE
    	symbol KEXEC_CORE is selected by KEXEC_FILE
    	symbol KEXEC_FILE is selected by KEXEC_HANDOVER

KEXEC_HANDOVER and KEXEC_CORE end up depending on each other when
ARCH_SUPPORTS_KEXEC_HANDOVER depends on CRASH_DUMP. This creates a
recursive Kconfig dependency.

Change KEXEC_FILE from select to depends on to break this cycle.
This means KEXEC_FILE must be enabled explicitly instead of being
enabled automatically by KEXEC_HANDOVER.

Keep this change until the powerpc-specific KHO and CRASH_DUMP
dependency is resolved.

Cc: Aditya Gupta <[email protected]>
Cc: Alexander Graf <[email protected]>
Cc: Andrew Morton <akpm-de/[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Christophe Leroy (CS GROUP) <[email protected]>
Cc: Hari Bathini <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Mahesh Salgaonkar <[email protected]>
Cc: Michael Ellerman <mpe-Gsx/[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Pasha Tatashin <[email protected]>
Cc: Pratyush Yadav <[email protected]>
Cc: Ritesh Harjani (IBM) <[email protected]>
Cc: Shivang Upadhyay <[email protected]>
Cc: Shrikanth Hegde <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Sourabh Jain <[email protected]>
---
 kernel/liveupdate/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
index c13af38ba23a..22e317dc1e1a 100644
--- a/kernel/liveupdate/Kconfig
+++ b/kernel/liveupdate/Kconfig
@@ -6,7 +6,7 @@ config KEXEC_HANDOVER
 	bool "kexec handover"
 	depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
 	select MEMBLOCK_KHO_SCRATCH
-	select KEXEC_FILE
+	depends on KEXEC_FILE
 	select LIBFDT
 	select CMA
 	help
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.