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
bc301e11
Commit
bc301e11
authored
May 07, 2004
by
Dave Jones
Committed by
Dave Jones
May 07, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Use speedstep_lib's capabilites for ->get() in speedstep-smi.c
parent
6a05c71a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
+17
-3
No files found.
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
View file @
bc301e11
...
@@ -36,6 +36,8 @@ static int smi_port = 0;
...
@@ -36,6 +36,8 @@ static int smi_port = 0;
static
int
smi_cmd
=
0
;
static
int
smi_cmd
=
0
;
static
unsigned
int
smi_sig
=
0
;
static
unsigned
int
smi_sig
=
0
;
/* info about the processor */
static
unsigned
int
speedstep_processor
=
0
;
/*
/*
* There are only two frequency states for each processor. Values
* There are only two frequency states for each processor. Values
...
@@ -258,9 +260,10 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
...
@@ -258,9 +260,10 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
&
speedstep_freqs
[
SPEEDSTEP_HIGH
].
frequency
);
&
speedstep_freqs
[
SPEEDSTEP_HIGH
].
frequency
);
if
(
result
)
{
if
(
result
)
{
/* fall back to speedstep_lib.c dection mechanism: try both states out */
/* fall back to speedstep_lib.c dection mechanism: try both states out */
unsigned
int
speedstep_processor
=
speedstep_detect_processor
();
dprintk
(
KERN_INFO
PFX
"could not detect low and high frequencies by SMI call.
\n
"
);
dprintk
(
KERN_INFO
PFX
"could not detect low and high frequencies by SMI call.
\n
"
);
if
(
!
speedstep_processor
)
speedstep_processor
=
speedstep_detect_processor
();
if
(
!
speedstep_processor
)
if
(
!
speedstep_processor
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -298,13 +301,23 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
...
@@ -298,13 +301,23 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
return
0
;
return
0
;
}
}
static
int
speedstep_cpu_exit
(
struct
cpufreq_policy
*
policy
)
static
int
speedstep_cpu_exit
(
struct
cpufreq_policy
*
policy
)
{
{
cpufreq_frequency_table_put_attr
(
policy
->
cpu
);
cpufreq_frequency_table_put_attr
(
policy
->
cpu
);
return
0
;
return
0
;
}
}
static
unsigned
int
speedstep_get
(
unsigned
int
cpu
)
{
if
(
cpu
)
return
-
ENODEV
;
if
(
!
speedstep_processor
)
speedstep_processor
=
speedstep_detect_processor
();
if
(
!
speedstep_processor
)
return
0
;
return
speedstep_get_processor_frequency
(
speedstep_processor
);
}
static
int
speedstep_resume
(
struct
cpufreq_policy
*
policy
)
static
int
speedstep_resume
(
struct
cpufreq_policy
*
policy
)
{
{
...
@@ -327,6 +340,7 @@ static struct cpufreq_driver speedstep_driver = {
...
@@ -327,6 +340,7 @@ static struct cpufreq_driver speedstep_driver = {
.
target
=
speedstep_target
,
.
target
=
speedstep_target
,
.
init
=
speedstep_cpu_init
,
.
init
=
speedstep_cpu_init
,
.
exit
=
speedstep_cpu_exit
,
.
exit
=
speedstep_cpu_exit
,
.
get
=
speedstep_get
,
.
resume
=
speedstep_resume
,
.
resume
=
speedstep_resume
,
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
attr
=
speedstep_attr
,
.
attr
=
speedstep_attr
,
...
...
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