public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: unification of cfufreq/Kconfig
@ 2007-11-06 23:01 Sam Ravnborg
  2007-11-06 23:01 ` [PATCH] x86: start unification of arch/x86/Kconfig.* Sam Ravnborg
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Sam Ravnborg @ 2007-11-06 23:01 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, LKML; +Cc: Sam Ravnborg

Merge the two Kconfig files to a single file.

Checked using make allmodconfig for x86_64.
No changes in build.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/x86/Kconfig.i386                              |    2 +-
 arch/x86/Kconfig.x86_64                            |    2 +-
 .../x86/kernel/cpu/cpufreq/{Kconfig_32 => Kconfig} |   69 +++++++++----
 arch/x86/kernel/cpu/cpufreq/Kconfig_64             |  108 --------------------
 4 files changed, 49 insertions(+), 132 deletions(-)
 rename arch/x86/kernel/cpu/cpufreq/{Kconfig_32 => Kconfig} (77%)
 delete mode 100644 arch/x86/kernel/cpu/cpufreq/Kconfig_64

diff --git a/arch/x86/Kconfig.i386 b/arch/x86/Kconfig.i386
index 7331efe..b6f2fd0 100644
--- a/arch/x86/Kconfig.i386
+++ b/arch/x86/Kconfig.i386
@@ -1092,7 +1092,7 @@ config APM_REAL_MODE_POWER_OFF
 
 endif # APM
 
-source "arch/x86/kernel/cpu/cpufreq/Kconfig_32"
+source "arch/x86/kernel/cpu/cpufreq/Kconfig"
 
 source "drivers/cpuidle/Kconfig"
 
diff --git a/arch/x86/Kconfig.x86_64 b/arch/x86/Kconfig.x86_64
index cc468ea..8d6b534 100644
--- a/arch/x86/Kconfig.x86_64
+++ b/arch/x86/Kconfig.x86_64
@@ -719,7 +719,7 @@ config ARCH_HIBERNATION_HEADER
 
 source "drivers/acpi/Kconfig"
 
-source "arch/x86/kernel/cpu/cpufreq/Kconfig_64"
+source "arch/x86/kernel/cpu/cpufreq/Kconfig"
 
 source "drivers/cpuidle/Kconfig"
 
diff --git a/arch/x86/kernel/cpu/cpufreq/Kconfig_32 b/arch/x86/kernel/cpu/cpufreq/Kconfig
similarity index 77%
rename from arch/x86/kernel/cpu/cpufreq/Kconfig_32
rename to arch/x86/kernel/cpu/cpufreq/Kconfig
index d8c6f13..48c4465 100644
--- a/arch/x86/kernel/cpu/cpufreq/Kconfig_32
+++ b/arch/x86/kernel/cpu/cpufreq/Kconfig
@@ -19,6 +19,9 @@ config X86_ACPI_CPUFREQ
 	  Processor Performance States.
 	  This driver also supports Intel Enhanced Speedstep.
 
+	  To compile this driver as a module, choose M here: the
+	  module will be called acpi-cpufreq.
+
 	  For details, take a look at <file:Documentation/cpu-freq/>.
 
 	  If in doubt, say N.
@@ -26,7 +29,7 @@ config X86_ACPI_CPUFREQ
 config ELAN_CPUFREQ
 	tristate "AMD Elan SC400 and SC410"
 	select CPU_FREQ_TABLE
-	depends on X86_ELAN
+	depends on X86_32 && X86_ELAN
 	---help---
 	  This adds the CPUFreq driver for AMD Elan SC400 and SC410
 	  processors.
@@ -42,7 +45,7 @@ config ELAN_CPUFREQ
 config SC520_CPUFREQ
 	tristate "AMD Elan SC520"
 	select CPU_FREQ_TABLE
-	depends on X86_ELAN
+	depends on X86_32 && X86_ELAN
 	---help---
 	  This adds the CPUFreq driver for AMD Elan SC520 processor.
 
@@ -54,6 +57,7 @@ config SC520_CPUFREQ
 config X86_POWERNOW_K6
 	tristate "AMD Mobile K6-2/K6-3 PowerNow!"
 	select CPU_FREQ_TABLE
+	depends on X86_32
 	help
 	  This adds the CPUFreq driver for mobile AMD K6-2+ and mobile
 	  AMD K6-3+ processors.
@@ -65,6 +69,7 @@ config X86_POWERNOW_K6
 config X86_POWERNOW_K7
 	tristate "AMD Mobile Athlon/Duron PowerNow!"
 	select CPU_FREQ_TABLE
+	depends on X86_32
 	help
 	  This adds the CPUFreq driver for mobile AMD K7 mobile processors.
 
@@ -76,23 +81,27 @@ config X86_POWERNOW_K7_ACPI
 	bool
 	depends on X86_POWERNOW_K7 && ACPI_PROCESSOR
 	depends on !(X86_POWERNOW_K7 = y && ACPI_PROCESSOR = m)
+	depends on X86_32
 	default y
 
 config X86_POWERNOW_K8
 	tristate "AMD Opteron/Athlon64 PowerNow!"
 	select CPU_FREQ_TABLE
-	depends on EXPERIMENTAL
 	help
 	  This adds the CPUFreq driver for mobile AMD Opteron/Athlon64 processors.
 
+	  To compile this driver as a module, choose M here: the
+	  module will be called powernow-k8.
+
 	  For details, take a look at <file:Documentation/cpu-freq/>.
 
 	  If in doubt, say N.
 
 config X86_POWERNOW_K8_ACPI
-	bool "ACPI Support"
-	select ACPI_PROCESSOR
-	depends on ACPI && X86_POWERNOW_K8
+	bool
+	prompt "ACPI Support" if X86_32
+	depends on ACPI && X86_POWERNOW_K8 && ACPI_PROCESSOR
+	depends on !(X86_POWERNOW_K8 = y && ACPI_PROCESSOR = m)
 	default y
 	help
 	  This provides access to the K8s Processor Performance States via ACPI.
@@ -104,7 +113,7 @@ config X86_POWERNOW_K8_ACPI
 
 config X86_GX_SUSPMOD
 	tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation"
-	depends on PCI
+	depends on X86_32 && PCI
 	help
 	 This add the CPUFreq driver for NatSemi Geode processors which
 	 support suspend modulation.
@@ -114,15 +123,20 @@ config X86_GX_SUSPMOD
 	 If in doubt, say N.
 
 config X86_SPEEDSTEP_CENTRINO
-	tristate "Intel Enhanced SpeedStep"
+	tristate "Intel Enhanced SpeedStep (deprecated)"
 	select CPU_FREQ_TABLE
-	select X86_SPEEDSTEP_CENTRINO_TABLE
+	select X86_SPEEDSTEP_CENTRINO_TABLE if X86_32
+	depends on X86_64 && ACPI_PROCESSOR
 	help
+	  This is deprecated and this functionality is now merged into
+	  acpi_cpufreq (X86_ACPI_CPUFREQ). Use that driver instead of
+	  speedstep_centrino.
 	  This adds the CPUFreq driver for Enhanced SpeedStep enabled
-	  mobile CPUs.  This means Intel Pentium M (Centrino) CPUs. However,
-	  you also need to say Y to "Use ACPI tables to decode..." below
-	  [which might imply enabling ACPI] if you want to use this driver
-	  on non-Banias CPUs.
+	  mobile CPUs.  This means Intel Pentium M (Centrino) CPUs
+	  or 64bit enabled Intel Xeons.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called speedstep-centrino.
 
 	  For details, take a look at <file:Documentation/cpu-freq/>.
 
@@ -130,7 +144,7 @@ config X86_SPEEDSTEP_CENTRINO
 
 config X86_SPEEDSTEP_CENTRINO_TABLE
 	bool "Built-in tables for Banias CPUs"
-	depends on X86_SPEEDSTEP_CENTRINO
+	depends on X86_32 && X86_SPEEDSTEP_CENTRINO
 	default y
 	help
 	  Use built-in tables for Banias CPUs if ACPI encoding
@@ -141,6 +155,7 @@ config X86_SPEEDSTEP_CENTRINO_TABLE
 config X86_SPEEDSTEP_ICH
 	tristate "Intel Speedstep on ICH-M chipsets (ioport interface)"
 	select CPU_FREQ_TABLE
+	depends on X86_32
 	help
 	  This adds the CPUFreq driver for certain mobile Intel Pentium III
 	  (Coppermine), all mobile Intel Pentium III-M (Tualatin) and all
@@ -154,7 +169,7 @@ config X86_SPEEDSTEP_ICH
 config X86_SPEEDSTEP_SMI
 	tristate "Intel SpeedStep on 440BX/ZX/MX chipsets (SMI interface)"
 	select CPU_FREQ_TABLE
-	depends on EXPERIMENTAL
+	depends on X86_32 && EXPERIMENTAL
 	help
 	  This adds the CPUFreq driver for certain mobile Intel Pentium III
 	  (Coppermine), all mobile Intel Pentium III-M (Tualatin)
@@ -169,15 +184,24 @@ config X86_P4_CLOCKMOD
 	select CPU_FREQ_TABLE
 	help
 	  This adds the CPUFreq driver for Intel Pentium 4 / XEON
-	  processors.
+	  processors.  When enabled it will lower CPU temperature by skipping
+	  clocks.
+
+	  This driver should be only used in exceptional
+	  circumstances when very low power is needed because it causes severe
+	  slowdowns and noticeable latencies.  Normally Speedstep should be used
+	  instead.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called p4-clockmod.
 
 	  For details, take a look at <file:Documentation/cpu-freq/>.
 
-	  If in doubt, say N.
+	  Unless you are absolutely sure say N.
 
 config X86_CPUFREQ_NFORCE2
 	tristate "nVidia nForce2 FSB changing"
-	depends on EXPERIMENTAL
+	depends on X86_32 && EXPERIMENTAL
 	help
 	  This adds the CPUFreq driver for FSB changing on nVidia nForce2
 	  platforms.
@@ -188,6 +212,7 @@ config X86_CPUFREQ_NFORCE2
 
 config X86_LONGRUN
 	tristate "Transmeta LongRun"
+	depends on X86_32
 	help
 	  This adds the CPUFreq driver for Transmeta Crusoe and Efficeon processors
 	  which support LongRun.
@@ -199,7 +224,7 @@ config X86_LONGRUN
 config X86_LONGHAUL
 	tristate "VIA Cyrix III Longhaul"
 	select CPU_FREQ_TABLE
-	depends on ACPI_PROCESSOR
+	depends on X86_32 && ACPI_PROCESSOR
 	help
 	  This adds the CPUFreq driver for VIA Samuel/CyrixIII,
 	  VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T
@@ -212,7 +237,7 @@ config X86_LONGHAUL
 config X86_E_POWERSAVER
 	tristate "VIA C7 Enhanced PowerSaver (EXPERIMENTAL)"
 	select CPU_FREQ_TABLE
-	depends on EXPERIMENTAL
+	depends on X86_32 && EXPERIMENTAL
 	help
 	  This adds the CPUFreq driver for VIA C7 processors.
 
@@ -233,11 +258,11 @@ config X86_ACPI_CPUFREQ_PROC_INTF
 
 config X86_SPEEDSTEP_LIB
 	tristate
-	default X86_SPEEDSTEP_ICH || X86_SPEEDSTEP_SMI || X86_P4_CLOCKMOD
+	default (X86_SPEEDSTEP_ICH || X86_SPEEDSTEP_SMI || X86_P4_CLOCKMOD)
 
 config X86_SPEEDSTEP_RELAXED_CAP_CHECK
 	bool "Relaxed speedstep capability checks"
-	depends on (X86_SPEEDSTEP_SMI || X86_SPEEDSTEP_ICH)
+	depends on X86_32 && (X86_SPEEDSTEP_SMI || X86_SPEEDSTEP_ICH)
 	help
 	  Don't perform all checks for a speedstep capable system which would
 	  normally be done. Some ancient or strange systems, though speedstep
diff --git a/arch/x86/kernel/cpu/cpufreq/Kconfig_64 b/arch/x86/kernel/cpu/cpufreq/Kconfig_64
deleted file mode 100644
index 9c9699f..0000000
--- a/arch/x86/kernel/cpu/cpufreq/Kconfig_64
+++ /dev/null
@@ -1,108 +0,0 @@
-#
-# CPU Frequency scaling
-#
-
-menu "CPU Frequency scaling"
-
-source "drivers/cpufreq/Kconfig"
-
-if CPU_FREQ
-
-comment "CPUFreq processor drivers"
-
-config X86_POWERNOW_K8
-	tristate "AMD Opteron/Athlon64 PowerNow!"
-	select CPU_FREQ_TABLE
-	help
-	  This adds the CPUFreq driver for mobile AMD Opteron/Athlon64 processors.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called powernow-k8.
-
-	  For details, take a look at <file:Documentation/cpu-freq/>.
-
-	  If in doubt, say N.
-
-config X86_POWERNOW_K8_ACPI
-	bool
-	depends on X86_POWERNOW_K8 && ACPI_PROCESSOR
-	depends on !(X86_POWERNOW_K8 = y && ACPI_PROCESSOR = m)
-	default y
-
-config X86_SPEEDSTEP_CENTRINO
-	tristate "Intel Enhanced SpeedStep (deprecated)"
-	select CPU_FREQ_TABLE
-	depends on ACPI_PROCESSOR
-	help
-	  This is deprecated and this functionality is now merged into
-	  acpi_cpufreq (X86_ACPI_CPUFREQ). Use that driver instead of
-	  speedstep_centrino.
-	  This adds the CPUFreq driver for Enhanced SpeedStep enabled
-	  mobile CPUs.  This means Intel Pentium M (Centrino) CPUs
-	  or 64bit enabled Intel Xeons.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called speedstep-centrino.
-
-	  For details, take a look at <file:Documentation/cpu-freq/>.
-
-	  If in doubt, say N.
-
-config X86_ACPI_CPUFREQ
-	tristate "ACPI Processor P-States driver"
-	select CPU_FREQ_TABLE
-	depends on ACPI_PROCESSOR
-	help
-	  This driver adds a CPUFreq driver which utilizes the ACPI
-	  Processor Performance States.
-	  This driver also supports Intel Enhanced Speedstep.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called acpi-cpufreq.
-
-	  For details, take a look at <file:Documentation/cpu-freq/>.
-
-	  If in doubt, say N.
-
-comment "shared options"
-
-config X86_ACPI_CPUFREQ_PROC_INTF
-	bool "/proc/acpi/processor/../performance interface (deprecated)"
-	depends on PROC_FS
-	depends on X86_ACPI_CPUFREQ || X86_POWERNOW_K8_ACPI
-	help
-	  This enables the deprecated /proc/acpi/processor/../performance
-	  interface. While it is helpful for debugging, the generic,
-	  cross-architecture cpufreq interfaces should be used.
-
-	  If in doubt, say N.
-
-config X86_P4_CLOCKMOD
-	tristate "Intel Pentium 4 clock modulation"
-	depends on EMBEDDED
-	select CPU_FREQ_TABLE
-	help
-	  This adds the clock modulation driver for Intel Pentium 4 / XEON
-	  processors.  When enabled it will lower CPU temperature by skipping
-	  clocks.
-
-	  This driver should be only used in exceptional
-	  circumstances when very low power is needed because it causes severe
-	  slowdowns and noticeable latencies.  Normally Speedstep should be used
-	  instead.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called p4-clockmod.
-
-	  For details, take a look at <file:Documentation/cpu-freq/>.
-
-	  Unless you are absolutely sure say N.
-
-
-config X86_SPEEDSTEP_LIB
-	tristate
-	default X86_P4_CLOCKMOD
-
-endif
-
-endmenu
-- 
1.5.3.4.1157.g0e74-dirty


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [PATCH revised] enable make ARCH=x86 (and stay backward compatible)
@ 2007-11-12 20:54 Sam Ravnborg
  2007-11-12 21:00 ` [PATCH] x86: unification of cfufreq/Kconfig Sam Ravnborg
  0 siblings, 1 reply; 21+ messages in thread
