cpufreq: Remove unused APERF/MPERF support
Subsystems (2)
PATCH v3 2/3 cpufreq: Remove unused APERF/MPERF support
Calculation of target frequency in ondemand governor changed and it is independent from measured average frequency.
Remove unused APERF/MPERF support.
Signed-off-by Stratos Karafotis <[email protected]>
--- arch/x86/include/asm/processor.h | 29 ----------------------- drivers/cpufreq/Makefile | 2 +- drivers/cpufreq/acpi-cpufreq.c | 5 ---- drivers/cpufreq/mperf.c | 51 ---------------------------------------- drivers/cpufreq/mperf.h | 9 ------- 5 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 drivers/cpufreq/mperf.c delete mode 100644 drivers/cpufreq/mperf.h
arch/x86/include/asm/processor.h +0 -29
@@ -941,35 +941,6 @@ extern int set_tsc_mode(unsigned int val);extern u16 amd_get_nb_id (int cpu); -struct aperfmperf { -u64 aperf, mperf; -}; - -static inline void get_aperfmperf (struct aperfmperf *am) -{ -WARN_ON_ONCE (!boot_cpu_has (X86_FEATURE_APERFMPERF )); - -rdmsrl (MSR_IA32_APERF , am->aperf); -rdmsrl (MSR_IA32_MPERF , am->mperf); -} - -#define APERFMPERF_SHIFT 10 - -static inline -unsigned long calc_aperfmperf_ratio (struct aperfmperf *old, -struct aperfmperf *new) -{ -u64 aperf = new->aperf - old->aperf; -u64 mperf = new->mperf - old->mperf; -unsigned long ratio = aperf; - - mperf >>=APERFMPERF_SHIFT ; -if (mperf) - ratio =div64_u64 (aperf, mperf); - -return ratio; -} -extern unsigned long arch_align_stack (unsigned long sp);extern void free_init_pages (char *what,unsigned long begin,unsigned long end);
drivers/cpufreq/Makefile +1 -1
@@ -23,7 +23,7 @@ obj-$(CONFIG_GENERIC_CPUFREQ_CPU0) += cpufreq-cpu0.o # powernow-k8 can load then. ACPI is preferred to all other hardware-specific drivers. # speedstep-* is preferred over p4-clockmod. -obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o mperf.o +obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o obj-$(CONFIG_X86_PCC_CPUFREQ) += pcc-cpufreq.o obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o
drivers/cpufreq/acpi-cpufreq.c +0 -5
@@ -45,7 +45,6 @@#include <asm/msr.h> #include <asm/processor.h> #include <asm/cpufeature.h> -#include "mperf.h" MODULE_AUTHOR ("Paul Diefenbaugh, Dominik Brodowski" );MODULE_DESCRIPTION ("ACPI Processor P-States Driver" );
@@ -842,10 +841,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)/* notify BIOS that we exist */ acpi_processor_notify_smm (THIS_MODULE ); -/* Check for APERF/MPERF support in hardware */ -if (boot_cpu_has (X86_FEATURE_APERFMPERF )) - acpi_cpufreq_driver.getavg = cpufreq_get_measured_perf; -pr_debug ("CPU%u - ACPI performance management activated.\n" , cpu);for (i =0 ; i < perf->state_count; i++) pr_debug(" %cP%d: %d MHz, %d mW, %d uS\n",
drivers/cpufreq/mperf.c deleted +0 -51
51 lines not on this page · raw message
drivers/cpufreq/mperf.h deleted +0 -9
@@ -1,9 +0,0 @@ -/* -* (c) 2010 Advanced Micro Devices, Inc. -* Your use of this code is subject to the terms and conditions of the -* GNU general public license version 2. See "COPYING" or -* http://www.gnu.org/licenses/gpl.html -*/ - -unsigned int cpufreq_get_measured_perf (struct cpufreq_policy *policy, -unsigned int cpu);
Signature · 1 line
1.8.1.4