forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/…
…davej/cpufreq * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: (35 commits) [CPUFREQ] Prevent p4-clockmod from auto-binding to the ondemand governor. [CPUFREQ] Make cpufreq-nforce2 less obnoxious [CPUFREQ] p4-clockmod reports wrong frequency. [CPUFREQ] powernow-k8: Use a common exit path. [CPUFREQ] Change link order of x86 cpufreq modules [CPUFREQ] conservative: remove 10x from def_sampling_rate [CPUFREQ] conservative: fixup governor to function more like ondemand logic [CPUFREQ] conservative: fix dbs_cpufreq_notifier so freq is not locked [CPUFREQ] conservative: amend author's email address [CPUFREQ] Use swap() in longhaul.c [CPUFREQ] checkpatch cleanups for acpi-cpufreq [CPUFREQ] powernow-k8: Only print error message once, not per core. [CPUFREQ] ondemand/conservative: sanitize sampling_rate restrictions [CPUFREQ] ondemand/conservative: deprecate sampling_rate{min,max} [CPUFREQ] powernow-k8: Always compile powernow-k8 driver with ACPI support [CPUFREQ] Introduce /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_transition_latency [CPUFREQ] checkpatch cleanups for powernow-k8 [CPUFREQ] checkpatch cleanups for ondemand governor. [CPUFREQ] checkpatch cleanups for powernow-k7 [CPUFREQ] checkpatch cleanups for speedstep related drivers. ...
- Loading branch information
Showing
30 changed files
with
1,372 additions
and
995 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* acpi-cpufreq.c - ACPI Processor P-States Driver ($Revision: 1.4 $) | ||
* acpi-cpufreq.c - ACPI Processor P-States Driver | ||
* | ||
* Copyright (C) 2001, 2002 Andy Grover <[email protected]> | ||
* Copyright (C) 2001, 2002 Paul Diefenbaugh <[email protected]> | ||
|
@@ -36,16 +36,18 @@ | |
#include <linux/ftrace.h> | ||
|
||
#include <linux/acpi.h> | ||
#include <linux/io.h> | ||
#include <linux/delay.h> | ||
#include <linux/uaccess.h> | ||
|
||
#include <acpi/processor.h> | ||
|
||
#include <asm/io.h> | ||
#include <asm/msr.h> | ||
#include <asm/processor.h> | ||
#include <asm/cpufeature.h> | ||
#include <asm/delay.h> | ||
#include <asm/uaccess.h> | ||
|
||
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "acpi-cpufreq", msg) | ||
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
"acpi-cpufreq", msg) | ||
|
||
MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski"); | ||
MODULE_DESCRIPTION("ACPI Processor P-States Driver"); | ||
|
@@ -95,7 +97,7 @@ static unsigned extract_io(u32 value, struct acpi_cpufreq_data *data) | |
|
||
perf = data->acpi_data; | ||
|
||
for (i=0; i<perf->state_count; i++) { | ||
for (i = 0; i < perf->state_count; i++) { | ||
if (value == perf->states[i].status) | ||
return data->freq_table[i].frequency; | ||
} | ||
|
@@ -110,7 +112,7 @@ static unsigned extract_msr(u32 msr, struct acpi_cpufreq_data *data) | |
msr &= INTEL_MSR_RANGE; | ||
perf = data->acpi_data; | ||
|
||
for (i=0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) { | ||
for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) { | ||
if (msr == perf->states[data->freq_table[i].index].status) | ||
return data->freq_table[i].frequency; | ||
} | ||
|
@@ -138,15 +140,13 @@ struct io_addr { | |
u8 bit_width; | ||
}; | ||
|
||
typedef union { | ||
struct msr_addr msr; | ||
struct io_addr io; | ||
} drv_addr_union; | ||
|
||
struct drv_cmd { | ||
unsigned int type; | ||
const struct cpumask *mask; | ||
drv_addr_union addr; | ||
union { | ||
struct msr_addr msr; | ||
struct io_addr io; | ||
} addr; | ||
u32 val; | ||
}; | ||
|
||
|
@@ -369,7 +369,7 @@ static unsigned int check_freqs(const struct cpumask *mask, unsigned int freq, | |
unsigned int cur_freq; | ||
unsigned int i; | ||
|
||
for (i=0; i<100; i++) { | ||
for (i = 0; i < 100; i++) { | ||
cur_freq = extract_freq(get_cur_val(mask), data); | ||
if (cur_freq == freq) | ||
return 1; | ||
|
@@ -494,7 +494,7 @@ acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, unsigned int cpu) | |
unsigned long freq; | ||
unsigned long freqn = perf->states[0].core_frequency * 1000; | ||
|
||
for (i=0; i<(perf->state_count-1); i++) { | ||
for (i = 0; i < (perf->state_count-1); i++) { | ||
freq = freqn; | ||
freqn = perf->states[i+1].core_frequency * 1000; | ||
if ((2 * cpu_khz) > (freqn + freq)) { | ||
|
@@ -673,7 +673,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |
|
||
/* detect transition latency */ | ||
policy->cpuinfo.transition_latency = 0; | ||
for (i=0; i<perf->state_count; i++) { | ||
for (i = 0; i < perf->state_count; i++) { | ||
if ((perf->states[i].transition_latency * 1000) > | ||
policy->cpuinfo.transition_latency) | ||
policy->cpuinfo.transition_latency = | ||
|
@@ -682,8 +682,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |
|
||
data->max_freq = perf->states[0].core_frequency * 1000; | ||
/* table init */ | ||
for (i=0; i<perf->state_count; i++) { | ||
if (i>0 && perf->states[i].core_frequency >= | ||
for (i = 0; i < perf->state_count; i++) { | ||
if (i > 0 && perf->states[i].core_frequency >= | ||
data->freq_table[valid_states-1].frequency / 1000) | ||
continue; | ||
|
||
|
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
Oops, something went wrong.