From: Sam Ravnborg @ 2007-11-12 20:54 UTC (permalink / raw)
  To: Jeff Garzik, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, LKML,
	Randy Dunlap, david, Christoph Hellwig, Frans Pop
  Cc: Linus Torvalds

This revised patchset does the followings things:

o unify the i386 and x86_64 Kconfig files
o introduce support for K64BIT to set CONFIG_64BIT on command line
o introdue support for "make ARCH=x86"
o degraded ARCH={i386,x86_64} to select between 32/64 for all*targets
  and otherwise just selecting the x86 architecture

I suggest we should merge this despite being at -rc2 so we can start
teaching distributors to use "ARCH=x86" - but I leave it to the
x86 Maintainers to decide.

I have always thought that the x86 merge could not be considered ready
until we could do a "make ARCH=x86" becasue it is so intuitive
if you have not typed "make ARCH=i386" one thousand times.


Based on feedback from previous submissions the following have changed:
- The backwards compatibility links are kept
- The backwards compatibility ARCH={i386,x86_64} are kept but degraded
  to select 32/64 bit during configuration for all*config targets.
- ARCH={i386,x86_64} are not broken by any patches so bisect will
  not choke
- patchset shrinked to 13 logical patches


With this change we have a setup where we have a common Kconfig
for 32-bit and 64-bit x86 like all other architectures.
And we can configure and build a kernel using ARCH="name of arch dir"

