aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_ondemand.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-18 11:49:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-18 11:49:13 -0400
commit07d77759c95d899b84f8e473a01cff001019dd5f (patch)
treed039fa6b38475868ebf2bd63ec14f49031d3f0b2 /drivers/cpufreq/cpufreq_ondemand.c
parentb7723f9d21d8d6043e63f5e3e412f321f5f1900c (diff)
parent3998d095354d2a3062bdaa821ef07a1e1c82873c (diff)
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, hypervisor: add missing <linux/module.h> Modify the VMware balloon driver for the new x86_hyper API x86, hypervisor: Export the x86_hyper* symbols x86: Clean up the hypervisor layer x86, HyperV: fix up the license to mshyperv.c x86: Detect running on a Microsoft HyperV system x86, cpu: Make APERF/MPERF a normal table-driven flag x86, k8: Fix build error when K8_NB is disabled x86, cacheinfo: Disable index in all four subcaches x86, cacheinfo: Make L3 cache info per node x86, cacheinfo: Reorganize AMD L3 cache structure x86, cacheinfo: Turn off L3 cache index disable feature in virtualized environments x86, cacheinfo: Unify AMD L3 cache index disable checking cpufreq: Unify sysfs attribute definition macros powernow-k8: Fix frequency reporting x86, cpufreq: Add APERF/MPERF support for AMD processors x86: Unify APERF/MPERF support powernow-k8: Add core performance boost support x86, cpu: Add AMD core boosting feature flag to /proc/cpuinfo Fix up trivial conflicts in arch/x86/kernel/cpu/intel_cacheinfo.c and drivers/cpufreq/cpufreq_ondemand.c
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c42
1 files changed, 13 insertions, 29 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 8e9dbdc6c70..e1314212d8d 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -246,12 +246,8 @@ static ssize_t show_sampling_rate_min(struct kobject *kobj,
246 return sprintf(buf, "%u\n", min_sampling_rate); 246 return sprintf(buf, "%u\n", min_sampling_rate);
247} 247}
248 248
249#define define_one_ro(_name) \ 249define_one_global_ro(sampling_rate_max);
250static struct global_attr _name = \ 250define_one_global_ro(sampling_rate_min);
251__ATTR(_name, 0444, show_##_name, NULL)
252
253define_one_ro(sampling_rate_max);
254define_one_ro(sampling_rate_min);
255 251
256/* cpufreq_ondemand Governor Tunables */ 252/* cpufreq_ondemand Governor Tunables */
257#define show_one(file_name, object) \ 253#define show_one(file_name, object) \
@@ -287,12 +283,8 @@ show_one_old(powersave_bias);
287show_one_old(sampling_rate_min); 283show_one_old(sampling_rate_min);
288show_one_old(sampling_rate_max); 284show_one_old(sampling_rate_max);
289 285
290#define define_one_ro_old(object, _name) \ 286cpufreq_freq_attr_ro_old(sampling_rate_min);
291static struct freq_attr object = \ 287cpufreq_freq_attr_ro_old(sampling_rate_max);
292__ATTR(_name, 0444, show_##_name##_old, NULL)
293
294define_one_ro_old(sampling_rate_min_old, sampling_rate_min);
295define_one_ro_old(sampling_rate_max_old, sampling_rate_max);
296 288
297/*** delete after deprecation time ***/ 289/*** delete after deprecation time ***/
298 290
@@ -406,15 +398,11 @@ static ssize_t store_powersave_bias(struct kobject *a, struct attribute *b,
406 return count; 398 return count;
407} 399}
408 400
409#define define_one_rw(_name) \ 401define_one_global_rw(sampling_rate);
410static struct global_attr _name = \ 402define_one_global_rw(io_is_busy);
411__ATTR(_name, 0644, show_##_name, store_##_name) 403define_one_global_rw(up_threshold);
412 404define_one_global_rw(ignore_nice_load);
413define_one_rw(sampling_rate); 405define_one_global_rw(powersave_bias);
414define_one_rw(io_is_busy);
415define_one_rw(up_threshold);
416define_one_rw(ignore_nice_load);
417define_one_rw(powersave_bias);
418 406
419static struct attribute *dbs_attributes[] = { 407static struct attribute *dbs_attributes[] = {
420 &sampling_rate_max.attr, 408 &sampling_rate_max.attr,
@@ -447,14 +435,10 @@ write_one_old(up_threshold);
447write_one_old(ignore_nice_load); 435write_one_old(ignore_nice_load);
448write_one_old(powersave_bias); 436write_one_old(powersave_bias);
449 437
450#define define_one_rw_old(object, _name) \ 438cpufreq_freq_attr_rw_old(sampling_rate);
451static struct freq_attr object = \ 439cpufreq_freq_attr_rw_old(up_threshold);
452__ATTR(_name, 0644, show_##_name##_old, store_##_name##_old) 440cpufreq_freq_attr_rw_old(ignore_nice_load);
453 441cpufreq_freq_attr_rw_old(powersave_bias);
454define_one_rw_old(sampling_rate_old, sampling_rate);
455define_one_rw_old(up_threshold_old, up_threshold);
456define_one_rw_old(ignore_nice_load_old, ignore_nice_load);
457define_one_rw_old(powersave_bias_old, powersave_bias);
458 442
459static struct attribute *dbs_attributes_old[] = { 443static struct attribute *dbs_attributes_old[] = {
460 &sampling_rate_max_old.attr, 444 &sampling_rate_max_old.attr,