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
10de3fe5
Commit
10de3fe5
authored
Jun 04, 2004
by
Dave Jones
Committed by
Dave Jones
Jun 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Unify the EBLCR parsing code in longhaul.
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
4d20dcd2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
25 deletions
+11
-25
arch/i386/kernel/cpu/cpufreq/longhaul.c
arch/i386/kernel/cpu/cpufreq/longhaul.c
+11
-25
No files found.
arch/i386/kernel/cpu/cpufreq/longhaul.c
View file @
10de3fe5
...
...
@@ -230,7 +230,8 @@ static int __init longhaul_get_ranges (void)
unsigned
int
j
,
k
=
0
;
union
msr_longhaul
longhaul
;
unsigned
long
lo
,
hi
;
unsigned
int
eblcr_fsb_table
[]
=
{
66
,
133
,
100
,
-
1
};
unsigned
int
eblcr_fsb_table_v1
[]
=
{
66
,
133
,
100
,
-
1
};
unsigned
int
eblcr_fsb_table_v2
[]
=
{
133
,
100
,
-
1
,
66
};
switch
(
longhaul_version
)
{
case
1
:
...
...
@@ -241,7 +242,7 @@ static int __init longhaul_get_ranges (void)
rdmsr
(
MSR_IA32_EBL_CR_POWERON
,
lo
,
hi
);
invalue
=
(
lo
&
(
1
<<
18
|
1
<<
19
))
>>
18
;
if
(
c
->
x86_model
==
6
)
fsb
=
eblcr_fsb_table
[
invalue
];
fsb
=
eblcr_fsb_table
_v1
[
invalue
];
else
fsb
=
guess_fsb
(
maxmult
);
break
;
...
...
@@ -260,16 +261,7 @@ static int __init longhaul_get_ranges (void)
else
minmult
=
multipliers
[
invalue
];
switch
(
longhaul
.
bits
.
MaxMHzFSB
)
{
case
0x0
:
fsb
=
133
;
break
;
case
0x1
:
fsb
=
100
;
break
;
case
0x2
:
printk
(
KERN_INFO
PFX
"Invalid (reserved) FSB!
\n
"
);
return
-
EINVAL
;
case
0x3
:
fsb
=
66
;
break
;
}
fsb
=
eblcr_fsb_table_v2
[
longhaul
.
bits
.
MaxMHzFSB
];
break
;
case
4
:
...
...
@@ -289,20 +281,14 @@ static int __init longhaul_get_ranges (void)
minmult
=
50
;
maxmult
=
longhaul_get_cpu_mult
();
dprintk
(
KERN_INFO
PFX
" maxmult: %d
\n
"
,
maxmult
);
switch
(
longhaul
.
bits
.
MaxMHzFSB
)
{
case
0x0
:
fsb
=
133
;
break
;
case
0x1
:
fsb
=
100
;
break
;
case
0x2
:
printk
(
KERN_INFO
PFX
"Invalid (reserved) FSB!
\n
"
);
return
-
EINVAL
;
case
0x3
:
fsb
=
66
;
dprintk
(
KERN_INFO
PFX
"maxmult: %d
\n
"
,
maxmult
);
fsb
=
eblcr_fsb_table_v2
[
longhaul
.
bits
.
MaxMHzFSB
];
break
;
}
break
;
if
(
fsb
==
-
1
)
{
printk
(
KERN_INFO
PFX
"Invalid (reserved) FSB!
\n
"
);
return
-
EINVAL
;
}
dprintk
(
KERN_INFO
PFX
"MinMult=%d.%dx MaxMult=%d.%dx
\n
"
,
...
...
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