As an added bonus "make update-po-config" is fixed :-)

The diffstat tells it own story:
 19 files changed, 684 insertions(+), 1235 deletions(-)

And this is with new functionality added...

The patches explained...

Unification of Kconfig.i386 + Kconfig.x86_64:
      x86: unification of cfufreq/Kconfig
      x86: start unification of arch/x86/Kconfig.*
      x86: arch/x86/Kconfig.cpu unification
      x86: add X86_32 dependency to i386 specific symbols in Kconfig.i386
      x86: add X86_64 dependency to x86_64 specific symbols in Kconfig.x86_64
      x86: copy x86_64 specific Kconfig symbols to Kconfig.i386
      x86: move all simple arch settings to Kconfig
      x86: move the rest of the menu's to Kconfig

Adding support for K64BIT=y on commandline
      kconfig: factor out code in confdata.c
      kconfig: add helper to set config symbol from environment variable
      kconfig: use $K64BIT to set 64BIT with all*config targets

Preparational patch that just clean up a few bits in x86:
      x86: do not use $(ARCH) when not needed

Introducing "make ARCH=x86"
      x86: enable "make ARCH=x86"

After the preparation then introducing "make ARCH=x86" actually
deleted more lines than is added (last patch):
    5 files changed, 19 insertions(+), 49 deletions(-)


