aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_throttling.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_throttling.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_throttling.c')
-rw-r--r--drivers/acpi/processor_throttling.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index bb06738860c4..8728782aad3b 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -71,7 +71,7 @@ static int acpi_processor_update_tsd_coord(void)
71 * coordination between all CPUs. 71 * coordination between all CPUs.
72 */ 72 */
73 for_each_possible_cpu(i) { 73 for_each_possible_cpu(i) {
74 pr = processors[i]; 74 pr = per_cpu(processors, i);
75 if (!pr) 75 if (!pr)
76 continue; 76 continue;
77 77
@@ -93,7 +93,7 @@ static int acpi_processor_update_tsd_coord(void)
93 93
94 cpus_clear(covered_cpus); 94 cpus_clear(covered_cpus);
95 for_each_possible_cpu(i) { 95 for_each_possible_cpu(i) {
96 pr = processors[i]; 96 pr = per_cpu(processors, i);
97 if (!pr) 97 if (!pr)
98 continue; 98 continue;
99 99
@@ -119,7 +119,7 @@ static int acpi_processor_update_tsd_coord(void)
119 if (i == j) 119 if (i == j)
120 continue; 120 continue;
121 121
122 match_pr = processors[j]; 122 match_pr = per_cpu(processors, j);
123 if (!match_pr) 123 if (!match_pr)
124 continue; 124 continue;
125 125
@@ -152,7 +152,7 @@ static int acpi_processor_update_tsd_coord(void)
152 if (i == j) 152 if (i == j)
153 continue; 153 continue;
154 154
155 match_pr = processors[j]; 155 match_pr = per_cpu(processors, j);
156 if (!match_pr) 156 if (!match_pr)
157 continue; 157 continue;
158 158
@@ -172,7 +172,7 @@ static int acpi_processor_update_tsd_coord(void)
172 172
173err_ret: 173err_ret:
174 for_each_possible_cpu(i) { 174 for_each_possible_cpu(i) {
175 pr = processors[i]; 175 pr = per_cpu(processors, i);
176 if (!pr) 176 if (!pr)
177 continue; 177 continue;
178 178
@@ -214,7 +214,7 @@ static int acpi_processor_throttling_notifier(unsigned long event, void *data)
214 struct acpi_processor_throttling *p_throttling; 214 struct acpi_processor_throttling *p_throttling;
215 215
216 cpu = p_tstate->cpu; 216 cpu = p_tstate->cpu;
217 pr = processors[cpu]; 217 pr = per_cpu(processors, cpu);
218 if (!pr) { 218 if (!pr) {
219 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid pr pointer\n")); 219 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid pr pointer\n"));
220 return 0; 220 return 0;
@@ -1035,7 +1035,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
1035 * cpus. 1035 * cpus.
1036 */ 1036 */
1037 for_each_cpu_mask(i, online_throttling_cpus) { 1037 for_each_cpu_mask(i, online_throttling_cpus) {
1038 match_pr = processors[i]; 1038 match_pr = per_cpu(processors, i);
1039 /* 1039 /*
1040 * If the pointer is invalid, we will report the 1040 * If the pointer is invalid, we will report the
1041 * error message and continue. 1041 * error message and continue.