Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
3a58df35
Commit
3a58df35
authored
Jan 17, 2009
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] checkpatch cleanups for acpi-cpufreq
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
79cc56af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+18
-18
No files found.
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
View file @
3a58df35
/*
* acpi-cpufreq.c - ACPI Processor P-States Driver
($Revision: 1.4 $)
* acpi-cpufreq.c - ACPI Processor P-States Driver
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
...
@@ -36,16 +36,18 @@
#include <linux/ftrace.h>
#include <linux/acpi.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/uaccess.h>
#include <acpi/processor.h>
#include <asm/io.h>
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpufeature.h>
#include <asm/delay.h>
#include <asm/uaccess.h>
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "acpi-cpufreq", msg)
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
"acpi-cpufreq", msg)
MODULE_AUTHOR
(
"Paul Diefenbaugh, Dominik Brodowski"
);
MODULE_DESCRIPTION
(
"ACPI Processor P-States Driver"
);
...
...
@@ -95,7 +97,7 @@ static unsigned extract_io(u32 value, struct acpi_cpufreq_data *data)
perf
=
data
->
acpi_data
;
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
if
(
value
==
perf
->
states
[
i
].
status
)
return
data
->
freq_table
[
i
].
frequency
;
}
...
...
@@ -110,7 +112,7 @@ static unsigned extract_msr(u32 msr, struct acpi_cpufreq_data *data)
msr
&=
INTEL_MSR_RANGE
;
perf
=
data
->
acpi_data
;
for
(
i
=
0
;
data
->
freq_table
[
i
].
frequency
!=
CPUFREQ_TABLE_END
;
i
++
)
{
for
(
i
=
0
;
data
->
freq_table
[
i
].
frequency
!=
CPUFREQ_TABLE_END
;
i
++
)
{
if
(
msr
==
perf
->
states
[
data
->
freq_table
[
i
].
index
].
status
)
return
data
->
freq_table
[
i
].
frequency
;
}
...
...
@@ -138,15 +140,13 @@ struct io_addr {
u8
bit_width
;
};
typedef
union
{
struct
msr_addr
msr
;
struct
io_addr
io
;
}
drv_addr_union
;
struct
drv_cmd
{
unsigned
int
type
;
const
struct
cpumask
*
mask
;
drv_addr_union
addr
;
union
{
struct
msr_addr
msr
;
struct
io_addr
io
;
}
addr
;
u32
val
;
};
...
...
@@ -369,7 +369,7 @@ static unsigned int check_freqs(const struct cpumask *mask, unsigned int freq,
unsigned
int
cur_freq
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
100
;
i
++
)
{
for
(
i
=
0
;
i
<
100
;
i
++
)
{
cur_freq
=
extract_freq
(
get_cur_val
(
mask
),
data
);
if
(
cur_freq
==
freq
)
return
1
;
...
...
@@ -494,7 +494,7 @@ acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, unsigned int cpu)
unsigned
long
freq
;
unsigned
long
freqn
=
perf
->
states
[
0
].
core_frequency
*
1000
;
for
(
i
=
0
;
i
<
(
perf
->
state_count
-
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
perf
->
state_count
-
1
);
i
++
)
{
freq
=
freqn
;
freqn
=
perf
->
states
[
i
+
1
].
core_frequency
*
1000
;
if
((
2
*
cpu_khz
)
>
(
freqn
+
freq
))
{
...
...
@@ -673,7 +673,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
/* detect transition latency */
policy
->
cpuinfo
.
transition_latency
=
0
;
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
if
((
perf
->
states
[
i
].
transition_latency
*
1000
)
>
policy
->
cpuinfo
.
transition_latency
)
policy
->
cpuinfo
.
transition_latency
=
...
...
@@ -682,8 +682,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
data
->
max_freq
=
perf
->
states
[
0
].
core_frequency
*
1000
;
/* table init */
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
if
(
i
>
0
&&
perf
->
states
[
i
].
core_frequency
>=
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
if
(
i
>
0
&&
perf
->
states
[
i
].
core_frequency
>=
data
->
freq_table
[
valid_states
-
1
].
frequency
/
1000
)
continue
;
...
...
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