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
nexedi
linux
Commits
76374783
Commit
76374783
authored
Sep 04, 2003
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Clean up clock_ratio calculation.
parent
2798b95d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
arch/i386/kernel/cpu/cpufreq/longhaul.c
arch/i386/kernel/cpu/cpufreq/longhaul.c
+8
-6
No files found.
arch/i386/kernel/cpu/cpufreq/longhaul.c
View file @
76374783
...
@@ -303,10 +303,10 @@ static void longhaul_setstate (unsigned int clock_ratio_index)
...
@@ -303,10 +303,10 @@ static void longhaul_setstate (unsigned int clock_ratio_index)
union
msr_longhaul
longhaul
;
union
msr_longhaul
longhaul
;
union
msr_bcr2
bcr2
;
union
msr_bcr2
bcr2
;
if
(
clock_ratio
[
clock_ratio_index
]
==
-
1
)
mult
=
clock_ratio
[
clock_ratio_index
];
if
(
mult
==
-
1
)
return
;
return
;
mult
=
clock_ratio
[
clock_ratio_index
];
speed
=
calc_speed
(
mult
,
fsb
);
speed
=
calc_speed
(
mult
,
fsb
);
if
((
speed
>
highest_speed
)
||
(
speed
<
lowest_speed
))
if
((
speed
>
highest_speed
)
||
(
speed
<
lowest_speed
))
return
;
return
;
...
@@ -450,12 +450,14 @@ static int __init longhaul_get_ranges (void)
...
@@ -450,12 +450,14 @@ static int __init longhaul_get_ranges (void)
if
(
!
longhaul_table
)
if
(
!
longhaul_table
)
return
-
ENOMEM
;
return
-
ENOMEM
;
for
(
j
=
0
;
(
j
<
numscales
);
j
++
)
{
for
(
j
=
0
;
j
<
numscales
;
j
++
)
{
if
(
clock_ratio
[
j
]
==
-
1
)
unsigned
int
ratio
;
ratio
=
clock_ratio
[
j
];
if
(
ratio
==
-
1
)
continue
;
continue
;
if
(
((
unsigned
int
)
clock_ratio
[
j
]
>
maxmult
)
||
((
unsigned
int
)
clock_ratio
[
j
]
<
minmult
)
)
if
(
ratio
>
maxmult
||
ratio
<
minmult
)
continue
;
continue
;
longhaul_table
[
k
].
frequency
=
calc_speed
(
clock_ratio
[
j
]
,
fsb
);
longhaul_table
[
k
].
frequency
=
calc_speed
(
ratio
,
fsb
);
longhaul_table
[
k
].
index
=
(
j
<<
8
);
longhaul_table
[
k
].
index
=
(
j
<<
8
);
k
++
;
k
++
;
}
}
...
...
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