CPUFreq PowerOP integration, Centrino PM Core and OPs registration 2/3
RFC 1/1 CPUFreq PowerOP integration, Centrino PM Core and OPs registration 2/3
This patch adds support for centrino PM Core and operating points registration module.
Operating points registration module uses hardcoded values or values retrieved from ACPI to register operating points using PowerOP interface. The module is completely independent from either cpufreq or centrino PM Core.
PM Core defines power parameter for the platform and handles all hw related steps to set system to an operating point or retrieve a power parameter value.
Both files are no longer belong to cpufreq and should be removed from cpufreq folder but were left there to simplify investigation of the diff.
arch/i386/Kconfig +12 -0
@@ -814,6 +814,18 @@ source kernel/power/Kconfig source "drivers/acpi/Kconfig" +menu "PM Core" + +config PM_CORE + tristate "PM Core" + depends POWEROP + help + This enables i386 PM Core to control platform freq/voltage via + PowerOP interface + +endmenu + + menu "APM (Advanced Power Management) BIOS Support" depends on PM && !X86_VISWS
arch/i386/kernel/cpu/cpufreq/Kconfig +3 -9
@@ -106,17 +106,11 @@ config X86_GX_SUSPMOD If in doubt, say N. config X86_SPEEDSTEP_CENTRINO - tristate "Intel Enhanced SpeedStep" - select CPU_FREQ_TABLE + tristate "SpeedStep operatin points registration" + depends on POWEROP select X86_SPEEDSTEP_CENTRINO_TABLE if (!X86_SPEEDSTEP_CENTRINO_ACPI) help - 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. - - For details, take a look at <file:Documentation/cpu-freq/>. + Opeatin points registration module for SpeedStep Centrino If in doubt, say N.
arch/i386/kernel/cpu/cpufreq/Makefile +1 -0
@@ -8,6 +8,7 @@ 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_CENTRINO) += speedstep-centrino.o +obj-$(CONFIG_PM_CORE) += speedstep-centrino-pm_core.o obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o obj-$(CONFIG_X86_SPEEDSTEP_SMI) += speedstep-smi.o obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o
arch/i386/kernel/cpu/cpufreq/speedstep-centrino-pm_core.c new file +644 -0
644 lines not on this page · raw message
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +176 -505
896 lines not on this page · raw message
drivers/acpi/processor_perflib.c +3 -7
@@ -682,12 +682,8 @@ int acpi_processor_preregister_performan/* Validate the Domain info */ count_target = pdomain->num_processors; count =1 ; -if (pdomain->coord_type ==DOMAIN_COORD_TYPE_SW_ALL ) - pr->performance->shared_type =CPUFREQ_SHARED_TYPE_ALL ; -else if (pdomain->coord_type ==DOMAIN_COORD_TYPE_HW_ALL ) - pr->performance->shared_type =CPUFREQ_SHARED_TYPE_HW ; -else if (pdomain->coord_type ==DOMAIN_COORD_TYPE_SW_ANY ) - pr->performance->shared_type =CPUFREQ_SHARED_TYPE_ANY ; + + pr->performance->shared_type = pdomain->coord_type;for_each_possible_cpu (j) {if (i == j)
@@ -751,7 +747,7 @@ err_ret:if (retval) {cpus_clear (pr->performance->shared_cpu_map);cpu_set (i, pr->performance->shared_cpu_map); - pr->performance->shared_type =CPUFREQ_SHARED_TYPE_ALL ; + pr->performance->shared_type =DOMAIN_COORD_TYPE_SW_ALL ; } pr->performance =NULL ;/* Will be set for real in register */ }
pm_core.h piece is missing from the original patch. Please find correct patch attached.
2006/8/23, Eugeny S. Mints <[email protected]>:
Quoted 7 lines
This patch adds support for centrino PM Core and operating points registration module.
Operating points registration module uses hardcoded values or values retrieved from ACPI to register operating points using PowerOP interface. The module is completely independent from either cpufreq or centrino PM Core.
Quoted 8 lines
PM Core defines power parameter for the platform and handles all hw related steps to set system to an operating point or retrieve a power parameter value.
Both files are no longer belong to cpufreq and should be removed from cpufreq folder but were left there to simplify investigation of the diff.
arch/i386/Kconfig +12 -0
@@ -814,6 +814,18 @@ source kernel/power/Kconfig source "drivers/acpi/Kconfig" +menu "PM Core" + +config PM_CORE + tristate "PM Core" + depends POWEROP + help + This enables i386 PM Core to control platform freq/voltage via + PowerOP interface + +endmenu + + menu "APM (Advanced Power Management) BIOS Support" depends on PM && !X86_VISWS
arch/i386/kernel/cpu/cpufreq/Kconfig +3 -9
@@ -106,17 +106,11 @@ config X86_GX_SUSPMOD If in doubt, say N. config X86_SPEEDSTEP_CENTRINO - tristate "Intel Enhanced SpeedStep" - select CPU_FREQ_TABLE + tristate "SpeedStep operatin points registration" + depends on POWEROP select X86_SPEEDSTEP_CENTRINO_TABLE if (!X86_SPEEDSTEP_CENTRINO_ACPI) help - 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. - - For details, take a look at <file:Documentation/cpu-freq/>. + Opeatin points registration module for SpeedStep Centrino If in doubt, say N.
arch/i386/kernel/cpu/cpufreq/Makefile +1 -0
@@ -8,6 +8,7 @@ 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_CENTRINO) += speedstep-centrino.o +obj-$(CONFIG_PM_CORE) += speedstep-centrino-pm_core.o obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o obj-$(CONFIG_X86_SPEEDSTEP_SMI) += speedstep-smi.o obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o
arch/i386/kernel/cpu/cpufreq/speedstep-centrino-pm_core.c new file +644 -0
644 lines not on this page · raw message
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +176 -505
896 lines not on this page · raw message
drivers/acpi/processor_perflib.c +3 -7
@@ -682,12 +682,8 @@ int acpi_processor_preregister_performan/* Validate the Domain info */ count_target = pdomain->num_processors; count =1 ; -if (pdomain->coord_type ==DOMAIN_COORD_TYPE_SW_ALL ) - pr->performance->shared_type =CPUFREQ_SHARED_TYPE_ALL ; -else if (pdomain->coord_type ==DOMAIN_COORD_TYPE_HW_ALL ) - pr->performance->shared_type =CPUFREQ_SHARED_TYPE_HW ; -else if (pdomain->coord_type ==DOMAIN_COORD_TYPE_SW_ANY ) - pr->performance->shared_type =CPUFREQ_SHARED_TYPE_ANY ; + + pr->performance->shared_type = pdomain->coord_type;for_each_possible_cpu (j) {if (i == j)
@@ -751,7 +747,7 @@ err_ret:if (retval) {cpus_clear (pr->performance->shared_cpu_map);cpu_set (i, pr->performance->shared_cpu_map); - pr->performance->shared_type =CPUFREQ_SHARED_TYPE_ALL ; + pr->performance->shared_type =DOMAIN_COORD_TYPE_SW_ALL ; } pr->performance =NULL ;/* Will be set for real in register */ }
include/asm-i386/pm_core.h new file +72 -0
72 lines not on this page · raw message