diff options
author | Dave Jones <davej@redhat.com> | 2009-01-17 23:32:50 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-02-24 22:47:29 -0500 |
commit | 48ee923a666d4cc54e48d55fc573c57492501122 (patch) | |
tree | f368dd403c7020145737af1ba4b71a8f9f669859 /arch/x86/kernel/cpu/cpufreq | |
parent | ac617bd0f7b959dc6708ad2f0d6b9dcf4382f1ed (diff) |
[CPUFREQ] checkpatch cleanups for longrun
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/longrun.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index 777a7ff075d..da5f70fcb76 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c | |||
@@ -11,12 +11,13 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/cpufreq.h> | 13 | #include <linux/cpufreq.h> |
14 | #include <linux/timex.h> | ||
14 | 15 | ||
15 | #include <asm/msr.h> | 16 | #include <asm/msr.h> |
16 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
17 | #include <asm/timex.h> | ||
18 | 18 | ||
19 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longrun", msg) | 19 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ |
20 | "longrun", msg) | ||
20 | 21 | ||
21 | static struct cpufreq_driver longrun_driver; | 22 | static struct cpufreq_driver longrun_driver; |
22 | 23 | ||
@@ -51,7 +52,7 @@ static void __init longrun_get_policy(struct cpufreq_policy *policy) | |||
51 | msr_lo &= 0x0000007F; | 52 | msr_lo &= 0x0000007F; |
52 | msr_hi &= 0x0000007F; | 53 | msr_hi &= 0x0000007F; |
53 | 54 | ||
54 | if ( longrun_high_freq <= longrun_low_freq ) { | 55 | if (longrun_high_freq <= longrun_low_freq) { |
55 | /* Assume degenerate Longrun table */ | 56 | /* Assume degenerate Longrun table */ |
56 | policy->min = policy->max = longrun_high_freq; | 57 | policy->min = policy->max = longrun_high_freq; |
57 | } else { | 58 | } else { |
@@ -79,7 +80,7 @@ static int longrun_set_policy(struct cpufreq_policy *policy) | |||
79 | if (!policy) | 80 | if (!policy) |
80 | return -EINVAL; | 81 | return -EINVAL; |
81 | 82 | ||
82 | if ( longrun_high_freq <= longrun_low_freq ) { | 83 | if (longrun_high_freq <= longrun_low_freq) { |
83 | /* Assume degenerate Longrun table */ | 84 | /* Assume degenerate Longrun table */ |
84 | pctg_lo = pctg_hi = 100; | 85 | pctg_lo = pctg_hi = 100; |
85 | } else { | 86 | } else { |
@@ -152,7 +153,7 @@ static unsigned int longrun_get(unsigned int cpu) | |||
152 | cpuid(0x80860007, &eax, &ebx, &ecx, &edx); | 153 | cpuid(0x80860007, &eax, &ebx, &ecx, &edx); |
153 | dprintk("cpuid eax is %u\n", eax); | 154 | dprintk("cpuid eax is %u\n", eax); |
154 | 155 | ||
155 | return (eax * 1000); | 156 | return eax * 1000; |
156 | } | 157 | } |
157 | 158 | ||
158 | /** | 159 | /** |
@@ -196,7 +197,8 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, | |||
196 | rdmsr(MSR_TMTA_LRTI_VOLT_MHZ, msr_lo, msr_hi); | 197 | rdmsr(MSR_TMTA_LRTI_VOLT_MHZ, msr_lo, msr_hi); |
197 | *high_freq = msr_lo * 1000; /* to kHz */ | 198 | *high_freq = msr_lo * 1000; /* to kHz */ |
198 | 199 | ||
199 | dprintk("longrun table interface told %u - %u kHz\n", *low_freq, *high_freq); | 200 | dprintk("longrun table interface told %u - %u kHz\n", |
201 | *low_freq, *high_freq); | ||
200 | 202 | ||
201 | if (*low_freq > *high_freq) | 203 | if (*low_freq > *high_freq) |
202 | *low_freq = *high_freq; | 204 | *low_freq = *high_freq; |
@@ -219,7 +221,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, | |||
219 | cpuid(0x80860007, &eax, &ebx, &ecx, &edx); | 221 | cpuid(0x80860007, &eax, &ebx, &ecx, &edx); |
220 | /* try decreasing in 10% steps, some processors react only | 222 | /* try decreasing in 10% steps, some processors react only |
221 | * on some barrier values */ | 223 | * on some barrier values */ |
222 | for (try_hi = 80; try_hi > 0 && ecx > 90; try_hi -=10) { | 224 | for (try_hi = 80; try_hi > 0 && ecx > 90; try_hi -= 10) { |
223 | /* set to 0 to try_hi perf_pctg */ | 225 | /* set to 0 to try_hi perf_pctg */ |
224 | msr_lo &= 0xFFFFFF80; | 226 | msr_lo &= 0xFFFFFF80; |
225 | msr_hi &= 0xFFFFFF80; | 227 | msr_hi &= 0xFFFFFF80; |
@@ -236,7 +238,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, | |||
236 | 238 | ||
237 | /* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq) | 239 | /* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq) |
238 | * eqals | 240 | * eqals |
239 | * low_freq * ( 1 - perf_pctg) = (cur_freq - high_freq * perf_pctg) | 241 | * low_freq * (1 - perf_pctg) = (cur_freq - high_freq * perf_pctg) |
240 | * | 242 | * |
241 | * high_freq * perf_pctg is stored tempoarily into "ebx". | 243 | * high_freq * perf_pctg is stored tempoarily into "ebx". |
242 | */ | 244 | */ |
@@ -317,9 +319,10 @@ static void __exit longrun_exit(void) | |||
317 | } | 319 | } |
318 | 320 | ||
319 | 321 | ||
320 | MODULE_AUTHOR ("Dominik Brodowski <linux@brodo.de>"); | 322 | MODULE_AUTHOR("Dominik Brodowski <linux@brodo.de>"); |
321 | MODULE_DESCRIPTION ("LongRun driver for Transmeta Crusoe and Efficeon processors."); | 323 | MODULE_DESCRIPTION("LongRun driver for Transmeta Crusoe and " |
322 | MODULE_LICENSE ("GPL"); | 324 | "Efficeon processors."); |
325 | MODULE_LICENSE("GPL"); | ||
323 | 326 | ||
324 | module_init(longrun_init); | 327 | module_init(longrun_init); |
325 | module_exit(longrun_exit); | 328 | module_exit(longrun_exit); |