diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-18 11:49:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-18 11:49:13 -0400 |
commit | 07d77759c95d899b84f8e473a01cff001019dd5f (patch) | |
tree | d039fa6b38475868ebf2bd63ec14f49031d3f0b2 /drivers/cpufreq | |
parent | b7723f9d21d8d6043e63f5e3e412f321f5f1900c (diff) | |
parent | 3998d095354d2a3062bdaa821ef07a1e1c82873c (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')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 40 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 48 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 42 |
3 files changed, 43 insertions, 87 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 75d293eeb3ee..063b2184caf5 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -662,32 +662,20 @@ static ssize_t show_bios_limit(struct cpufreq_policy *policy, char *buf) | |||
662 | return sprintf(buf, "%u\n", policy->cpuinfo.max_freq); | 662 | return sprintf(buf, "%u\n", policy->cpuinfo.max_freq); |
663 | } | 663 | } |
664 | 664 | ||
665 | #define define_one_ro(_name) \ | 665 | cpufreq_freq_attr_ro_perm(cpuinfo_cur_freq, 0400); |
666 | static struct freq_attr _name = \ | 666 | cpufreq_freq_attr_ro(cpuinfo_min_freq); |
667 | __ATTR(_name, 0444, show_##_name, NULL) | 667 | cpufreq_freq_attr_ro(cpuinfo_max_freq); |
668 | 668 | cpufreq_freq_attr_ro(cpuinfo_transition_latency); | |
669 | #define define_one_ro0400(_name) \ | 669 | cpufreq_freq_attr_ro(scaling_available_governors); |
670 | static struct freq_attr _name = \ | 670 | cpufreq_freq_attr_ro(scaling_driver); |
671 | __ATTR(_name, 0400, show_##_name, NULL) | 671 | cpufreq_freq_attr_ro(scaling_cur_freq); |
672 | 672 | cpufreq_freq_attr_ro(bios_limit); | |
673 | #define define_one_rw(_name) \ | 673 | cpufreq_freq_attr_ro(related_cpus); |
674 | static struct freq_attr _name = \ | 674 | cpufreq_freq_attr_ro(affected_cpus); |
675 | __ATTR(_name, 0644, show_##_name, store_##_name) | 675 | cpufreq_freq_attr_rw(scaling_min_freq); |
676 | 676 | cpufreq_freq_attr_rw(scaling_max_freq); | |
677 | define_one_ro0400(cpuinfo_cur_freq); | 677 | cpufreq_freq_attr_rw(scaling_governor); |
678 | define_one_ro(cpuinfo_min_freq); | 678 | cpufreq_freq_attr_rw(scaling_setspeed); |
679 | define_one_ro(cpuinfo_max_freq); | ||
680 | define_one_ro(cpuinfo_transition_latency); | ||
681 | define_one_ro(scaling_available_governors); | ||
682 | define_one_ro(scaling_driver); | ||
683 | define_one_ro(scaling_cur_freq); | ||
684 | define_one_ro(bios_limit); | ||
685 | define_one_ro(related_cpus); | ||
686 | define_one_ro(affected_cpus); | ||
687 | define_one_rw(scaling_min_freq); | ||
688 | define_one_rw(scaling_max_freq); | ||
689 | define_one_rw(scaling_governor); | ||
690 | define_one_rw(scaling_setspeed); | ||
691 | 679 | ||
692 | static struct attribute *default_attrs[] = { | 680 | static struct attribute *default_attrs[] = { |
693 | &cpuinfo_min_freq.attr, | 681 | &cpuinfo_min_freq.attr, |
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 3a147874a465..526bfbf69611 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -178,12 +178,8 @@ static ssize_t show_sampling_rate_min(struct kobject *kobj, | |||
178 | return sprintf(buf, "%u\n", min_sampling_rate); | 178 | return sprintf(buf, "%u\n", min_sampling_rate); |
179 | } | 179 | } |
180 | 180 | ||
181 | #define define_one_ro(_name) \ | 181 | define_one_global_ro(sampling_rate_max); |
182 | static struct global_attr _name = \ | 182 | define_one_global_ro(sampling_rate_min); |
183 | __ATTR(_name, 0444, show_##_name, NULL) | ||
184 | |||
185 | define_one_ro(sampling_rate_max); | ||
186 | define_one_ro(sampling_rate_min); | ||
187 | 183 | ||
188 | /* cpufreq_conservative Governor Tunables */ | 184 | /* cpufreq_conservative Governor Tunables */ |
189 | #define show_one(file_name, object) \ | 185 | #define show_one(file_name, object) \ |
@@ -221,12 +217,8 @@ show_one_old(freq_step); | |||
221 | show_one_old(sampling_rate_min); | 217 | show_one_old(sampling_rate_min); |
222 | show_one_old(sampling_rate_max); | 218 | show_one_old(sampling_rate_max); |
223 | 219 | ||
224 | #define define_one_ro_old(object, _name) \ | 220 | cpufreq_freq_attr_ro_old(sampling_rate_min); |
225 | static struct freq_attr object = \ | 221 | cpufreq_freq_attr_ro_old(sampling_rate_max); |
226 | __ATTR(_name, 0444, show_##_name##_old, NULL) | ||
227 | |||
228 | define_one_ro_old(sampling_rate_min_old, sampling_rate_min); | ||
229 | define_one_ro_old(sampling_rate_max_old, sampling_rate_max); | ||
230 | 222 | ||
231 | /*** delete after deprecation time ***/ | 223 | /*** delete after deprecation time ***/ |
232 | 224 | ||
@@ -364,16 +356,12 @@ static ssize_t store_freq_step(struct kobject *a, struct attribute *b, | |||
364 | return count; | 356 | return count; |
365 | } | 357 | } |
366 | 358 | ||
367 | #define define_one_rw(_name) \ | 359 | define_one_global_rw(sampling_rate); |
368 | static struct global_attr _name = \ | 360 | define_one_global_rw(sampling_down_factor); |
369 | __ATTR(_name, 0644, show_##_name, store_##_name) | 361 | define_one_global_rw(up_threshold); |
370 | 362 | define_one_global_rw(down_threshold); | |
371 | define_one_rw(sampling_rate); | 363 | define_one_global_rw(ignore_nice_load); |
372 | define_one_rw(sampling_down_factor); | 364 | define_one_global_rw(freq_step); |
373 | define_one_rw(up_threshold); | ||
374 | define_one_rw(down_threshold); | ||
375 | define_one_rw(ignore_nice_load); | ||
376 | define_one_rw(freq_step); | ||
377 | 365 | ||
378 | static struct attribute *dbs_attributes[] = { | 366 | static struct attribute *dbs_attributes[] = { |
379 | &sampling_rate_max.attr, | 367 | &sampling_rate_max.attr, |
@@ -409,16 +397,12 @@ write_one_old(down_threshold); | |||
409 | write_one_old(ignore_nice_load); | 397 | write_one_old(ignore_nice_load); |
410 | write_one_old(freq_step); | 398 | write_one_old(freq_step); |
411 | 399 | ||
412 | #define define_one_rw_old(object, _name) \ | 400 | cpufreq_freq_attr_rw_old(sampling_rate); |
413 | static struct freq_attr object = \ | 401 | cpufreq_freq_attr_rw_old(sampling_down_factor); |
414 | __ATTR(_name, 0644, show_##_name##_old, store_##_name##_old) | 402 | cpufreq_freq_attr_rw_old(up_threshold); |
415 | 403 | cpufreq_freq_attr_rw_old(down_threshold); | |
416 | define_one_rw_old(sampling_rate_old, sampling_rate); | 404 | cpufreq_freq_attr_rw_old(ignore_nice_load); |
417 | define_one_rw_old(sampling_down_factor_old, sampling_down_factor); | 405 | cpufreq_freq_attr_rw_old(freq_step); |
418 | define_one_rw_old(up_threshold_old, up_threshold); | ||
419 | define_one_rw_old(down_threshold_old, down_threshold); | ||
420 | define_one_rw_old(ignore_nice_load_old, ignore_nice_load); | ||
421 | define_one_rw_old(freq_step_old, freq_step); | ||
422 | 406 | ||
423 | static struct attribute *dbs_attributes_old[] = { | 407 | static struct attribute *dbs_attributes_old[] = { |
424 | &sampling_rate_max_old.attr, | 408 | &sampling_rate_max_old.attr, |
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 8e9dbdc6c700..e1314212d8d4 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) \ | 249 | define_one_global_ro(sampling_rate_max); |
250 | static struct global_attr _name = \ | 250 | define_one_global_ro(sampling_rate_min); |
251 | __ATTR(_name, 0444, show_##_name, NULL) | ||
252 | |||
253 | define_one_ro(sampling_rate_max); | ||
254 | define_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); | |||
287 | show_one_old(sampling_rate_min); | 283 | show_one_old(sampling_rate_min); |
288 | show_one_old(sampling_rate_max); | 284 | show_one_old(sampling_rate_max); |
289 | 285 | ||
290 | #define define_one_ro_old(object, _name) \ | 286 | cpufreq_freq_attr_ro_old(sampling_rate_min); |
291 | static struct freq_attr object = \ | 287 | cpufreq_freq_attr_ro_old(sampling_rate_max); |
292 | __ATTR(_name, 0444, show_##_name##_old, NULL) | ||
293 | |||
294 | define_one_ro_old(sampling_rate_min_old, sampling_rate_min); | ||
295 | define_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) \ | 401 | define_one_global_rw(sampling_rate); |
410 | static struct global_attr _name = \ | 402 | define_one_global_rw(io_is_busy); |
411 | __ATTR(_name, 0644, show_##_name, store_##_name) | 403 | define_one_global_rw(up_threshold); |
412 | 404 | define_one_global_rw(ignore_nice_load); | |
413 | define_one_rw(sampling_rate); | 405 | define_one_global_rw(powersave_bias); |
414 | define_one_rw(io_is_busy); | ||
415 | define_one_rw(up_threshold); | ||
416 | define_one_rw(ignore_nice_load); | ||
417 | define_one_rw(powersave_bias); | ||
418 | 406 | ||
419 | static struct attribute *dbs_attributes[] = { | 407 | static struct attribute *dbs_attributes[] = { |
420 | &sampling_rate_max.attr, | 408 | &sampling_rate_max.attr, |
@@ -447,14 +435,10 @@ write_one_old(up_threshold); | |||
447 | write_one_old(ignore_nice_load); | 435 | write_one_old(ignore_nice_load); |
448 | write_one_old(powersave_bias); | 436 | write_one_old(powersave_bias); |
449 | 437 | ||
450 | #define define_one_rw_old(object, _name) \ | 438 | cpufreq_freq_attr_rw_old(sampling_rate); |
451 | static struct freq_attr object = \ | 439 | cpufreq_freq_attr_rw_old(up_threshold); |
452 | __ATTR(_name, 0644, show_##_name##_old, store_##_name##_old) | 440 | cpufreq_freq_attr_rw_old(ignore_nice_load); |
453 | 441 | cpufreq_freq_attr_rw_old(powersave_bias); | |
454 | define_one_rw_old(sampling_rate_old, sampling_rate); | ||
455 | define_one_rw_old(up_threshold_old, up_threshold); | ||
456 | define_one_rw_old(ignore_nice_load_old, ignore_nice_load); | ||
457 | define_one_rw_old(powersave_bias_old, powersave_bias); | ||
458 | 442 | ||
459 | static struct attribute *dbs_attributes_old[] = { | 443 | static struct attribute *dbs_attributes_old[] = { |
460 | &sampling_rate_max_old.attr, | 444 | &sampling_rate_max_old.attr, |