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
9ae46eef
Commit
9ae46eef
authored
May 16, 2004
by
Dave Jones
Committed by
Dave Jones
May 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Fix several operator precedence bugs.
parent
6ded2df9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
arch/i386/kernel/timers/timer_tsc.c
arch/i386/kernel/timers/timer_tsc.c
+2
-2
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq.c
+1
-1
No files found.
arch/i386/kernel/timers/timer_tsc.c
View file @
9ae46eef
...
@@ -388,13 +388,13 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
...
@@ -388,13 +388,13 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
if
((
val
==
CPUFREQ_PRECHANGE
&&
freq
->
old
<
freq
->
new
)
||
if
((
val
==
CPUFREQ_PRECHANGE
&&
freq
->
old
<
freq
->
new
)
||
(
val
==
CPUFREQ_POSTCHANGE
&&
freq
->
old
>
freq
->
new
)
||
(
val
==
CPUFREQ_POSTCHANGE
&&
freq
->
old
>
freq
->
new
)
||
(
val
==
CPUFREQ_RESUMECHANGE
))
{
(
val
==
CPUFREQ_RESUMECHANGE
))
{
if
(
!
freq
->
flags
&
CPUFREQ_CONST_LOOPS
)
if
(
!
(
freq
->
flags
&
CPUFREQ_CONST_LOOPS
)
)
cpu_data
[
freq
->
cpu
].
loops_per_jiffy
=
cpufreq_scale
(
loops_per_jiffy_ref
,
ref_freq
,
freq
->
new
);
cpu_data
[
freq
->
cpu
].
loops_per_jiffy
=
cpufreq_scale
(
loops_per_jiffy_ref
,
ref_freq
,
freq
->
new
);
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
if
(
cpu_khz
)
if
(
cpu_khz
)
cpu_khz
=
cpufreq_scale
(
cpu_khz_ref
,
ref_freq
,
freq
->
new
);
cpu_khz
=
cpufreq_scale
(
cpu_khz_ref
,
ref_freq
,
freq
->
new
);
if
(
use_tsc
)
{
if
(
use_tsc
)
{
if
(
!
freq
->
flags
&
CPUFREQ_CONST_LOOPS
)
{
if
(
!
(
freq
->
flags
&
CPUFREQ_CONST_LOOPS
)
)
{
fast_gettimeoffset_quotient
=
cpufreq_scale
(
fast_gettimeoffset_ref
,
freq
->
new
,
ref_freq
);
fast_gettimeoffset_quotient
=
cpufreq_scale
(
fast_gettimeoffset_ref
,
freq
->
new
,
ref_freq
);
set_cyc2ns_scale
(
cpu_khz
/
1000
);
set_cyc2ns_scale
(
cpu_khz
/
1000
);
}
}
...
...
drivers/cpufreq/cpufreq.c
View file @
9ae46eef
...
@@ -600,7 +600,7 @@ static int cpufreq_resume(struct sys_device * sysdev)
...
@@ -600,7 +600,7 @@ static int cpufreq_resume(struct sys_device * sysdev)
if
(
!
cpu_policy
)
if
(
!
cpu_policy
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
!
cpufreq_driver
->
flags
&
CPUFREQ_CONST_LOOPS
)
{
if
(
!
(
cpufreq_driver
->
flags
&
CPUFREQ_CONST_LOOPS
)
)
{
unsigned
int
cur_freq
=
0
;
unsigned
int
cur_freq
=
0
;
if
(
cpufreq_driver
->
get
)
if
(
cpufreq_driver
->
get
)
...
...
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