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
5861b2b0
Commit
5861b2b0
authored
Apr 06, 2004
by
Dave Jones
Committed by
Dave Jones
Apr 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] SMP fixes for powernow-k8's check_supported_cpu()
parent
36ac9d1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+21
-20
No files found.
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
View file @
5861b2b0
...
...
@@ -428,52 +428,53 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvi
static
int
check_supported_cpu
(
unsigned
int
cpu
)
{
struct
cpuinfo_x86
*
c
=
cpu_data
;
cpumask_t
oldmask
=
CPU_MASK_ALL
;
u32
eax
,
ebx
,
ecx
,
edx
;
unsigned
int
rc
=
0
;
if
(
num_online_cpus
()
!=
1
)
{
printk
(
KERN_INFO
PFX
"multiprocessor systems not supported
\n
"
);
return
0
;
}
oldmask
=
current
->
cpus_allowed
;
set_cpus_allowed
(
current
,
cpumask_of_cpu
(
cpu
));
schedule
();
if
(
c
->
x86_vendor
!=
X86_VENDOR_AMD
)
{
#ifdef MODULE
printk
(
KERN_INFO
PFX
"Not an AMD processor
\n
"
);
#endif
return
0
;
if
(
smp_processor_id
()
!=
cpu
)
{
printk
(
KERN_ERR
"limiting to cpu %u failed
\n
"
,
cpu
);
goto
out
;
}
if
(
current_cpu_data
.
x86_vendor
!=
X86_VENDOR_AMD
)
goto
out
;
eax
=
cpuid_eax
(
CPUID_PROCESSOR_SIGNATURE
);
if
((
eax
&
CPUID_XFAM_MOD
)
==
ATHLON64_XFAM_MOD
)
{
dprintk
(
KERN_DEBUG
PFX
"AMD Althon 64 Processor found
\n
"
);
if
((
eax
&
CPUID_F1_STEP
)
<
ATHLON64_REV_C0
)
{
printk
(
KERN_INFO
PFX
"Revision C0 or better "
"AMD Athlon 64 processor required
\n
"
);
return
0
;
}
}
else
if
((
eax
&
CPUID_XFAM_MOD
)
==
OPTERON_XFAM_MOD
)
{
dprintk
(
KERN_DEBUG
PFX
"AMD Opteron Processor found
\n
"
);
}
else
{
printk
(
KERN_INFO
PFX
"AMD Athlon 64 or AMD Opteron processor required
\n
"
);
return
0
;
goto
out
;
}
eax
=
cpuid_eax
(
CPUID_GET_MAX_CAPABILITIES
);
if
(
eax
<
CPUID_FREQ_VOLT_CAPABILITIES
)
{
printk
(
KERN_INFO
PFX
"No frequency change capabilities detected
\n
"
);
return
0
;
goto
out
;
}
cpuid
(
CPUID_FREQ_VOLT_CAPABILITIES
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
if
((
edx
&
P_STATE_TRANSITION_CAPABLE
)
!=
P_STATE_TRANSITION_CAPABLE
)
{
printk
(
KERN_INFO
PFX
"Power state transitions not supported
\n
"
);
return
0
;
goto
out
;
}
printk
(
KERN_INFO
PFX
"Found AMD64 processor supporting PowerNow ("
VERSION
")
\n
"
);
return
1
;
rc
=
1
;
out:
set_cpus_allowed
(
current
,
oldmask
);
schedule
();
return
rc
;
}
static
int
check_pst_table
(
struct
powernow_k8_data
*
data
,
struct
pst_s
*
pst
,
u8
maxvid
)
...
...
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