The patchset is available at:

	git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86.git

Patches will be sent to lkml for another review round.

	Sam


Diffstat:

 Makefile                                           |   13 +-
 README                                             |    2 +
 arch/x86/{Kconfig.i386 => Kconfig}                 |  567 ++++++++++----
 arch/x86/Kconfig.cpu                               |  121 ++--
 arch/x86/Kconfig.x86_64                            |  839 --------------------
 arch/x86/Makefile                                  |   10 +-
 arch/x86/Makefile_32                               |    8 +-
 arch/x86/Makefile_64                               |    8 +-
 arch/x86/boot/Makefile                             |    6 +-
 arch/x86/boot/cpucheck.c                           |    6 -
 arch/x86/kernel/Makefile_32                        |    3 +-
 arch/x86/kernel/Makefile_64                        |    2 +
 .../x86/kernel/cpu/cpufreq/{Kconfig_32 => Kconfig} |   69 ++-
 arch/x86/kernel/cpu/cpufreq/Kconfig_64             |  108 ---
 arch/x86/vdso/Makefile                             |    2 +-
 scripts/kconfig/Makefile                           |    7 +-
 scripts/kconfig/conf.c                             |    1 +
 scripts/kconfig/confdata.c                         |  146 +++--
 scripts/kconfig/lkc_proto.h                        |    1 +
 19 files changed, 684 insertions(+), 1235 deletions(-)


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2007-11-12 20:59 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-06 23:01 [PATCH] x86: unification of cfufreq/Kconfig Sam Ravnborg
2007-11-06 23:01 ` [PATCH] x86: start unification of arch/x86/Kconfig.* Sam Ravnborg
2007-11-06 23:01   ` [PATCH] x86: arch/x86/Kconfig.cpu unification Sam Ravnborg
2007-11-06 23:01     ` [PATCH] x86: add X86_32 dependency to i386 specific symbols in Kconfig.i386 Sam Ravnborg
2007-11-06 23:01       ` [PATCH] x86: add X86_64 dependency to x86_64 specific symbols in Kconfig.x86_64 Sam Ravnborg
2007-11-06 23:01         ` [PATCH] x86: copy x86_64 specific Kconfig symbols to Kconifg.i386 Sam Ravnborg
2007-11-06 23:01           ` [PATCH] x86: move all simple arch settings to Kconfig Sam Ravnborg
2007-11-06 23:01             ` [PATCH] x86: move the rest of the menu's " Sam Ravnborg
2007-11-06 23:04 ` [PATCH] x86: unification of cfufreq/Kconfig Sam Ravnborg
2007-11-07  5:46   ` Sam Ravnborg
2007-11-09 18:36   ` Andreas Herrmann
2007-11-09 18:45     ` Thomas Gleixner
2007-11-09 19:41       ` Sam Ravnborg
2007-11-09 19:42     ` Sam Ravnborg
2007-11-12 10:45     ` Adrian Bunk
2007-11-07  6:02 ` Adrian Bunk
2007-11-07  7:06   ` Sam Ravnborg
2007-11-07  7:18     ` Adrian Bunk
2007-11-07 16:06       ` Sam Ravnborg
2007-11-08 14:51         ` Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2007-11-12 20:54 [PATCH revised] enable make ARCH=x86 (and stay backward compatible) Sam Ravnborg
2007-11-12 21:00 ` [PATCH] x86: unification of cfufreq/Kconfig Sam Ravnborg
2007-11-12 21:00   ` [PATCH] x86: start unification of arch/x86/Kconfig.* Sam Ravnborg
2007-11-12 21:00     ` [PATCH] x86: arch/x86/Kconfig.cpu unification Sam Ravnborg
2007-11-12 21:00       ` [PATCH] x86: add X86_32 dependency to i386 specific symbols in Kconfig.i386 Sam Ravnborg
2007-11-12 21:00         ` [PATCH] x86: add X86_64 dependency to x86_64 specific symbols in Kconfig.x86_64 Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox