-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linu…
…x/kernel/git/tip/linux-2.6-tip * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, hypervisor: add missing <linux/module.h> Modify the VMware balloon driver for the new x86_hyper API x86, hypervisor: Export the x86_hyper* symbols x86: Clean up the hypervisor layer x86, HyperV: fix up the license to mshyperv.c x86: Detect running on a Microsoft HyperV system x86, cpu: Make APERF/MPERF a normal table-driven flag x86, k8: Fix build error when K8_NB is disabled x86, cacheinfo: Disable index in all four subcaches x86, cacheinfo: Make L3 cache info per node x86, cacheinfo: Reorganize AMD L3 cache structure x86, cacheinfo: Turn off L3 cache index disable feature in virtualized environments x86, cacheinfo: Unify AMD L3 cache index disable checking cpufreq: Unify sysfs attribute definition macros powernow-k8: Fix frequency reporting x86, cpufreq: Add APERF/MPERF support for AMD processors x86: Unify APERF/MPERF support powernow-k8: Add core performance boost support x86, cpu: Add AMD core boosting feature flag to /proc/cpuinfo Fix up trivial conflicts in arch/x86/kernel/cpu/intel_cacheinfo.c and drivers/cpufreq/cpufreq_ondemand.c
- Loading branch information
Showing
24 changed files
with
591 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef _ASM_X86_MSHYPER_H | ||
#define _ASM_X86_MSHYPER_H | ||
|
||
#include <linux/types.h> | ||
#include <asm/hyperv.h> | ||
|
||
struct ms_hyperv_info { | ||
u32 features; | ||
u32 hints; | ||
}; | ||
|
||
extern struct ms_hyperv_info ms_hyperv; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#include <linux/kernel.h> | ||
#include <linux/smp.h> | ||
#include <linux/module.h> | ||
#include <linux/init.h> | ||
#include <linux/cpufreq.h> | ||
#include <linux/slab.h> | ||
|
||
#include "mperf.h" | ||
|
||
static DEFINE_PER_CPU(struct aperfmperf, acfreq_old_perf); | ||
|
||
/* Called via smp_call_function_single(), on the target CPU */ | ||
static void read_measured_perf_ctrs(void *_cur) | ||
{ | ||
struct aperfmperf *am = _cur; | ||
|
||
get_aperfmperf(am); | ||
} | ||
|
||
/* | ||
* Return the measured active (C0) frequency on this CPU since last call | ||
* to this function. | ||
* Input: cpu number | ||
* Return: Average CPU frequency in terms of max frequency (zero on error) | ||
* | ||
* We use IA32_MPERF and IA32_APERF MSRs to get the measured performance | ||
* over a period of time, while CPU is in C0 state. | ||
* IA32_MPERF counts at the rate of max advertised frequency | ||
* IA32_APERF counts at the rate of actual CPU frequency | ||
* Only IA32_APERF/IA32_MPERF ratio is architecturally defined and | ||
* no meaning should be associated with absolute values of these MSRs. | ||
*/ | ||
unsigned int cpufreq_get_measured_perf(struct cpufreq_policy *policy, | ||
unsigned int cpu) | ||
{ | ||
struct aperfmperf perf; | ||
unsigned long ratio; | ||
unsigned int retval; | ||
|
||
if (smp_call_function_single(cpu, read_measured_perf_ctrs, &perf, 1)) | ||
return 0; | ||
|
||
ratio = calc_aperfmperf_ratio(&per_cpu(acfreq_old_perf, cpu), &perf); | ||
per_cpu(acfreq_old_perf, cpu) = perf; | ||
|
||
retval = (policy->cpuinfo.max_freq * ratio) >> APERFMPERF_SHIFT; | ||
|
||
return retval; | ||
} | ||
EXPORT_SYMBOL_GPL(cpufreq_get_measured_perf); | ||
MODULE_LICENSE("GPL"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* (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); |
Oops, something went wrong.