Skip to contentSkip to conversation

cpufreq: Remove unused APERF/MPERF support

PATCH New Stratos Karafotis 1 participant 1 message Jun 3, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 3/3 cpufreq: Remove unused APERF/MPERF support

Calculation of frequency target in ondemand governor changed and it is independent from measured average frequency.

Remove unused APERF/MPERF support.

---
 arch/x86/include/asm/processor.h | 29 -----------------------
 drivers/cpufreq/mperf.c          | 51 ----------------------------------------
 drivers/cpufreq/mperf.h          |  9 -------
 3 files changed, 89 deletions(-)
 delete mode 100644 drivers/cpufreq/mperf.c
 delete mode 100644 drivers/cpufreq/mperf.h
arch/x86/include/asm/processor.h +0 -29
index 22224b3..2874a3b 100644
@@ -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/mperf.c deleted +0 -51

51 lines not on this page · raw message

drivers/cpufreq/mperf.h deleted +0 -9
deleted file mode 100644
index 5dbf295..0000000
@@ -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