aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_perflib.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-06-09 19:22:23 -0400
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 17:27:01 -0400
commit706546d02384b64e083bd9130c56eaa599c66038 (patch)
treef660fa259f7c8f93a1427cdef529a6ffe8331cab /drivers/acpi/processor_perflib.c
parent5411552c707f4b7387ad63141ef3a559e7488091 (diff)
ACPI: change processors from array to per_cpu variable
Change processors from an array sized by NR_CPUS to a per_cpu variable. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r--drivers/acpi/processor_perflib.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index d80b2d1441af..b4749969c6b4 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -89,7 +89,7 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb,
89 if (event != CPUFREQ_INCOMPATIBLE) 89 if (event != CPUFREQ_INCOMPATIBLE)
90 goto out; 90 goto out;
91 91
92 pr = processors[policy->cpu]; 92 pr = per_cpu(processors, policy->cpu);
93 if (!pr || !pr->performance) 93 if (!pr || !pr->performance)
94 goto out; 94 goto out;
95 95
@@ -572,7 +572,7 @@ int acpi_processor_preregister_performance(
572 572
573 /* Call _PSD for all CPUs */ 573 /* Call _PSD for all CPUs */
574 for_each_possible_cpu(i) { 574 for_each_possible_cpu(i) {
575 pr = processors[i]; 575 pr = per_cpu(processors, i);
576 if (!pr) { 576 if (!pr) {
577 /* Look only at processors in ACPI namespace */ 577 /* Look only at processors in ACPI namespace */
578 continue; 578 continue;
@@ -603,7 +603,7 @@ int acpi_processor_preregister_performance(
603 * domain info. 603 * domain info.
604 */ 604 */
605 for_each_possible_cpu(i) { 605 for_each_possible_cpu(i) {
606 pr = processors[i]; 606 pr = per_cpu(processors, i);
607 if (!pr) 607 if (!pr)
608 continue; 608 continue;
609 609
@@ -624,7 +624,7 @@ int acpi_processor_preregister_performance(
624 624
625 cpus_clear(covered_cpus); 625 cpus_clear(covered_cpus);
626 for_each_possible_cpu(i) { 626 for_each_possible_cpu(i) {
627 pr = processors[i]; 627 pr = per_cpu(processors, i);
628 if (!pr) 628 if (!pr)
629 continue; 629 continue;
630 630
@@ -651,7 +651,7 @@ int acpi_processor_preregister_performance(
651 if (i == j) 651 if (i == j)
652 continue; 652 continue;
653 653
654 match_pr = processors[j]; 654 match_pr = per_cpu(processors, j);
655 if (!match_pr) 655 if (!match_pr)
656 continue; 656 continue;
657 657
@@ -680,7 +680,7 @@ int acpi_processor_preregister_performance(
680 if (i == j) 680 if (i == j)
681 continue; 681 continue;
682 682
683 match_pr = processors[j]; 683 match_pr = per_cpu(processors, j);
684 if (!match_pr) 684 if (!match_pr)
685 continue; 685 continue;
686 686
@@ -697,7 +697,7 @@ int acpi_processor_preregister_performance(
697 697
698err_ret: 698err_ret:
699 for_each_possible_cpu(i) { 699 for_each_possible_cpu(i) {
700 pr = processors[i]; 700 pr = per_cpu(processors, i);
701 if (!pr || !pr->performance) 701 if (!pr || !pr->performance)
702 continue; 702 continue;
703 703
@@ -728,7 +728,7 @@ acpi_processor_register_performance(struct acpi_processor_performance
728 728
729 mutex_lock(&performance_mutex); 729 mutex_lock(&performance_mutex);
730 730
731 pr = processors[cpu]; 731 pr = per_cpu(processors, cpu);
732 if (!pr) { 732 if (!pr) {
733 mutex_unlock(&performance_mutex); 733 mutex_unlock(&performance_mutex);
734 return -ENODEV; 734 return -ENODEV;
@@ -766,7 +766,7 @@ acpi_processor_unregister_performance(struct acpi_processor_performance
766 766
767 mutex_lock(&performance_mutex); 767 mutex_lock(&performance_mutex);
768 768
769 pr = processors[cpu]; 769 pr = per_cpu(processors, cpu);
770 if (!pr) { 770 if (!pr) {
771 mutex_unlock(&performance_mutex); 771 mutex_unlock(&performance_mutex);
772 return; 772 return;