From bb0a56ecc4ba2a3db1b6ea6949c309886e3447d3 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Thu, 19 May 2011 18:51:07 -0400 Subject: [PATCH] [CPUFREQ] Move x86 drivers to drivers/cpufreq/ Signed-off-by: Dave Jones --- arch/x86/Kconfig | 2 +- arch/x86/kernel/cpu/Makefile | 1 - arch/x86/kernel/cpu/cpufreq/Makefile | 21 --------------- drivers/cpufreq/Kconfig | 10 ++++++- .../Kconfig => drivers/cpufreq/Kconfig.x86 | 13 +--------- drivers/cpufreq/Makefile | 26 +++++++++++++++++++ .../cpu => drivers}/cpufreq/acpi-cpufreq.c | 0 .../cpu => drivers}/cpufreq/cpufreq-nforce2.c | 0 .../cpu => drivers}/cpufreq/e_powersaver.c | 0 .../kernel/cpu => drivers}/cpufreq/elanfreq.c | 0 .../cpu => drivers}/cpufreq/gx-suspmod.c | 0 .../kernel/cpu => drivers}/cpufreq/longhaul.c | 0 .../kernel/cpu => drivers}/cpufreq/longhaul.h | 0 .../kernel/cpu => drivers}/cpufreq/longrun.c | 0 .../kernel/cpu => drivers}/cpufreq/mperf.c | 0 .../kernel/cpu => drivers}/cpufreq/mperf.h | 0 .../cpu => drivers}/cpufreq/p4-clockmod.c | 0 .../cpu => drivers}/cpufreq/pcc-cpufreq.c | 0 .../cpu => drivers}/cpufreq/powernow-k6.c | 0 .../cpu => drivers}/cpufreq/powernow-k7.c | 0 .../cpu => drivers}/cpufreq/powernow-k7.h | 0 .../cpu => drivers}/cpufreq/powernow-k8.c | 0 .../cpu => drivers}/cpufreq/powernow-k8.h | 0 .../cpu => drivers}/cpufreq/sc520_freq.c | 0 .../cpufreq/speedstep-centrino.c | 0 .../cpu => drivers}/cpufreq/speedstep-ich.c | 0 .../cpu => drivers}/cpufreq/speedstep-lib.c | 0 .../cpu => drivers}/cpufreq/speedstep-lib.h | 0 .../cpu => drivers}/cpufreq/speedstep-smi.c | 0 29 files changed, 37 insertions(+), 36 deletions(-) delete mode 100644 arch/x86/kernel/cpu/cpufreq/Makefile rename arch/x86/kernel/cpu/cpufreq/Kconfig => drivers/cpufreq/Kconfig.x86 (97%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/acpi-cpufreq.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/cpufreq-nforce2.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/e_powersaver.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/elanfreq.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/gx-suspmod.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/longhaul.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/longhaul.h (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/longrun.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/mperf.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/mperf.h (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/p4-clockmod.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/pcc-cpufreq.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/powernow-k6.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/powernow-k7.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/powernow-k7.h (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/powernow-k8.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/powernow-k8.h (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/sc520_freq.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/speedstep-centrino.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/speedstep-ich.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/speedstep-lib.c (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/speedstep-lib.h (100%) rename {arch/x86/kernel/cpu => drivers}/cpufreq/speedstep-smi.c (100%) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index cc6c53a95bfd..e7f94a52a5d3 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1848,7 +1848,7 @@ config APM_ALLOW_INTS endif # APM -source "arch/x86/kernel/cpu/cpufreq/Kconfig" +source "drivers/cpufreq/Kconfig" source "drivers/cpuidle/Kconfig" diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index 3f0ebe429a01..6042981d0309 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile @@ -30,7 +30,6 @@ obj-$(CONFIG_PERF_EVENTS) += perf_event.o obj-$(CONFIG_X86_MCE) += mcheck/ obj-$(CONFIG_MTRR) += mtrr/ -obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o diff --git a/arch/x86/kernel/cpu/cpufreq/Makefile b/arch/x86/kernel/cpu/cpufreq/Makefile deleted file mode 100644 index bd54bf67e6fb..000000000000 --- a/arch/x86/kernel/cpu/cpufreq/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Link order matters. K8 is preferred to ACPI because of firmware bugs in early -# K8 systems. ACPI is preferred to all other hardware-specific drivers. -# speedstep-* is preferred over p4-clockmod. - -obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o mperf.o -obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o mperf.o -obj-$(CONFIG_X86_PCC_CPUFREQ) += pcc-cpufreq.o -obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o -obj-$(CONFIG_X86_POWERNOW_K7) += powernow-k7.o -obj-$(CONFIG_X86_LONGHAUL) += longhaul.o -obj-$(CONFIG_X86_E_POWERSAVER) += e_powersaver.o -obj-$(CONFIG_ELAN_CPUFREQ) += elanfreq.o -obj-$(CONFIG_SC520_CPUFREQ) += sc520_freq.o -obj-$(CONFIG_X86_LONGRUN) += longrun.o -obj-$(CONFIG_X86_GX_SUSPMOD) += gx-suspmod.o -obj-$(CONFIG_X86_SPEEDSTEP_ICH) += speedstep-ich.o -obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o -obj-$(CONFIG_X86_SPEEDSTEP_SMI) += speedstep-smi.o -obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO) += speedstep-centrino.o -obj-$(CONFIG_X86_P4_CLOCKMOD) += p4-clockmod.o -obj-$(CONFIG_X86_CPUFREQ_NFORCE2) += cpufreq-nforce2.o diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index b78baa547ef5..9fb84853d8e3 100644 --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig @@ -1,3 +1,5 @@ +menu "CPU Frequency scaling" + config CPU_FREQ bool "CPU Frequency scaling" help @@ -177,4 +179,10 @@ config CPU_FREQ_GOV_CONSERVATIVE If in doubt, say N. -endif # CPU_FREQ +menu "x86 CPU frequency scaling drivers" +depends on X86 +source "drivers/cpufreq/Kconfig.x86" +endmenu + +endif +endmenu diff --git a/arch/x86/kernel/cpu/cpufreq/Kconfig b/drivers/cpufreq/Kconfig.x86 similarity index 97% rename from arch/x86/kernel/cpu/cpufreq/Kconfig rename to drivers/cpufreq/Kconfig.x86 index 870e6cc6ad28..343f84760487 100644 --- a/arch/x86/kernel/cpu/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig.x86 @@ -1,15 +1,7 @@ # -# CPU Frequency scaling +# x86 CPU Frequency scaling drivers # -menu "CPU Frequency scaling" - -source "drivers/cpufreq/Kconfig" - -if CPU_FREQ - -comment "CPUFreq processor drivers" - config X86_PCC_CPUFREQ tristate "Processor Clocking Control interface driver" depends on ACPI && ACPI_PROCESSOR @@ -261,6 +253,3 @@ config X86_SPEEDSTEP_RELAXED_CAP_CHECK option lets the probing code bypass some of those checks if the parameter "relaxed_check=1" is passed to the module. -endif # CPU_FREQ - -endmenu diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 71fc3b4173f1..c7f1a6f16b6e 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -13,3 +13,29 @@ obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o # CPUfreq cross-arch helpers obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o +##################################################################################d +# x86 drivers. +# Link order matters. K8 is preferred to ACPI because of firmware bugs in early +# K8 systems. ACPI is preferred to all other hardware-specific drivers. +# speedstep-* is preferred over p4-clockmod. + +obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o mperf.o +obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o mperf.o +obj-$(CONFIG_X86_PCC_CPUFREQ) += pcc-cpufreq.o +obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o +obj-$(CONFIG_X86_POWERNOW_K7) += powernow-k7.o +obj-$(CONFIG_X86_LONGHAUL) += longhaul.o +obj-$(CONFIG_X86_E_POWERSAVER) += e_powersaver.o +obj-$(CONFIG_ELAN_CPUFREQ) += elanfreq.o +obj-$(CONFIG_SC520_CPUFREQ) += sc520_freq.o +obj-$(CONFIG_X86_LONGRUN) += longrun.o +obj-$(CONFIG_X86_GX_SUSPMOD) += gx-suspmod.o +obj-$(CONFIG_X86_SPEEDSTEP_ICH) += speedstep-ich.o +obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o +obj-$(CONFIG_X86_SPEEDSTEP_SMI) += speedstep-smi.o +obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO) += speedstep-centrino.o +obj-$(CONFIG_X86_P4_CLOCKMOD) += p4-clockmod.o +obj-$(CONFIG_X86_CPUFREQ_NFORCE2) += cpufreq-nforce2.o + +##################################################################################d + diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c rename to drivers/cpufreq/acpi-cpufreq.c diff --git a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c b/drivers/cpufreq/cpufreq-nforce2.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c rename to drivers/cpufreq/cpufreq-nforce2.c diff --git a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/e_powersaver.c rename to drivers/cpufreq/e_powersaver.c diff --git a/arch/x86/kernel/cpu/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/elanfreq.c rename to drivers/cpufreq/elanfreq.c diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/drivers/cpufreq/gx-suspmod.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/gx-suspmod.c rename to drivers/cpufreq/gx-suspmod.c diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/longhaul.c rename to drivers/cpufreq/longhaul.c diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.h b/drivers/cpufreq/longhaul.h similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/longhaul.h rename to drivers/cpufreq/longhaul.h diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/drivers/cpufreq/longrun.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/longrun.c rename to drivers/cpufreq/longrun.c diff --git a/arch/x86/kernel/cpu/cpufreq/mperf.c b/drivers/cpufreq/mperf.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/mperf.c rename to drivers/cpufreq/mperf.c diff --git a/arch/x86/kernel/cpu/cpufreq/mperf.h b/drivers/cpufreq/mperf.h similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/mperf.h rename to drivers/cpufreq/mperf.h diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/p4-clockmod.c rename to drivers/cpufreq/p4-clockmod.c diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c rename to drivers/cpufreq/pcc-cpufreq.c diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/powernow-k6.c rename to drivers/cpufreq/powernow-k6.c diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/powernow-k7.c rename to drivers/cpufreq/powernow-k7.c diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.h b/drivers/cpufreq/powernow-k7.h similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/powernow-k7.h rename to drivers/cpufreq/powernow-k7.h diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/powernow-k8.c rename to drivers/cpufreq/powernow-k8.c diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h b/drivers/cpufreq/powernow-k8.h similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/powernow-k8.h rename to drivers/cpufreq/powernow-k8.h diff --git a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/sc520_freq.c rename to drivers/cpufreq/sc520_freq.c diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c rename to drivers/cpufreq/speedstep-centrino.c diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/speedstep-ich.c rename to drivers/cpufreq/speedstep-ich.c diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/drivers/cpufreq/speedstep-lib.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/speedstep-lib.c rename to drivers/cpufreq/speedstep-lib.c diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.h b/drivers/cpufreq/speedstep-lib.h similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/speedstep-lib.h rename to drivers/cpufreq/speedstep-lib.h diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c similarity index 100% rename from arch/x86/kernel/cpu/cpufreq/speedstep-smi.c rename to drivers/cpufreq/speedstep-smi.c -- 2.30.2