diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-14 12:58:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-14 12:58:24 -0500 |
commit | d0316554d3586cbea60592a41391b5def2553d6f (patch) | |
tree | 5e7418f0bacbc68cec5dfd1541e03eb56870aa02 /drivers/cpufreq | |
parent | fb0bbb92d42d5bd0ab224605444efdfed06d6934 (diff) | |
parent | 51e99be00ce2713cbb841cedc997cafa6e26c7f4 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (34 commits)
m68k: rename global variable vmalloc_end to m68k_vmalloc_end
percpu: add missing per_cpu_ptr_to_phys() definition for UP
percpu: Fix kdump failure if booted with percpu_alloc=page
percpu: make misc percpu symbols unique
percpu: make percpu symbols in ia64 unique
percpu: make percpu symbols in powerpc unique
percpu: make percpu symbols in x86 unique
percpu: make percpu symbols in xen unique
percpu: make percpu symbols in cpufreq unique
percpu: make percpu symbols in oprofile unique
percpu: make percpu symbols in tracer unique
percpu: make percpu symbols under kernel/ and mm/ unique
percpu: remove some sparse warnings
percpu: make alloc_percpu() handle array types
vmalloc: fix use of non-existent percpu variable in put_cpu_var()
this_cpu: Use this_cpu_xx in trace_functions_graph.c
this_cpu: Use this_cpu_xx for ftrace
this_cpu: Use this_cpu_xx in nmi handling
this_cpu: Use this_cpu operations in RCU
this_cpu: Use this_cpu ops for VM statistics
...
Fix up trivial (famous last words) global per-cpu naming conflicts in
arch/x86/kvm/svm.c
mm/slab.c
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 16 | ||||
-rw-r--r-- | drivers/cpufreq/freq_table.c | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index f20668c09ce0..67bc2ece7b4b 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -64,14 +64,14 @@ static DEFINE_SPINLOCK(cpufreq_driver_lock); | |||
64 | * - Lock should not be held across | 64 | * - Lock should not be held across |
65 | * __cpufreq_governor(data, CPUFREQ_GOV_STOP); | 65 | * __cpufreq_governor(data, CPUFREQ_GOV_STOP); |
66 | */ | 66 | */ |
67 | static DEFINE_PER_CPU(int, policy_cpu); | 67 | static DEFINE_PER_CPU(int, cpufreq_policy_cpu); |
68 | static DEFINE_PER_CPU(struct rw_semaphore, cpu_policy_rwsem); | 68 | static DEFINE_PER_CPU(struct rw_semaphore, cpu_policy_rwsem); |
69 | 69 | ||
70 | #define lock_policy_rwsem(mode, cpu) \ | 70 | #define lock_policy_rwsem(mode, cpu) \ |
71 | int lock_policy_rwsem_##mode \ | 71 | int lock_policy_rwsem_##mode \ |
72 | (int cpu) \ | 72 | (int cpu) \ |
73 | { \ | 73 | { \ |
74 | int policy_cpu = per_cpu(policy_cpu, cpu); \ | 74 | int policy_cpu = per_cpu(cpufreq_policy_cpu, cpu); \ |
75 | BUG_ON(policy_cpu == -1); \ | 75 | BUG_ON(policy_cpu == -1); \ |
76 | down_##mode(&per_cpu(cpu_policy_rwsem, policy_cpu)); \ | 76 | down_##mode(&per_cpu(cpu_policy_rwsem, policy_cpu)); \ |
77 | if (unlikely(!cpu_online(cpu))) { \ | 77 | if (unlikely(!cpu_online(cpu))) { \ |
@@ -90,7 +90,7 @@ EXPORT_SYMBOL_GPL(lock_policy_rwsem_write); | |||
90 | 90 | ||
91 | void unlock_policy_rwsem_read(int cpu) | 91 | void unlock_policy_rwsem_read(int cpu) |
92 | { | 92 | { |
93 | int policy_cpu = per_cpu(policy_cpu, cpu); | 93 | int policy_cpu = per_cpu(cpufreq_policy_cpu, cpu); |
94 | BUG_ON(policy_cpu == -1); | 94 | BUG_ON(policy_cpu == -1); |
95 | up_read(&per_cpu(cpu_policy_rwsem, policy_cpu)); | 95 | up_read(&per_cpu(cpu_policy_rwsem, policy_cpu)); |
96 | } | 96 | } |
@@ -98,7 +98,7 @@ EXPORT_SYMBOL_GPL(unlock_policy_rwsem_read); | |||
98 | 98 | ||
99 | void unlock_policy_rwsem_write(int cpu) | 99 | void unlock_policy_rwsem_write(int cpu) |
100 | { | 100 | { |
101 | int policy_cpu = per_cpu(policy_cpu, cpu); | 101 | int policy_cpu = per_cpu(cpufreq_policy_cpu, cpu); |
102 | BUG_ON(policy_cpu == -1); | 102 | BUG_ON(policy_cpu == -1); |
103 | up_write(&per_cpu(cpu_policy_rwsem, policy_cpu)); | 103 | up_write(&per_cpu(cpu_policy_rwsem, policy_cpu)); |
104 | } | 104 | } |
@@ -818,7 +818,7 @@ static int cpufreq_add_dev_policy(unsigned int cpu, | |||
818 | 818 | ||
819 | /* Set proper policy_cpu */ | 819 | /* Set proper policy_cpu */ |
820 | unlock_policy_rwsem_write(cpu); | 820 | unlock_policy_rwsem_write(cpu); |
821 | per_cpu(policy_cpu, cpu) = managed_policy->cpu; | 821 | per_cpu(cpufreq_policy_cpu, cpu) = managed_policy->cpu; |
822 | 822 | ||
823 | if (lock_policy_rwsem_write(cpu) < 0) { | 823 | if (lock_policy_rwsem_write(cpu) < 0) { |
824 | /* Should not go through policy unlock path */ | 824 | /* Should not go through policy unlock path */ |
@@ -932,7 +932,7 @@ static int cpufreq_add_dev_interface(unsigned int cpu, | |||
932 | if (!cpu_online(j)) | 932 | if (!cpu_online(j)) |
933 | continue; | 933 | continue; |
934 | per_cpu(cpufreq_cpu_data, j) = policy; | 934 | per_cpu(cpufreq_cpu_data, j) = policy; |
935 | per_cpu(policy_cpu, j) = policy->cpu; | 935 | per_cpu(cpufreq_policy_cpu, j) = policy->cpu; |
936 | } | 936 | } |
937 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); | 937 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); |
938 | 938 | ||
@@ -1020,7 +1020,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
1020 | cpumask_copy(policy->cpus, cpumask_of(cpu)); | 1020 | cpumask_copy(policy->cpus, cpumask_of(cpu)); |
1021 | 1021 | ||
1022 | /* Initially set CPU itself as the policy_cpu */ | 1022 | /* Initially set CPU itself as the policy_cpu */ |
1023 | per_cpu(policy_cpu, cpu) = cpu; | 1023 | per_cpu(cpufreq_policy_cpu, cpu) = cpu; |
1024 | ret = (lock_policy_rwsem_write(cpu) < 0); | 1024 | ret = (lock_policy_rwsem_write(cpu) < 0); |
1025 | WARN_ON(ret); | 1025 | WARN_ON(ret); |
1026 | 1026 | ||
@@ -2002,7 +2002,7 @@ static int __init cpufreq_core_init(void) | |||
2002 | int cpu; | 2002 | int cpu; |
2003 | 2003 | ||
2004 | for_each_possible_cpu(cpu) { | 2004 | for_each_possible_cpu(cpu) { |
2005 | per_cpu(policy_cpu, cpu) = -1; | 2005 | per_cpu(cpufreq_policy_cpu, cpu) = -1; |
2006 | init_rwsem(&per_cpu(cpu_policy_rwsem, cpu)); | 2006 | init_rwsem(&per_cpu(cpu_policy_rwsem, cpu)); |
2007 | } | 2007 | } |
2008 | 2008 | ||
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index a9bd3a05a684..05432216e224 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c | |||
@@ -174,7 +174,7 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, | |||
174 | } | 174 | } |
175 | EXPORT_SYMBOL_GPL(cpufreq_frequency_table_target); | 175 | EXPORT_SYMBOL_GPL(cpufreq_frequency_table_target); |
176 | 176 | ||
177 | static DEFINE_PER_CPU(struct cpufreq_frequency_table *, show_table); | 177 | static DEFINE_PER_CPU(struct cpufreq_frequency_table *, cpufreq_show_table); |
178 | /** | 178 | /** |
179 | * show_available_freqs - show available frequencies for the specified CPU | 179 | * show_available_freqs - show available frequencies for the specified CPU |
180 | */ | 180 | */ |
@@ -185,10 +185,10 @@ static ssize_t show_available_freqs(struct cpufreq_policy *policy, char *buf) | |||
185 | ssize_t count = 0; | 185 | ssize_t count = 0; |
186 | struct cpufreq_frequency_table *table; | 186 | struct cpufreq_frequency_table *table; |
187 | 187 | ||
188 | if (!per_cpu(show_table, cpu)) | 188 | if (!per_cpu(cpufreq_show_table, cpu)) |
189 | return -ENODEV; | 189 | return -ENODEV; |
190 | 190 | ||
191 | table = per_cpu(show_table, cpu); | 191 | table = per_cpu(cpufreq_show_table, cpu); |
192 | 192 | ||
193 | for (i = 0; (table[i].frequency != CPUFREQ_TABLE_END); i++) { | 193 | for (i = 0; (table[i].frequency != CPUFREQ_TABLE_END); i++) { |
194 | if (table[i].frequency == CPUFREQ_ENTRY_INVALID) | 194 | if (table[i].frequency == CPUFREQ_ENTRY_INVALID) |
@@ -217,20 +217,20 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, | |||
217 | unsigned int cpu) | 217 | unsigned int cpu) |
218 | { | 218 | { |
219 | dprintk("setting show_table for cpu %u to %p\n", cpu, table); | 219 | dprintk("setting show_table for cpu %u to %p\n", cpu, table); |
220 | per_cpu(show_table, cpu) = table; | 220 | per_cpu(cpufreq_show_table, cpu) = table; |
221 | } | 221 | } |
222 | EXPORT_SYMBOL_GPL(cpufreq_frequency_table_get_attr); | 222 | EXPORT_SYMBOL_GPL(cpufreq_frequency_table_get_attr); |
223 | 223 | ||
224 | void cpufreq_frequency_table_put_attr(unsigned int cpu) | 224 | void cpufreq_frequency_table_put_attr(unsigned int cpu) |
225 | { | 225 | { |
226 | dprintk("clearing show_table for cpu %u\n", cpu); | 226 | dprintk("clearing show_table for cpu %u\n", cpu); |
227 | per_cpu(show_table, cpu) = NULL; | 227 | per_cpu(cpufreq_show_table, cpu) = NULL; |
228 | } | 228 | } |
229 | EXPORT_SYMBOL_GPL(cpufreq_frequency_table_put_attr); | 229 | EXPORT_SYMBOL_GPL(cpufreq_frequency_table_put_attr); |
230 | 230 | ||
231 | struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu) | 231 | struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu) |
232 | { | 232 | { |
233 | return per_cpu(show_table, cpu); | 233 | return per_cpu(cpufreq_show_table, cpu); |
234 | } | 234 | } |
235 | EXPORT_SYMBOL_GPL(cpufreq_frequency_get_table); | 235 | EXPORT_SYMBOL_GPL(cpufreq_frequency_get_table); |
236 | 236 | ||