All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform: goldfish: move the separate 'default' propery for CONFIG_GOLDFISH
@ 2024-02-04  8:10 Masahiro Yamada
  0 siblings, 0 replies; only message in thread
From: Masahiro Yamada @ 2024-02-04  8:10 UTC (permalink / raw)
  To: linux-kernel, Greg Kroah-Hartman
  Cc: Masahiro Yamada, Greg Hackmann, Borislav Petkov, Dave Hansen,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, x86

Currently, there are two entries for CONFIG_GOLDFISH.

In arch/x86/Kconfig:

  config GOLDFISH
          def_bool y
          depends on X86_GOLDFISH

In drivers/platform/goldfish/Kconfig:

  menuconfig GOLDFISH
          bool "Platform support for Goldfish virtual devices"
          depends on HAS_IOMEM && HAS_DMA

While Kconfig allows multiple entries, it generally leads to tricky
code.

Prior to commit bd2f348db503 ("goldfish: refactor goldfish platform
configs"), CONFIG_GOLDFISH was an alias of CONFIG_X86_GOLDFISH.

After the mentioned commit added the second entry with a user prompt,
the former provides the 'default' property that is effective only when
X86_GOLDFISH=y.

Merge them tegether to clarify how it has worked in the past 8 years.

Cc: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/x86/Kconfig                  | 4 ----
 drivers/platform/goldfish/Kconfig | 1 +
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5edec175b9bf..eb6c9f5b3be7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -471,10 +471,6 @@ config X86_MPPARSE
 	  For old smp systems that do not have proper acpi support. Newer systems
 	  (esp with 64bit cpus) with acpi support, MADT and DSDT will override it
 
-config GOLDFISH
-	def_bool y
-	depends on X86_GOLDFISH
-
 config X86_CPU_RESCTRL
 	bool "x86 CPU resource control support"
 	depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
diff --git a/drivers/platform/goldfish/Kconfig b/drivers/platform/goldfish/Kconfig
index f3d09b1631e3..03ca5bf19f98 100644
--- a/drivers/platform/goldfish/Kconfig
+++ b/drivers/platform/goldfish/Kconfig
@@ -2,6 +2,7 @@
 menuconfig GOLDFISH
 	bool "Platform support for Goldfish virtual devices"
 	depends on HAS_IOMEM && HAS_DMA
+	default X86_GOLDFISH
 	help
 	  Say Y here to get to see options for the Goldfish virtual platform.
 	  This option alone does not add any kernel code.
-- 
2.40.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-04  8:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04  8:10 [PATCH] platform: goldfish: move the separate 'default' propery for CONFIG_GOLDFISH Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.