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
c49a089c
Commit
c49a089c
authored
Aug 14, 2013
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back earlier 'pm-cpufreq' material
parents
d4e4ab86
3de9bdeb
Changes
52
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
635 additions
and
806 deletions
+635
-806
Documentation/cpu-freq/cpu-drivers.txt
Documentation/cpu-freq/cpu-drivers.txt
+0
-2
arch/x86/include/asm/processor.h
arch/x86/include/asm/processor.h
+0
-29
drivers/cpufreq/Makefile
drivers/cpufreq/Makefile
+1
-1
drivers/cpufreq/acpi-cpufreq.c
drivers/cpufreq/acpi-cpufreq.c
+2
-8
drivers/cpufreq/at32ap-cpufreq.c
drivers/cpufreq/at32ap-cpufreq.c
+0
-1
drivers/cpufreq/blackfin-cpufreq.c
drivers/cpufreq/blackfin-cpufreq.c
+0
-1
drivers/cpufreq/cpufreq-nforce2.c
drivers/cpufreq/cpufreq-nforce2.c
+0
-1
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq.c
+399
-323
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_conservative.c
+1
-13
drivers/cpufreq/cpufreq_governor.c
drivers/cpufreq/cpufreq_governor.c
+1
-15
drivers/cpufreq/cpufreq_governor.h
drivers/cpufreq/cpufreq_governor.h
+3
-5
drivers/cpufreq/cpufreq_ondemand.c
drivers/cpufreq/cpufreq_ondemand.c
+14
-49
drivers/cpufreq/cpufreq_performance.c
drivers/cpufreq/cpufreq_performance.c
+1
-2
drivers/cpufreq/cpufreq_powersave.c
drivers/cpufreq/cpufreq_powersave.c
+1
-2
drivers/cpufreq/cpufreq_stats.c
drivers/cpufreq/cpufreq_stats.c
+8
-23
drivers/cpufreq/cris-artpec3-cpufreq.c
drivers/cpufreq/cris-artpec3-cpufreq.c
+0
-1
drivers/cpufreq/cris-etraxfs-cpufreq.c
drivers/cpufreq/cris-etraxfs-cpufreq.c
+0
-1
drivers/cpufreq/e_powersaver.c
drivers/cpufreq/e_powersaver.c
+2
-3
drivers/cpufreq/elanfreq.c
drivers/cpufreq/elanfreq.c
+0
-1
drivers/cpufreq/exynos-cpufreq.c
drivers/cpufreq/exynos-cpufreq.c
+1
-1
drivers/cpufreq/freq_table.c
drivers/cpufreq/freq_table.c
+1
-3
drivers/cpufreq/gx-suspmod.c
drivers/cpufreq/gx-suspmod.c
+1
-2
drivers/cpufreq/ia64-acpi-cpufreq.c
drivers/cpufreq/ia64-acpi-cpufreq.c
+2
-3
drivers/cpufreq/intel_pstate.c
drivers/cpufreq/intel_pstate.c
+0
-1
drivers/cpufreq/kirkwood-cpufreq.c
drivers/cpufreq/kirkwood-cpufreq.c
+0
-1
drivers/cpufreq/longhaul.c
drivers/cpufreq/longhaul.c
+0
-1
drivers/cpufreq/longrun.c
drivers/cpufreq/longrun.c
+0
-1
drivers/cpufreq/loongson2_cpufreq.c
drivers/cpufreq/loongson2_cpufreq.c
+0
-1
drivers/cpufreq/maple-cpufreq.c
drivers/cpufreq/maple-cpufreq.c
+0
-1
drivers/cpufreq/mperf.c
drivers/cpufreq/mperf.c
+0
-51
drivers/cpufreq/mperf.h
drivers/cpufreq/mperf.h
+0
-9
drivers/cpufreq/p4-clockmod.c
drivers/cpufreq/p4-clockmod.c
+0
-1
drivers/cpufreq/pasemi-cpufreq.c
drivers/cpufreq/pasemi-cpufreq.c
+0
-1
drivers/cpufreq/pcc-cpufreq.c
drivers/cpufreq/pcc-cpufreq.c
+0
-1
drivers/cpufreq/pmac32-cpufreq.c
drivers/cpufreq/pmac32-cpufreq.c
+0
-1
drivers/cpufreq/pmac64-cpufreq.c
drivers/cpufreq/pmac64-cpufreq.c
+2
-4
drivers/cpufreq/powernow-k6.c
drivers/cpufreq/powernow-k6.c
+0
-1
drivers/cpufreq/powernow-k7.c
drivers/cpufreq/powernow-k7.c
+6
-8
drivers/cpufreq/powernow-k8.c
drivers/cpufreq/powernow-k8.c
+3
-4
drivers/cpufreq/ppc-corenet-cpufreq.c
drivers/cpufreq/ppc-corenet-cpufreq.c
+0
-1
drivers/cpufreq/ppc_cbe_cpufreq.c
drivers/cpufreq/ppc_cbe_cpufreq.c
+0
-1
drivers/cpufreq/s3c2416-cpufreq.c
drivers/cpufreq/s3c2416-cpufreq.c
+0
-1
drivers/cpufreq/s3c24xx-cpufreq.c
drivers/cpufreq/s3c24xx-cpufreq.c
+3
-3
drivers/cpufreq/s3c64xx-cpufreq.c
drivers/cpufreq/s3c64xx-cpufreq.c
+0
-1
drivers/cpufreq/sc520_freq.c
drivers/cpufreq/sc520_freq.c
+0
-1
drivers/cpufreq/sh-cpufreq.c
drivers/cpufreq/sh-cpufreq.c
+0
-1
drivers/cpufreq/sparc-us2e-cpufreq.c
drivers/cpufreq/sparc-us2e-cpufreq.c
+2
-4
drivers/cpufreq/sparc-us3-cpufreq.c
drivers/cpufreq/sparc-us3-cpufreq.c
+2
-4
drivers/cpufreq/speedstep-centrino.c
drivers/cpufreq/speedstep-centrino.c
+0
-1
drivers/cpufreq/speedstep-ich.c
drivers/cpufreq/speedstep-ich.c
+0
-1
drivers/cpufreq/speedstep-smi.c
drivers/cpufreq/speedstep-smi.c
+0
-1
include/linux/cpufreq.h
include/linux/cpufreq.h
+179
-209
No files found.
Documentation/cpu-freq/cpu-drivers.txt
View file @
c49a089c
...
...
@@ -50,8 +50,6 @@ What shall this struct cpufreq_driver contain?
cpufreq_driver.name - The name of this driver.
cpufreq_driver.owner - THIS_MODULE;
cpufreq_driver.init - A pointer to the per-CPU initialization
function.
...
...
arch/x86/include/asm/processor.h
View file @
c49a089c
...
...
@@ -942,35 +942,6 @@ extern int set_tsc_mode(unsigned int val);
extern
u16
amd_get_nb_id
(
int
cpu
);
struct
aperfmperf
{
u64
aperf
,
mperf
;
};
static
inline
void
get_aperfmperf
(
struct
aperfmperf
*
am
)
{
WARN_ON_ONCE
(
!
boot_cpu_has
(
X86_FEATURE_APERFMPERF
));
rdmsrl
(
MSR_IA32_APERF
,
am
->
aperf
);
rdmsrl
(
MSR_IA32_MPERF
,
am
->
mperf
);
}
#define APERFMPERF_SHIFT 10
static
inline
unsigned
long
calc_aperfmperf_ratio
(
struct
aperfmperf
*
old
,
struct
aperfmperf
*
new
)
{
u64
aperf
=
new
->
aperf
-
old
->
aperf
;
u64
mperf
=
new
->
mperf
-
old
->
mperf
;
unsigned
long
ratio
=
aperf
;
mperf
>>=
APERFMPERF_SHIFT
;
if
(
mperf
)
ratio
=
div64_u64
(
aperf
,
mperf
);
return
ratio
;
}
extern
unsigned
long
arch_align_stack
(
unsigned
long
sp
);
extern
void
free_init_pages
(
char
*
what
,
unsigned
long
begin
,
unsigned
long
end
);
...
...
drivers/cpufreq/Makefile
View file @
c49a089c
...
...
@@ -23,7 +23,7 @@ obj-$(CONFIG_GENERIC_CPUFREQ_CPU0) += cpufreq-cpu0.o
# powernow-k8 can load then. ACPI is preferred to all other hardware-specific drivers.
# speedstep-* is preferred over p4-clockmod.
obj-$(CONFIG_X86_ACPI_CPUFREQ)
+=
acpi-cpufreq.o
mperf.o
obj-$(CONFIG_X86_ACPI_CPUFREQ)
+=
acpi-cpufreq.o
obj-$(CONFIG_X86_POWERNOW_K8)
+=
powernow-k8.o
obj-$(CONFIG_X86_PCC_CPUFREQ)
+=
pcc-cpufreq.o
obj-$(CONFIG_X86_POWERNOW_K6)
+=
powernow-k6.o
...
...
drivers/cpufreq/acpi-cpufreq.c
View file @
c49a089c
...
...
@@ -45,7 +45,6 @@
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpufeature.h>
#include "mperf.h"
MODULE_AUTHOR
(
"Paul Diefenbaugh, Dominik Brodowski"
);
MODULE_DESCRIPTION
(
"ACPI Processor P-States Driver"
);
...
...
@@ -710,7 +709,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
return
blacklisted
;
#endif
data
=
kzalloc
(
sizeof
(
struct
acpi_cpufreq_
data
),
GFP_KERNEL
);
data
=
kzalloc
(
sizeof
(
*
data
),
GFP_KERNEL
);
if
(
!
data
)
return
-
ENOMEM
;
...
...
@@ -800,7 +799,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
goto
err_unreg
;
}
data
->
freq_table
=
kmalloc
(
sizeof
(
struct
cpufreq_frequency
_table
)
*
data
->
freq_table
=
kmalloc
(
sizeof
(
*
data
->
freq
_table
)
*
(
perf
->
state_count
+
1
),
GFP_KERNEL
);
if
(
!
data
->
freq_table
)
{
result
=
-
ENOMEM
;
...
...
@@ -861,10 +860,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
/* notify BIOS that we exist */
acpi_processor_notify_smm
(
THIS_MODULE
);
/* Check for APERF/MPERF support in hardware */
if
(
boot_cpu_has
(
X86_FEATURE_APERFMPERF
))
acpi_cpufreq_driver
.
getavg
=
cpufreq_get_measured_perf
;
pr_debug
(
"CPU%u - ACPI performance management activated.
\n
"
,
cpu
);
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
pr_debug
(
" %cP%d: %d MHz, %d mW, %d uS
\n
"
,
...
...
@@ -941,7 +936,6 @@ static struct cpufreq_driver acpi_cpufreq_driver = {
.
exit
=
acpi_cpufreq_cpu_exit
,
.
resume
=
acpi_cpufreq_resume
,
.
name
=
"acpi-cpufreq"
,
.
owner
=
THIS_MODULE
,
.
attr
=
acpi_cpufreq_attr
,
};
...
...
drivers/cpufreq/at32ap-cpufreq.c
View file @
c49a089c
...
...
@@ -108,7 +108,6 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
static
struct
cpufreq_driver
at32_driver
=
{
.
name
=
"at32ap"
,
.
owner
=
THIS_MODULE
,
.
init
=
at32_cpufreq_driver_init
,
.
verify
=
at32_verify_speed
,
.
target
=
at32_set_target
,
...
...
drivers/cpufreq/blackfin-cpufreq.c
View file @
c49a089c
...
...
@@ -225,7 +225,6 @@ static struct cpufreq_driver bfin_driver = {
.
get
=
bfin_getfreq_khz
,
.
init
=
__bfin_cpu_init
,
.
name
=
"bfin cpufreq"
,
.
owner
=
THIS_MODULE
,
.
attr
=
bfin_freq_attr
,
};
...
...
drivers/cpufreq/cpufreq-nforce2.c
View file @
c49a089c
...
...
@@ -379,7 +379,6 @@ static struct cpufreq_driver nforce2_driver = {
.
get
=
nforce2_get
,
.
init
=
nforce2_cpu_init
,
.
exit
=
nforce2_cpu_exit
,
.
owner
=
THIS_MODULE
,
};
#ifdef MODULE
...
...
drivers/cpufreq/cpufreq.c
View file @
c49a089c
This diff is collapsed.
Click to expand it.
drivers/cpufreq/cpufreq_conservative.c
View file @
c49a089c
...
...
@@ -11,19 +11,7 @@
* published by the Free Software Foundation.
*/
#include <linux/cpufreq.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kernel_stat.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/notifier.h>
#include <linux/percpu-defs.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/types.h>
#include "cpufreq_governor.h"
/* Conservative governor macros */
...
...
@@ -329,7 +317,7 @@ static int cs_init(struct dbs_data *dbs_data)
{
struct
cs_dbs_tuners
*
tuners
;
tuners
=
kzalloc
(
sizeof
(
struct
cs_dbs_
tuners
),
GFP_KERNEL
);
tuners
=
kzalloc
(
sizeof
(
*
tuners
),
GFP_KERNEL
);
if
(
!
tuners
)
{
pr_err
(
"%s: kzalloc failed
\n
"
,
__func__
);
return
-
ENOMEM
;
...
...
drivers/cpufreq/cpufreq_governor.c
View file @
c49a089c
...
...
@@ -16,15 +16,9 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <asm/cputime.h>
#include <linux/cpufreq.h>
#include <linux/cpumask.h>
#include <linux/export.h>
#include <linux/kernel_stat.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include "cpufreq_governor.h"
...
...
@@ -53,7 +47,7 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu)
policy
=
cdbs
->
cur_policy
;
/* Get Absolute Load
(in terms of freq for ondemand gov)
*/
/* Get Absolute Load */
for_each_cpu
(
j
,
policy
->
cpus
)
{
struct
cpu_dbs_common_info
*
j_cdbs
;
u64
cur_wall_time
,
cur_idle_time
;
...
...
@@ -104,14 +98,6 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu)
load
=
100
*
(
wall_time
-
idle_time
)
/
wall_time
;
if
(
dbs_data
->
cdata
->
governor
==
GOV_ONDEMAND
)
{
int
freq_avg
=
__cpufreq_driver_getavg
(
policy
,
j
);
if
(
freq_avg
<=
0
)
freq_avg
=
policy
->
cur
;
load
*=
freq_avg
;
}
if
(
load
>
max_load
)
max_load
=
load
;
}
...
...
drivers/cpufreq/cpufreq_governor.h
View file @
c49a089c
...
...
@@ -18,10 +18,9 @@
#define _CPUFREQ_GOVERNOR_H
#include <linux/cpufreq.h>
#include <linux/kobject.h>
#include <linux/kernel_stat.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
#include <linux/sysfs.h>
/*
* The polling frequency depends on the capability of the processor. Default
...
...
@@ -169,7 +168,6 @@ struct od_dbs_tuners {
unsigned
int
sampling_rate
;
unsigned
int
sampling_down_factor
;
unsigned
int
up_threshold
;
unsigned
int
adj_up_threshold
;
unsigned
int
powersave_bias
;
unsigned
int
io_is_busy
;
};
...
...
@@ -223,7 +221,7 @@ struct od_ops {
void
(
*
powersave_bias_init_cpu
)(
int
cpu
);
unsigned
int
(
*
powersave_bias_target
)(
struct
cpufreq_policy
*
policy
,
unsigned
int
freq_next
,
unsigned
int
relation
);
void
(
*
freq_increase
)(
struct
cpufreq_policy
*
p
,
unsigned
int
freq
);
void
(
*
freq_increase
)(
struct
cpufreq_policy
*
p
olicy
,
unsigned
int
freq
);
};
struct
cs_ops
{
...
...
drivers/cpufreq/cpufreq_ondemand.c
View file @
c49a089c
...
...
@@ -12,28 +12,16 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/cpufreq.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kernel_stat.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/cpu.h>
#include <linux/percpu-defs.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/tick.h>
#include <linux/types.h>
#include <linux/cpu.h>
#include "cpufreq_governor.h"
/* On-demand governor macros */
#define DEF_FREQUENCY_DOWN_DIFFERENTIAL (10)
#define DEF_FREQUENCY_UP_THRESHOLD (80)
#define DEF_SAMPLING_DOWN_FACTOR (1)
#define MAX_SAMPLING_DOWN_FACTOR (100000)
#define MICRO_FREQUENCY_DOWN_DIFFERENTIAL (3)
#define MICRO_FREQUENCY_UP_THRESHOLD (95)
#define MICRO_FREQUENCY_MIN_SAMPLE_RATE (10000)
#define MIN_FREQUENCY_UP_THRESHOLD (11)
...
...
@@ -144,31 +132,27 @@ static void ondemand_powersave_bias_init(void)
}
}
static
void
dbs_freq_increase
(
struct
cpufreq_policy
*
p
,
unsigned
int
freq
)
static
void
dbs_freq_increase
(
struct
cpufreq_policy
*
p
olicy
,
unsigned
int
freq
)
{
struct
dbs_data
*
dbs_data
=
p
->
governor_data
;
struct
dbs_data
*
dbs_data
=
p
olicy
->
governor_data
;
struct
od_dbs_tuners
*
od_tuners
=
dbs_data
->
tuners
;
if
(
od_tuners
->
powersave_bias
)
freq
=
od_ops
.
powersave_bias_target
(
p
,
freq
,
freq
=
od_ops
.
powersave_bias_target
(
p
olicy
,
freq
,
CPUFREQ_RELATION_H
);
else
if
(
p
->
cur
==
p
->
max
)
else
if
(
p
olicy
->
cur
==
policy
->
max
)
return
;
__cpufreq_driver_target
(
p
,
freq
,
od_tuners
->
powersave_bias
?
__cpufreq_driver_target
(
p
olicy
,
freq
,
od_tuners
->
powersave_bias
?
CPUFREQ_RELATION_L
:
CPUFREQ_RELATION_H
);
}
/*
* Every sampling_rate, we check, if current idle time is less than 20%
* (default), then we try to increase frequency. Every sampling_rate, we look
* for the lowest frequency which can sustain the load while keeping idle time
* over 30%. If such a frequency exist, we try to decrease to this frequency.
*
* Any frequency increase takes it to the maximum frequency. Frequency reduction
* happens at minimum steps of 5% (default) of current frequency
* (default), then we try to increase frequency. Else, we adjust the frequency
* proportional to load.
*/
static
void
od_check_cpu
(
int
cpu
,
unsigned
int
load
_freq
)
static
void
od_check_cpu
(
int
cpu
,
unsigned
int
load
)
{
struct
od_cpu_dbs_info_s
*
dbs_info
=
&
per_cpu
(
od_cpu_dbs_info
,
cpu
);
struct
cpufreq_policy
*
policy
=
dbs_info
->
cdbs
.
cur_policy
;
...
...
@@ -178,29 +162,17 @@ static void od_check_cpu(int cpu, unsigned int load_freq)
dbs_info
->
freq_lo
=
0
;
/* Check for frequency increase */
if
(
load
_freq
>
od_tuners
->
up_threshold
*
policy
->
cur
)
{
if
(
load
>
od_tuners
->
up_threshold
)
{
/* If switching to max speed, apply sampling_down_factor */
if
(
policy
->
cur
<
policy
->
max
)
dbs_info
->
rate_mult
=
od_tuners
->
sampling_down_factor
;
dbs_freq_increase
(
policy
,
policy
->
max
);
return
;
}
/* Check for frequency decrease */
/* if we cannot reduce the frequency anymore, break out early */
if
(
policy
->
cur
==
policy
->
min
)
return
;
/*
* The optimal frequency is the frequency that is the lowest that can
* support the current CPU usage without triggering the up policy. To be
* safe, we focus 10 points under the threshold.
*/
if
(
load_freq
<
od_tuners
->
adj_up_threshold
*
policy
->
cur
)
{
}
else
{
/* Calculate the next frequency proportional to load */
unsigned
int
freq_next
;
freq_next
=
load
_freq
/
od_tuners
->
adj_up_threshold
;
freq_next
=
load
*
policy
->
cpuinfo
.
max_freq
/
100
;
/* No longer fully busy, reset rate_mult */
dbs_info
->
rate_mult
=
1
;
...
...
@@ -374,9 +346,6 @@ static ssize_t store_up_threshold(struct dbs_data *dbs_data, const char *buf,
input
<
MIN_FREQUENCY_UP_THRESHOLD
)
{
return
-
EINVAL
;
}
/* Calculate the new adj_up_threshold */
od_tuners
->
adj_up_threshold
+=
input
;
od_tuners
->
adj_up_threshold
-=
od_tuners
->
up_threshold
;
od_tuners
->
up_threshold
=
input
;
return
count
;
...
...
@@ -513,7 +482,7 @@ static int od_init(struct dbs_data *dbs_data)
u64
idle_time
;
int
cpu
;
tuners
=
kzalloc
(
sizeof
(
struct
od_dbs_
tuners
),
GFP_KERNEL
);
tuners
=
kzalloc
(
sizeof
(
*
tuners
),
GFP_KERNEL
);
if
(
!
tuners
)
{
pr_err
(
"%s: kzalloc failed
\n
"
,
__func__
);
return
-
ENOMEM
;
...
...
@@ -525,8 +494,6 @@ static int od_init(struct dbs_data *dbs_data)
if
(
idle_time
!=
-
1ULL
)
{
/* Idle micro accounting is supported. Use finer thresholds */
tuners
->
up_threshold
=
MICRO_FREQUENCY_UP_THRESHOLD
;
tuners
->
adj_up_threshold
=
MICRO_FREQUENCY_UP_THRESHOLD
-
MICRO_FREQUENCY_DOWN_DIFFERENTIAL
;
/*
* In nohz/micro accounting case we set the minimum frequency
* not depending on HZ, but fixed (very low). The deferred
...
...
@@ -535,8 +502,6 @@ static int od_init(struct dbs_data *dbs_data)
dbs_data
->
min_sampling_rate
=
MICRO_FREQUENCY_MIN_SAMPLE_RATE
;
}
else
{
tuners
->
up_threshold
=
DEF_FREQUENCY_UP_THRESHOLD
;
tuners
->
adj_up_threshold
=
DEF_FREQUENCY_UP_THRESHOLD
-
DEF_FREQUENCY_DOWN_DIFFERENTIAL
;
/* For correct statistics, we need 10 ticks for each measure */
dbs_data
->
min_sampling_rate
=
MIN_SAMPLING_RATE_RATIO
*
...
...
drivers/cpufreq/cpufreq_performance.c
View file @
c49a089c
...
...
@@ -12,10 +12,9 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/cpufreq.h>
#include <linux/init.h>
#include <linux/module.h>
static
int
cpufreq_governor_performance
(
struct
cpufreq_policy
*
policy
,
unsigned
int
event
)
...
...
drivers/cpufreq/cpufreq_powersave.c
View file @
c49a089c
...
...
@@ -12,10 +12,9 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/cpufreq.h>
#include <linux/init.h>
#include <linux/module.h>
static
int
cpufreq_governor_powersave
(
struct
cpufreq_policy
*
policy
,
unsigned
int
event
)
...
...
drivers/cpufreq/cpufreq_stats.c
View file @
c49a089c
...
...
@@ -9,17 +9,10 @@
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/cpu.h>
#include <linux/sysfs.h>
#include <linux/cpufreq.h>
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/percpu.h>
#include <linux/kobject.h>
#include <linux/spinlock.h>
#include <linux/notifier.h>
#include <linux/slab.h>
#include <asm/cputime.h>
static
spinlock_t
cpufreq_stats_lock
;
...
...
@@ -200,22 +193,22 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy,
{
unsigned
int
i
,
j
,
count
=
0
,
ret
=
0
;
struct
cpufreq_stats
*
stat
;
struct
cpufreq_policy
*
data
;
struct
cpufreq_policy
*
current_policy
;
unsigned
int
alloc_size
;
unsigned
int
cpu
=
policy
->
cpu
;
if
(
per_cpu
(
cpufreq_stats_table
,
cpu
))
return
-
EBUSY
;
stat
=
kzalloc
(
sizeof
(
struct
cpufreq_stats
),
GFP_KERNEL
);
stat
=
kzalloc
(
sizeof
(
*
stat
),
GFP_KERNEL
);
if
((
stat
)
==
NULL
)
return
-
ENOMEM
;
data
=
cpufreq_cpu_get
(
cpu
);
if
(
data
==
NULL
)
{
current_policy
=
cpufreq_cpu_get
(
cpu
);
if
(
current_policy
==
NULL
)
{
ret
=
-
EINVAL
;
goto
error_get_fail
;
}
ret
=
sysfs_create_group
(
&
data
->
kobj
,
&
stats_attr_group
);
ret
=
sysfs_create_group
(
&
current_policy
->
kobj
,
&
stats_attr_group
);
if
(
ret
)
goto
error_out
;
...
...
@@ -258,10 +251,10 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy,
stat
->
last_time
=
get_jiffies_64
();
stat
->
last_index
=
freq_table_get_index
(
stat
,
policy
->
cur
);
spin_unlock
(
&
cpufreq_stats_lock
);
cpufreq_cpu_put
(
data
);
cpufreq_cpu_put
(
current_policy
);
return
0
;
error_out:
cpufreq_cpu_put
(
data
);
cpufreq_cpu_put
(
current_policy
);
error_get_fail:
kfree
(
stat
);
per_cpu
(
cpufreq_stats_table
,
cpu
)
=
NULL
;
...
...
@@ -348,16 +341,10 @@ static int cpufreq_stat_cpu_callback(struct notifier_block *nfb,
unsigned
int
cpu
=
(
unsigned
long
)
hcpu
;
switch
(
action
)
{
case
CPU_ONLINE
:
case
CPU_ONLINE_FROZEN
:
cpufreq_update_policy
(
cpu
);
break
;
case
CPU_DOWN_PREPARE
:
case
CPU_DOWN_PREPARE_FROZEN
:
cpufreq_stats_free_sysfs
(
cpu
);
break
;
case
CPU_DEAD
:
case
CPU_DEAD_FROZEN
:
cpufreq_stats_free_table
(
cpu
);
break
;
}
...
...
@@ -390,8 +377,6 @@ static int __init cpufreq_stats_init(void)
return
ret
;
register_hotcpu_notifier
(
&
cpufreq_stat_cpu_notifier
);
for_each_online_cpu
(
cpu
)
cpufreq_update_policy
(
cpu
);
ret
=
cpufreq_register_notifier
(
&
notifier_trans_block
,
CPUFREQ_TRANSITION_NOTIFIER
);
...
...
drivers/cpufreq/cris-artpec3-cpufreq.c
View file @
c49a089c
...
...
@@ -111,7 +111,6 @@ static struct cpufreq_driver cris_freq_driver = {
.
init
=
cris_freq_cpu_init
,
.
exit
=
cris_freq_cpu_exit
,
.
name
=
"cris_freq"
,
.
owner
=
THIS_MODULE
,
.
attr
=
cris_freq_attr
,
};
...
...
drivers/cpufreq/cris-etraxfs-cpufreq.c
View file @
c49a089c
...
...
@@ -108,7 +108,6 @@ static struct cpufreq_driver cris_freq_driver = {
.
init
=
cris_freq_cpu_init
,
.
exit
=
cris_freq_cpu_exit
,
.
name
=
"cris_freq"
,
.
owner
=
THIS_MODULE
,
.
attr
=
cris_freq_attr
,
};
...
...
drivers/cpufreq/e_powersaver.c
View file @
c49a089c
...
...
@@ -54,7 +54,7 @@ static struct acpi_processor_performance *eps_acpi_cpu_perf;
/* Minimum necessary to get acpi_processor_get_bios_limit() working */
static
int
eps_acpi_init
(
void
)
{
eps_acpi_cpu_perf
=
kzalloc
(
sizeof
(
struct
acpi_processor_performance
),
eps_acpi_cpu_perf
=
kzalloc
(
sizeof
(
*
eps_acpi_cpu_perf
),
GFP_KERNEL
);
if
(
!
eps_acpi_cpu_perf
)
return
-
ENOMEM
;
...
...
@@ -366,7 +366,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy)
states
=
2
;
/* Allocate private data and frequency table for current cpu */
centaur
=
kzalloc
(
sizeof
(
struct
eps_cpu_data
)
centaur
=
kzalloc
(
sizeof
(
*
centaur
)
+
(
states
+
1
)
*
sizeof
(
struct
cpufreq_frequency_table
),
GFP_KERNEL
);
if
(
!
centaur
)
...
...
@@ -436,7 +436,6 @@ static struct cpufreq_driver eps_driver = {
.
exit
=
eps_cpu_exit
,
.
get
=
eps_get
,
.
name
=
"e_powersaver"
,
.
owner
=
THIS_MODULE
,
.
attr
=
eps_attr
,
};
...
...
drivers/cpufreq/elanfreq.c
View file @
c49a089c
...
...
@@ -274,7 +274,6 @@ static struct cpufreq_driver elanfreq_driver = {
.
init
=
elanfreq_cpu_init
,
.
exit
=
elanfreq_cpu_exit
,
.
name
=
"elanfreq"
,
.
owner
=
THIS_MODULE
,
.
attr
=
elanfreq_attr
,
};
...
...
drivers/cpufreq/exynos-cpufreq.c
View file @
c49a089c
...
...
@@ -289,7 +289,7 @@ static int __init exynos_cpufreq_init(void)
{
int
ret
=
-
EINVAL
;
exynos_info
=
kzalloc
(
sizeof
(
struct
exynos_dvf
s_info
),
GFP_KERNEL
);
exynos_info
=
kzalloc
(
sizeof
(
*
exyno
s_info
),
GFP_KERNEL
);
if
(
!
exynos_info
)
return
-
ENOMEM
;
...
...
drivers/cpufreq/freq_table.c
View file @
c49a089c
...
...
@@ -11,10 +11,8 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/module.h>
/*********************************************************************
* FREQUENCY TABLE HELPERS *
...
...
drivers/cpufreq/gx-suspmod.c
View file @
c49a089c
...
...
@@ -446,7 +446,6 @@ static struct cpufreq_driver gx_suspmod_driver = {
.
target
=
cpufreq_gx_target
,
.
init
=
cpufreq_gx_cpu_init
,
.
name
=
"gx-suspmod"
,
.
owner
=
THIS_MODULE
,
};
static
int
__init
cpufreq_gx_init
(
void
)
...
...
@@ -466,7 +465,7 @@ static int __init cpufreq_gx_init(void)
pr_debug
(
"geode suspend modulation available.
\n
"
);
params
=
kzalloc
(
sizeof
(
struct
gxfreq_
params
),
GFP_KERNEL
);
params
=
kzalloc
(
sizeof
(
*
params
),
GFP_KERNEL
);
if
(
params
==
NULL
)
return
-
ENOMEM
;
...
...
drivers/cpufreq/ia64-acpi-cpufreq.c
View file @
c49a089c
...
...
@@ -274,7 +274,7 @@ acpi_cpufreq_cpu_init (
pr_debug
(
"acpi_cpufreq_cpu_init
\n
"
);
data
=
kzalloc
(
sizeof
(
struct
cpufreq_acpi_io
),
GFP_KERNEL
);
data
=
kzalloc
(
sizeof
(
*
data
),
GFP_KERNEL
);
if
(
!
data
)
return
(
-
ENOMEM
);
...
...
@@ -304,7 +304,7 @@ acpi_cpufreq_cpu_init (
}
/* alloc freq_table */
data
->
freq_table
=
kmalloc
(
sizeof
(
struct
cpufreq_frequency
_table
)
*
data
->
freq_table
=
kmalloc
(
sizeof
(
*
data
->
freq
_table
)
*
(
data
->
acpi_data
.
state_count
+
1
),
GFP_KERNEL
);
if
(
!
data
->
freq_table
)
{
...
...
@@ -409,7 +409,6 @@ static struct cpufreq_driver acpi_cpufreq_driver = {
.
init
=
acpi_cpufreq_cpu_init
,
.
exit
=
acpi_cpufreq_cpu_exit
,
.
name
=
"acpi-cpufreq"
,
.
owner
=
THIS_MODULE
,
.
attr
=
acpi_cpufreq_attr
,
};
...
...
drivers/cpufreq/intel_pstate.c
View file @
c49a089c
...
...
@@ -665,7 +665,6 @@ static struct cpufreq_driver intel_pstate_driver = {
.
init
=
intel_pstate_cpu_init
,
.
exit
=
intel_pstate_cpu_exit
,
.
name
=
"intel_pstate"
,
.
owner
=
THIS_MODULE
,
};
static
int
__initdata
no_load
;
...
...
drivers/cpufreq/kirkwood-cpufreq.c
View file @
c49a089c
...
...
@@ -158,7 +158,6 @@ static struct cpufreq_driver kirkwood_cpufreq_driver = {
.
init
=
kirkwood_cpufreq_cpu_init
,
.
exit
=
kirkwood_cpufreq_cpu_exit
,
.
name
=
"kirkwood-cpufreq"
,
.
owner
=
THIS_MODULE
,
.
attr
=
kirkwood_cpufreq_attr
,
};
...
...
drivers/cpufreq/longhaul.c
View file @
c49a089c
...
...
@@ -948,7 +948,6 @@ static struct cpufreq_driver longhaul_driver = {
.
init
=
longhaul_cpu_init
,
.
exit
=
longhaul_cpu_exit
,
.
name
=
"longhaul"
,
.
owner
=
THIS_MODULE
,
.
attr
=
longhaul_attr
,
};
...
...
drivers/cpufreq/longrun.c
View file @
c49a089c
...
...
@@ -286,7 +286,6 @@ static struct cpufreq_driver longrun_driver = {
.
get
=
longrun_get
,
.
init
=
longrun_cpu_init
,
.
name
=
"longrun"
,
.
owner
=
THIS_MODULE
,
};
static
const
struct
x86_cpu_id
longrun_ids
[]
=
{
...
...
drivers/cpufreq/loongson2_cpufreq.c
View file @
c49a089c
...
...
@@ -158,7 +158,6 @@ static struct freq_attr *loongson2_table_attr[] = {
};
static
struct
cpufreq_driver
loongson2_cpufreq_driver
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"loongson2"
,
.
init
=
loongson2_cpufreq_cpu_init
,
.
verify
=
loongson2_cpufreq_verify
,
...
...
drivers/cpufreq/maple-cpufreq.c
View file @
c49a089c
...
...
@@ -190,7 +190,6 @@ static int maple_cpufreq_cpu_init(struct cpufreq_policy *policy)
static
struct
cpufreq_driver
maple_cpufreq_driver
=
{
.
name
=
"maple"
,
.
owner
=
THIS_MODULE
,
.
flags
=
CPUFREQ_CONST_LOOPS
,
.
init
=
maple_cpufreq_cpu_init
,
.
verify
=
maple_cpufreq_verify
,
...
...
drivers/cpufreq/mperf.c
deleted
100644 → 0
View file @
d4e4ab86
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/slab.h>
#include "mperf.h"
static
DEFINE_PER_CPU
(
struct
aperfmperf
,
acfreq_old_perf
);
/* Called via smp_call_function_single(), on the target CPU */
static
void
read_measured_perf_ctrs
(
void
*
_cur
)
{
struct
aperfmperf
*
am
=
_cur
;
get_aperfmperf
(
am
);
}
/*
* Return the measured active (C0) frequency on this CPU since last call
* to this function.
* Input: cpu number
* Return: Average CPU frequency in terms of max frequency (zero on error)
*
* We use IA32_MPERF and IA32_APERF MSRs to get the measured performance
* over a period of time, while CPU is in C0 state.
* IA32_MPERF counts at the rate of max advertised frequency
* IA32_APERF counts at the rate of actual CPU frequency
* Only IA32_APERF/IA32_MPERF ratio is architecturally defined and
* no meaning should be associated with absolute values of these MSRs.
*/
unsigned
int
cpufreq_get_measured_perf
(
struct
cpufreq_policy
*
policy
,
unsigned
int
cpu
)
{
struct
aperfmperf
perf
;
unsigned
long
ratio
;
unsigned
int
retval
;
if
(
smp_call_function_single
(
cpu
,
read_measured_perf_ctrs
,
&
perf
,
1
))
return
0
;
ratio
=
calc_aperfmperf_ratio
(
&
per_cpu
(
acfreq_old_perf
,
cpu
),
&
perf
);
per_cpu
(
acfreq_old_perf
,
cpu
)
=
perf
;
retval
=
(
policy
->
cpuinfo
.
max_freq
*
ratio
)
>>
APERFMPERF_SHIFT
;
return
retval
;
}
EXPORT_SYMBOL_GPL
(
cpufreq_get_measured_perf
);
MODULE_LICENSE
(
"GPL"
);
drivers/cpufreq/mperf.h
deleted
100644 → 0
View file @
d4e4ab86
/*
* (c) 2010 Advanced Micro Devices, Inc.
* Your use of this code is subject to the terms and conditions of the
* GNU general public license version 2. See "COPYING" or
* http://www.gnu.org/licenses/gpl.html
*/
unsigned
int
cpufreq_get_measured_perf
(
struct
cpufreq_policy
*
policy
,
unsigned
int
cpu
);
drivers/cpufreq/p4-clockmod.c
View file @
c49a089c
...
...
@@ -279,7 +279,6 @@ static struct cpufreq_driver p4clockmod_driver = {
.
exit
=
cpufreq_p4_cpu_exit
,
.
get
=
cpufreq_p4_get
,
.
name
=
"p4-clockmod"
,
.
owner
=
THIS_MODULE
,
.
attr
=
p4clockmod_attr
,
};
...
...
drivers/cpufreq/pasemi-cpufreq.c
View file @
c49a089c
...
...
@@ -297,7 +297,6 @@ static int pas_cpufreq_target(struct cpufreq_policy *policy,
static
struct
cpufreq_driver
pas_cpufreq_driver
=
{
.
name
=
"pas-cpufreq"
,
.
owner
=
THIS_MODULE
,
.
flags
=
CPUFREQ_CONST_LOOPS
,
.
init
=
pas_cpufreq_cpu_init
,
.
exit
=
pas_cpufreq_cpu_exit
,
...
...
drivers/cpufreq/pcc-cpufreq.c
View file @
c49a089c
...
...
@@ -587,7 +587,6 @@ static struct cpufreq_driver pcc_cpufreq_driver = {
.
init
=
pcc_cpufreq_cpu_init
,
.
exit
=
pcc_cpufreq_cpu_exit
,
.
name
=
"pcc-cpufreq"
,
.
owner
=
THIS_MODULE
,
};
static
int
__init
pcc_cpufreq_init
(
void
)
...
...
drivers/cpufreq/pmac32-cpufreq.c
View file @
c49a089c
...
...
@@ -477,7 +477,6 @@ static struct cpufreq_driver pmac_cpufreq_driver = {
.
flags
=
CPUFREQ_PM_NO_WARN
,
.
attr
=
pmac_cpu_freqs_attr
,
.
name
=
"powermac"
,
.
owner
=
THIS_MODULE
,
};
...
...
drivers/cpufreq/pmac64-cpufreq.c
View file @
c49a089c
...
...
@@ -371,7 +371,6 @@ static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
static
struct
cpufreq_driver
g5_cpufreq_driver
=
{
.
name
=
"powermac"
,
.
owner
=
THIS_MODULE
,
.
flags
=
CPUFREQ_CONST_LOOPS
,
.
init
=
g5_cpufreq_cpu_init
,
.
verify
=
g5_cpufreq_verify
,
...
...
@@ -447,9 +446,8 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
if
(
!
shdr
)
goto
bail_noprops
;
g5_fvt_table
=
(
struct
smu_sdbp_fvt
*
)
&
shdr
[
1
];
ssize
=
(
shdr
->
len
*
sizeof
(
u32
))
-
sizeof
(
struct
smu_sdbp_header
);
g5_fvt_count
=
ssize
/
sizeof
(
struct
smu_sdbp_fvt
);
ssize
=
(
shdr
->
len
*
sizeof
(
u32
))
-
sizeof
(
*
shdr
);
g5_fvt_count
=
ssize
/
sizeof
(
*
g5_fvt_table
);
g5_fvt_cur
=
0
;
/* Sanity checking */
...
...
drivers/cpufreq/powernow-k6.c
View file @
c49a089c
...
...
@@ -207,7 +207,6 @@ static struct cpufreq_driver powernow_k6_driver = {
.
exit
=
powernow_k6_cpu_exit
,
.
get
=
powernow_k6_get
,
.
name
=
"powernow-k6"
,
.
owner
=
THIS_MODULE
,
.
attr
=
powernow_k6_attr
,
};
...
...
drivers/cpufreq/powernow-k7.c
View file @
c49a089c
...
...
@@ -177,7 +177,7 @@ static int get_ranges(unsigned char *pst)
unsigned
int
speed
;
u8
fid
,
vid
;
powernow_table
=
kzalloc
((
sizeof
(
struct
cpufreq_frequency
_table
)
*
powernow_table
=
kzalloc
((
sizeof
(
*
powernow
_table
)
*
(
number_scales
+
1
)),
GFP_KERNEL
);
if
(
!
powernow_table
)
return
-
ENOMEM
;
...
...
@@ -309,8 +309,7 @@ static int powernow_acpi_init(void)
goto
err0
;
}
acpi_processor_perf
=
kzalloc
(
sizeof
(
struct
acpi_processor_performance
),
GFP_KERNEL
);
acpi_processor_perf
=
kzalloc
(
sizeof
(
*
acpi_processor_perf
),
GFP_KERNEL
);
if
(
!
acpi_processor_perf
)
{
retval
=
-
ENOMEM
;
goto
err0
;
...
...
@@ -346,7 +345,7 @@ static int powernow_acpi_init(void)
goto
err2
;
}
powernow_table
=
kzalloc
((
sizeof
(
struct
cpufreq_frequency
_table
)
*
powernow_table
=
kzalloc
((
sizeof
(
*
powernow
_table
)
*
(
number_scales
+
1
)),
GFP_KERNEL
);
if
(
!
powernow_table
)
{
retval
=
-
ENOMEM
;
...
...
@@ -497,7 +496,7 @@ static int powernow_decode_bios(int maxfid, int startvid)
"relevant to this CPU).
\n
"
,
psb
->
numpst
);
p
+=
sizeof
(
struct
psb_s
);
p
+=
sizeof
(
*
psb
);
pst
=
(
struct
pst_s
*
)
p
;
...
...
@@ -510,12 +509,12 @@ static int powernow_decode_bios(int maxfid, int startvid)
(
maxfid
==
pst
->
maxfid
)
&&
(
startvid
==
pst
->
startvid
))
{
print_pst_entry
(
pst
,
j
);
p
=
(
char
*
)
pst
+
sizeof
(
struct
pst_s
);
p
=
(
char
*
)
pst
+
sizeof
(
*
pst
);
ret
=
get_ranges
(
p
);
return
ret
;
}
else
{
unsigned
int
k
;
p
=
(
char
*
)
pst
+
sizeof
(
struct
pst_s
);
p
=
(
char
*
)
pst
+
sizeof
(
*
pst
);
for
(
k
=
0
;
k
<
number_scales
;
k
++
)
p
+=
2
;
}
...
...
@@ -717,7 +716,6 @@ static struct cpufreq_driver powernow_driver = {
.
init
=
powernow_cpu_init
,
.
exit
=
powernow_cpu_exit
,
.
name
=
"powernow-k7"
,
.
owner
=
THIS_MODULE
,
.
attr
=
powernow_table_attr
,
};
...
...
drivers/cpufreq/powernow-k8.c
View file @
c49a089c
...
...
@@ -623,7 +623,7 @@ static int fill_powernow_table(struct powernow_k8_data *data,
if
(
check_pst_table
(
data
,
pst
,
maxvid
))
return
-
EINVAL
;
powernow_table
=
kmalloc
((
sizeof
(
struct
cpufreq_frequency
_table
)
powernow_table
=
kmalloc
((
sizeof
(
*
powernow
_table
)
*
(
data
->
numps
+
1
)),
GFP_KERNEL
);
if
(
!
powernow_table
)
{
printk
(
KERN_ERR
PFX
"powernow_table memory alloc failure
\n
"
);
...
...
@@ -793,7 +793,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
}
/* fill in data->powernow_table */
powernow_table
=
kmalloc
((
sizeof
(
struct
cpufreq_frequency
_table
)
powernow_table
=
kmalloc
((
sizeof
(
*
powernow
_table
)
*
(
data
->
acpi_data
.
state_count
+
1
)),
GFP_KERNEL
);
if
(
!
powernow_table
)
{
pr_debug
(
"powernow_table memory alloc failure
\n
"
);
...
...
@@ -1106,7 +1106,7 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
if
(
rc
)
return
-
ENODEV
;
data
=
kzalloc
(
sizeof
(
struct
powernow_k8_
data
),
GFP_KERNEL
);
data
=
kzalloc
(
sizeof
(
*
data
),
GFP_KERNEL
);
if
(
!
data
)
{
printk
(
KERN_ERR
PFX
"unable to alloc powernow_k8_data"
);
return
-
ENOMEM
;
...
...
@@ -1240,7 +1240,6 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
.
exit
=
powernowk8_cpu_exit
,
.
get
=
powernowk8_get
,
.
name
=
"powernow-k8"
,
.
owner
=
THIS_MODULE
,
.
attr
=
powernow_k8_attr
,
};
...
...
drivers/cpufreq/ppc-corenet-cpufreq.c
View file @
c49a089c
...
...
@@ -300,7 +300,6 @@ static struct freq_attr *corenet_cpufreq_attr[] = {
static
struct
cpufreq_driver
ppc_corenet_cpufreq_driver
=
{
.
name
=
"ppc_cpufreq"
,
.
owner
=
THIS_MODULE
,
.
flags
=
CPUFREQ_CONST_LOOPS
,
.
init
=
corenet_cpufreq_cpu_init
,
.
exit
=
__exit_p
(
corenet_cpufreq_cpu_exit
),
...
...
drivers/cpufreq/ppc_cbe_cpufreq.c
View file @
c49a089c
...
...
@@ -181,7 +181,6 @@ static struct cpufreq_driver cbe_cpufreq_driver = {
.
init
=
cbe_cpufreq_cpu_init
,
.
exit
=
cbe_cpufreq_cpu_exit
,
.
name
=
"cbe-cpufreq"
,
.
owner
=
THIS_MODULE
,
.
flags
=
CPUFREQ_CONST_LOOPS
,
};
...
...
drivers/cpufreq/s3c2416-cpufreq.c
View file @
c49a089c
...
...
@@ -524,7 +524,6 @@ static struct freq_attr *s3c2416_cpufreq_attr[] = {
};
static
struct
cpufreq_driver
s3c2416_cpufreq_driver
=
{
.
owner
=
THIS_MODULE
,
.
flags
=
0
,
.
verify
=
s3c2416_cpufreq_verify_speed
,
.
target
=
s3c2416_cpufreq_set_target
,
...
...
drivers/cpufreq/s3c24xx-cpufreq.c
View file @
c49a089c
...
...
@@ -522,7 +522,7 @@ int __init s3c_cpufreq_setboard(struct s3c_cpufreq_board *board)
/* Copy the board information so that each board can make this
* initdata. */
ours
=
kzalloc
(
sizeof
(
struct
s3c_cpufreq_board
),
GFP_KERNEL
);
ours
=
kzalloc
(
sizeof
(
*
ours
),
GFP_KERNEL
);
if
(
ours
==
NULL
)
{
printk
(
KERN_ERR
"%s: no memory
\n
"
,
__func__
);
return
-
ENOMEM
;
...
...
@@ -615,7 +615,7 @@ static int s3c_cpufreq_build_freq(void)
size
=
cpu_cur
.
info
->
calc_freqtable
(
&
cpu_cur
,
NULL
,
0
);
size
++
;
ftab
=
kmalloc
(
sizeof
(
struct
cpufreq_frequency_table
)
*
size
,
GFP_KERNEL
);
ftab
=
kmalloc
(
sizeof
(
*
ftab
)
*
size
,
GFP_KERNEL
);
if
(
!
ftab
)
{
printk
(
KERN_ERR
"%s: no memory for tables
\n
"
,
__func__
);
return
-
ENOMEM
;
...
...
@@ -691,7 +691,7 @@ int __init s3c_plltab_register(struct cpufreq_frequency_table *plls,
struct
cpufreq_frequency_table
*
vals
;
unsigned
int
size
;
size
=
sizeof
(
struct
cpufreq_frequency_table
)
*
(
plls_no
+
1
);
size
=
sizeof
(
*
vals
)
*
(
plls_no
+
1
);
vals
=
kmalloc
(
size
,
GFP_KERNEL
);
if
(
vals
)
{
...
...
drivers/cpufreq/s3c64xx-cpufreq.c
View file @
c49a089c
...
...
@@ -263,7 +263,6 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
}
static
struct
cpufreq_driver
s3c64xx_cpufreq_driver
=
{
.
owner
=
THIS_MODULE
,
.
flags
=
0
,
.
verify
=
s3c64xx_cpufreq_verify_speed
,
.
target
=
s3c64xx_cpufreq_set_target
,
...
...
drivers/cpufreq/sc520_freq.c
View file @
c49a089c
...
...
@@ -147,7 +147,6 @@ static struct cpufreq_driver sc520_freq_driver = {
.
init
=
sc520_freq_cpu_init
,
.
exit
=
sc520_freq_cpu_exit
,
.
name
=
"sc520_freq"
,
.
owner
=
THIS_MODULE
,
.
attr
=
sc520_freq_attr
,
};
...
...
drivers/cpufreq/sh-cpufreq.c
View file @
c49a089c
...
...
@@ -160,7 +160,6 @@ static struct freq_attr *sh_freq_attr[] = {
};
static
struct
cpufreq_driver
sh_cpufreq_driver
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"sh"
,
.
get
=
sh_cpufreq_get
,
.
target
=
sh_cpufreq_target
,
...
...
drivers/cpufreq/sparc-us2e-cpufreq.c
View file @
c49a089c
...
...
@@ -351,12 +351,11 @@ static int __init us2e_freq_init(void)
struct
cpufreq_driver
*
driver
;
ret
=
-
ENOMEM
;
driver
=
kzalloc
(
sizeof
(
struct
cpufreq_
driver
),
GFP_KERNEL
);
driver
=
kzalloc
(
sizeof
(
*
driver
),
GFP_KERNEL
);
if
(
!
driver
)
goto
err_out
;
us2e_freq_table
=
kzalloc
(
(
NR_CPUS
*
sizeof
(
struct
us2e_freq_percpu_info
)),
us2e_freq_table
=
kzalloc
((
NR_CPUS
*
sizeof
(
*
us2e_freq_table
)),
GFP_KERNEL
);
if
(
!
us2e_freq_table
)
goto
err_out
;
...
...
@@ -366,7 +365,6 @@ static int __init us2e_freq_init(void)
driver
->
target
=
us2e_freq_target
;
driver
->
get
=
us2e_freq_get
;
driver
->
exit
=
us2e_freq_cpu_exit
;
driver
->
owner
=
THIS_MODULE
,
strcpy
(
driver
->
name
,
"UltraSPARC-IIe"
);
cpufreq_us2e_driver
=
driver
;
...
...
drivers/cpufreq/sparc-us3-cpufreq.c
View file @
c49a089c
...
...
@@ -212,12 +212,11 @@ static int __init us3_freq_init(void)
struct
cpufreq_driver
*
driver
;
ret
=
-
ENOMEM
;
driver
=
kzalloc
(
sizeof
(
struct
cpufreq_
driver
),
GFP_KERNEL
);
driver
=
kzalloc
(
sizeof
(
*
driver
),
GFP_KERNEL
);
if
(
!
driver
)
goto
err_out
;
us3_freq_table
=
kzalloc
(
(
NR_CPUS
*
sizeof
(
struct
us3_freq_percpu_info
)),
us3_freq_table
=
kzalloc
((
NR_CPUS
*
sizeof
(
*
us3_freq_table
)),
GFP_KERNEL
);
if
(
!
us3_freq_table
)
goto
err_out
;
...
...
@@ -227,7 +226,6 @@ static int __init us3_freq_init(void)
driver
->
target
=
us3_freq_target
;
driver
->
get
=
us3_freq_get
;
driver
->
exit
=
us3_freq_cpu_exit
;
driver
->
owner
=
THIS_MODULE
,
strcpy
(
driver
->
name
,
"UltraSPARC-III"
);
cpufreq_us3_driver
=
driver
;
...
...
drivers/cpufreq/speedstep-centrino.c
View file @
c49a089c
...
...
@@ -575,7 +575,6 @@ static struct cpufreq_driver centrino_driver = {
.
target
=
centrino_target
,
.
get
=
get_cur_freq
,
.
attr
=
centrino_attr
,
.
owner
=
THIS_MODULE
,
};
/*
...
...
drivers/cpufreq/speedstep-ich.c
View file @
c49a089c
...
...
@@ -378,7 +378,6 @@ static struct cpufreq_driver speedstep_driver = {
.
init
=
speedstep_cpu_init
,
.
exit
=
speedstep_cpu_exit
,
.
get
=
speedstep_get
,
.
owner
=
THIS_MODULE
,
.
attr
=
speedstep_attr
,
};
...
...
drivers/cpufreq/speedstep-smi.c
View file @
c49a089c
...
...
@@ -375,7 +375,6 @@ static struct cpufreq_driver speedstep_driver = {
.
exit
=
speedstep_cpu_exit
,
.
get
=
speedstep_get
,
.
resume
=
speedstep_resume
,
.
owner
=
THIS_MODULE
,
.
attr
=
speedstep_attr
,
};
...
...
include/linux/cpufreq.h
View file @
c49a089c
This diff is collapsed.
Click to expand it.
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