Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
48ee923a
Commit
48ee923a
authored
Jan 17, 2009
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] checkpatch cleanups for longrun
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
ac617bd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
arch/x86/kernel/cpu/cpufreq/longrun.c
arch/x86/kernel/cpu/cpufreq/longrun.c
+14
-11
No files found.
arch/x86/kernel/cpu/cpufreq/longrun.c
View file @
48ee923a
...
@@ -11,12 +11,13 @@
...
@@ -11,12 +11,13 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/cpufreq.h>
#include <linux/cpufreq.h>
#include <linux/timex.h>
#include <asm/msr.h>
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/timex.h>
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longrun", msg)
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
"longrun", msg)
static
struct
cpufreq_driver
longrun_driver
;
static
struct
cpufreq_driver
longrun_driver
;
...
@@ -51,7 +52,7 @@ static void __init longrun_get_policy(struct cpufreq_policy *policy)
...
@@ -51,7 +52,7 @@ static void __init longrun_get_policy(struct cpufreq_policy *policy)
msr_lo
&=
0x0000007F
;
msr_lo
&=
0x0000007F
;
msr_hi
&=
0x0000007F
;
msr_hi
&=
0x0000007F
;
if
(
longrun_high_freq
<=
longrun_low_freq
)
{
if
(
longrun_high_freq
<=
longrun_low_freq
)
{
/* Assume degenerate Longrun table */
/* Assume degenerate Longrun table */
policy
->
min
=
policy
->
max
=
longrun_high_freq
;
policy
->
min
=
policy
->
max
=
longrun_high_freq
;
}
else
{
}
else
{
...
@@ -79,7 +80,7 @@ static int longrun_set_policy(struct cpufreq_policy *policy)
...
@@ -79,7 +80,7 @@ static int longrun_set_policy(struct cpufreq_policy *policy)
if
(
!
policy
)
if
(
!
policy
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
longrun_high_freq
<=
longrun_low_freq
)
{
if
(
longrun_high_freq
<=
longrun_low_freq
)
{
/* Assume degenerate Longrun table */
/* Assume degenerate Longrun table */
pctg_lo
=
pctg_hi
=
100
;
pctg_lo
=
pctg_hi
=
100
;
}
else
{
}
else
{
...
@@ -152,7 +153,7 @@ static unsigned int longrun_get(unsigned int cpu)
...
@@ -152,7 +153,7 @@ static unsigned int longrun_get(unsigned int cpu)
cpuid
(
0x80860007
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
cpuid
(
0x80860007
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
dprintk
(
"cpuid eax is %u
\n
"
,
eax
);
dprintk
(
"cpuid eax is %u
\n
"
,
eax
);
return
(
eax
*
1000
)
;
return
eax
*
1000
;
}
}
/**
/**
...
@@ -196,7 +197,8 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
...
@@ -196,7 +197,8 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
rdmsr
(
MSR_TMTA_LRTI_VOLT_MHZ
,
msr_lo
,
msr_hi
);
rdmsr
(
MSR_TMTA_LRTI_VOLT_MHZ
,
msr_lo
,
msr_hi
);
*
high_freq
=
msr_lo
*
1000
;
/* to kHz */
*
high_freq
=
msr_lo
*
1000
;
/* to kHz */
dprintk
(
"longrun table interface told %u - %u kHz
\n
"
,
*
low_freq
,
*
high_freq
);
dprintk
(
"longrun table interface told %u - %u kHz
\n
"
,
*
low_freq
,
*
high_freq
);
if
(
*
low_freq
>
*
high_freq
)
if
(
*
low_freq
>
*
high_freq
)
*
low_freq
=
*
high_freq
;
*
low_freq
=
*
high_freq
;
...
@@ -219,7 +221,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
...
@@ -219,7 +221,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
cpuid
(
0x80860007
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
cpuid
(
0x80860007
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
/* try decreasing in 10% steps, some processors react only
/* try decreasing in 10% steps, some processors react only
* on some barrier values */
* on some barrier values */
for
(
try_hi
=
80
;
try_hi
>
0
&&
ecx
>
90
;
try_hi
-=
10
)
{
for
(
try_hi
=
80
;
try_hi
>
0
&&
ecx
>
90
;
try_hi
-=
10
)
{
/* set to 0 to try_hi perf_pctg */
/* set to 0 to try_hi perf_pctg */
msr_lo
&=
0xFFFFFF80
;
msr_lo
&=
0xFFFFFF80
;
msr_hi
&=
0xFFFFFF80
;
msr_hi
&=
0xFFFFFF80
;
...
@@ -236,7 +238,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
...
@@ -236,7 +238,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
/* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq)
/* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq)
* eqals
* eqals
* low_freq * (
1 - perf_pctg) = (cur_freq - high_freq * perf_pctg)
* low_freq * (1 - perf_pctg) = (cur_freq - high_freq * perf_pctg)
*
*
* high_freq * perf_pctg is stored tempoarily into "ebx".
* high_freq * perf_pctg is stored tempoarily into "ebx".
*/
*/
...
@@ -317,9 +319,10 @@ static void __exit longrun_exit(void)
...
@@ -317,9 +319,10 @@ static void __exit longrun_exit(void)
}
}
MODULE_AUTHOR
(
"Dominik Brodowski <linux@brodo.de>"
);
MODULE_AUTHOR
(
"Dominik Brodowski <linux@brodo.de>"
);
MODULE_DESCRIPTION
(
"LongRun driver for Transmeta Crusoe and Efficeon processors."
);
MODULE_DESCRIPTION
(
"LongRun driver for Transmeta Crusoe and "
MODULE_LICENSE
(
"GPL"
);
"Efficeon processors."
);
MODULE_LICENSE
(
"GPL"
);
module_init
(
longrun_init
);
module_init
(
longrun_init
);
module_exit
(
longrun_exit
);
module_exit
(
longrun_exit
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment