aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-15 01:48:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-15 01:48:18 -0400
commit0429fbc0bdc297d64188483ba029a23773ae07b0 (patch)
tree67de46978c90f37540dd6ded1db20eb53a569030 /arch/ia64/kernel
parent6929c358972facf2999f8768815c40dd88514fc2 (diff)
parent513d1a2884a49654f368b5fa25ef186e976bdada (diff)
Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Pull percpu consistent-ops changes from Tejun Heo: "Way back, before the current percpu allocator was implemented, static and dynamic percpu memory areas were allocated and handled separately and had their own accessors. The distinction has been gone for many years now; however, the now duplicate two sets of accessors remained with the pointer based ones - this_cpu_*() - evolving various other operations over time. During the process, we also accumulated other inconsistent operations. This pull request contains Christoph's patches to clean up the duplicate accessor situation. __get_cpu_var() uses are replaced with with this_cpu_ptr() and __this_cpu_ptr() with raw_cpu_ptr(). Unfortunately, the former sometimes is tricky thanks to C being a bit messy with the distinction between lvalues and pointers, which led to a rather ugly solution for cpumask_var_t involving the introduction of this_cpu_cpumask_var_ptr(). This converts most of the uses but not all. Christoph will follow up with the remaining conversions in this merge window and hopefully remove the obsolete accessors" * 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (38 commits) irqchip: Properly fetch the per cpu offset percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t -fix ia64: sn_nodepda cannot be assigned to after this_cpu conversion. Use __this_cpu_write. percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t Revert "powerpc: Replace __get_cpu_var uses" percpu: Remove __this_cpu_ptr clocksource: Replace __this_cpu_ptr with raw_cpu_ptr sparc: Replace __get_cpu_var uses avr32: Replace __get_cpu_var with __this_cpu_write blackfin: Replace __get_cpu_var uses tile: Use this_cpu_ptr() for hardware counters tile: Replace __get_cpu_var uses powerpc: Replace __get_cpu_var uses alpha: Replace __get_cpu_var ia64: Replace __get_cpu_var uses s390: cio driver &__get_cpu_var replacements s390: Replace __get_cpu_var uses mips: Replace __get_cpu_var uses MIPS: Replace __get_cpu_var uses in FPU emulator. arm: Replace __this_cpu_ptr with raw_cpu_ptr ...
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/irq.c2
-rw-r--r--arch/ia64/kernel/irq_ia64.c4
-rw-r--r--arch/ia64/kernel/kprobes.c6
-rw-r--r--arch/ia64/kernel/mca.c16
-rw-r--r--arch/ia64/kernel/process.c6
-rw-r--r--arch/ia64/kernel/traps.c2
6 files changed, 18 insertions, 18 deletions
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index f2c418281130..812a1e6b3179 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -42,7 +42,7 @@ ia64_vector __ia64_irq_to_vector(int irq)
42 42
43unsigned int __ia64_local_vector_to_irq (ia64_vector vec) 43unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
44{ 44{
45 return __get_cpu_var(vector_irq)[vec]; 45 return __this_cpu_read(vector_irq[vec]);
46} 46}
47#endif 47#endif
48 48
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 03ea78ed64a9..698d8fefde6c 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -330,7 +330,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
330 int irq; 330 int irq;
331 struct irq_desc *desc; 331 struct irq_desc *desc;
332 struct irq_cfg *cfg; 332 struct irq_cfg *cfg;
333 irq = __get_cpu_var(vector_irq)[vector]; 333 irq = __this_cpu_read(vector_irq[vector]);
334 if (irq < 0) 334 if (irq < 0)
335 continue; 335 continue;
336 336
@@ -344,7 +344,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
344 goto unlock; 344 goto unlock;
345 345
346 spin_lock_irqsave(&vector_lock, flags); 346 spin_lock_irqsave(&vector_lock, flags);
347 __get_cpu_var(vector_irq)[vector] = -1; 347 __this_cpu_write(vector_irq[vector], -1);
348 cpu_clear(me, vector_table[vector]); 348 cpu_clear(me, vector_table[vector]);
349 spin_unlock_irqrestore(&vector_lock, flags); 349 spin_unlock_irqrestore(&vector_lock, flags);
350 cfg->move_cleanup_count--; 350 cfg->move_cleanup_count--;
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 074fde49c9e6..c7c51445c3be 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -396,7 +396,7 @@ static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb)
396{ 396{
397 unsigned int i; 397 unsigned int i;
398 i = atomic_read(&kcb->prev_kprobe_index); 398 i = atomic_read(&kcb->prev_kprobe_index);
399 __get_cpu_var(current_kprobe) = kcb->prev_kprobe[i-1].kp; 399 __this_cpu_write(current_kprobe, kcb->prev_kprobe[i-1].kp);
400 kcb->kprobe_status = kcb->prev_kprobe[i-1].status; 400 kcb->kprobe_status = kcb->prev_kprobe[i-1].status;
401 atomic_sub(1, &kcb->prev_kprobe_index); 401 atomic_sub(1, &kcb->prev_kprobe_index);
402} 402}
@@ -404,7 +404,7 @@ static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb)
404static void __kprobes set_current_kprobe(struct kprobe *p, 404static void __kprobes set_current_kprobe(struct kprobe *p,
405 struct kprobe_ctlblk *kcb) 405 struct kprobe_ctlblk *kcb)
406{ 406{
407 __get_cpu_var(current_kprobe) = p; 407 __this_cpu_write(current_kprobe, p);
408} 408}
409 409
410static void kretprobe_trampoline(void) 410static void kretprobe_trampoline(void)
@@ -823,7 +823,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
823 /* 823 /*
824 * jprobe instrumented function just completed 824 * jprobe instrumented function just completed
825 */ 825 */
826 p = __get_cpu_var(current_kprobe); 826 p = __this_cpu_read(current_kprobe);
827 if (p->break_handler && p->break_handler(p, regs)) { 827 if (p->break_handler && p->break_handler(p, regs)) {
828 goto ss_probe; 828 goto ss_probe;
829 } 829 }
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index db7b36bb068b..8bfd36af46f8 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -1341,7 +1341,7 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
1341 ia64_mlogbuf_finish(1); 1341 ia64_mlogbuf_finish(1);
1342 } 1342 }
1343 1343
1344 if (__get_cpu_var(ia64_mca_tr_reload)) { 1344 if (__this_cpu_read(ia64_mca_tr_reload)) {
1345 mca_insert_tr(0x1); /*Reload dynamic itrs*/ 1345 mca_insert_tr(0x1); /*Reload dynamic itrs*/
1346 mca_insert_tr(0x2); /*Reload dynamic itrs*/ 1346 mca_insert_tr(0x2); /*Reload dynamic itrs*/
1347 } 1347 }
@@ -1868,14 +1868,14 @@ ia64_mca_cpu_init(void *cpu_data)
1868 "MCA", cpu); 1868 "MCA", cpu);
1869 format_mca_init_stack(data, offsetof(struct ia64_mca_cpu, init_stack), 1869 format_mca_init_stack(data, offsetof(struct ia64_mca_cpu, init_stack),
1870 "INIT", cpu); 1870 "INIT", cpu);
1871 __get_cpu_var(ia64_mca_data) = __per_cpu_mca[cpu] = __pa(data); 1871 __this_cpu_write(ia64_mca_data, (__per_cpu_mca[cpu] = __pa(data)));
1872 1872
1873 /* 1873 /*
1874 * Stash away a copy of the PTE needed to map the per-CPU page. 1874 * Stash away a copy of the PTE needed to map the per-CPU page.
1875 * We may need it during MCA recovery. 1875 * We may need it during MCA recovery.
1876 */ 1876 */
1877 __get_cpu_var(ia64_mca_per_cpu_pte) = 1877 __this_cpu_write(ia64_mca_per_cpu_pte,
1878 pte_val(mk_pte_phys(__pa(cpu_data), PAGE_KERNEL)); 1878 pte_val(mk_pte_phys(__pa(cpu_data), PAGE_KERNEL)));
1879 1879
1880 /* 1880 /*
1881 * Also, stash away a copy of the PAL address and the PTE 1881 * Also, stash away a copy of the PAL address and the PTE
@@ -1884,10 +1884,10 @@ ia64_mca_cpu_init(void *cpu_data)
1884 pal_vaddr = efi_get_pal_addr(); 1884 pal_vaddr = efi_get_pal_addr();
1885 if (!pal_vaddr) 1885 if (!pal_vaddr)
1886 return; 1886 return;
1887 __get_cpu_var(ia64_mca_pal_base) = 1887 __this_cpu_write(ia64_mca_pal_base,
1888 GRANULEROUNDDOWN((unsigned long) pal_vaddr); 1888 GRANULEROUNDDOWN((unsigned long) pal_vaddr));
1889 __get_cpu_var(ia64_mca_pal_pte) = pte_val(mk_pte_phys(__pa(pal_vaddr), 1889 __this_cpu_write(ia64_mca_pal_pte, pte_val(mk_pte_phys(__pa(pal_vaddr),
1890 PAGE_KERNEL)); 1890 PAGE_KERNEL)));
1891} 1891}
1892 1892
1893static void ia64_mca_cmc_vector_adjust(void *dummy) 1893static void ia64_mca_cmc_vector_adjust(void *dummy)
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index deed6fa96bb0..b51514957620 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -215,7 +215,7 @@ static inline void play_dead(void)
215 unsigned int this_cpu = smp_processor_id(); 215 unsigned int this_cpu = smp_processor_id();
216 216
217 /* Ack it */ 217 /* Ack it */
218 __get_cpu_var(cpu_state) = CPU_DEAD; 218 __this_cpu_write(cpu_state, CPU_DEAD);
219 219
220 max_xtp(); 220 max_xtp();
221 local_irq_disable(); 221 local_irq_disable();
@@ -273,7 +273,7 @@ ia64_save_extra (struct task_struct *task)
273 if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0) 273 if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
274 pfm_save_regs(task); 274 pfm_save_regs(task);
275 275
276 info = __get_cpu_var(pfm_syst_info); 276 info = __this_cpu_read(pfm_syst_info);
277 if (info & PFM_CPUINFO_SYST_WIDE) 277 if (info & PFM_CPUINFO_SYST_WIDE)
278 pfm_syst_wide_update_task(task, info, 0); 278 pfm_syst_wide_update_task(task, info, 0);
279#endif 279#endif
@@ -293,7 +293,7 @@ ia64_load_extra (struct task_struct *task)
293 if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0) 293 if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
294 pfm_load_regs(task); 294 pfm_load_regs(task);
295 295
296 info = __get_cpu_var(pfm_syst_info); 296 info = __this_cpu_read(pfm_syst_info);
297 if (info & PFM_CPUINFO_SYST_WIDE) 297 if (info & PFM_CPUINFO_SYST_WIDE)
298 pfm_syst_wide_update_task(task, info, 1); 298 pfm_syst_wide_update_task(task, info, 1);
299#endif 299#endif
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index d3636e67a98e..6f7d4a4dcf24 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -299,7 +299,7 @@ handle_fpu_swa (int fp_fault, struct pt_regs *regs, unsigned long isr)
299 299
300 if (!(current->thread.flags & IA64_THREAD_FPEMU_NOPRINT)) { 300 if (!(current->thread.flags & IA64_THREAD_FPEMU_NOPRINT)) {
301 unsigned long count, current_jiffies = jiffies; 301 unsigned long count, current_jiffies = jiffies;
302 struct fpu_swa_msg *cp = &__get_cpu_var(cpulast); 302 struct fpu_swa_msg *cp = this_cpu_ptr(&cpulast);
303 303
304 if (unlikely(current_jiffies > cp->time)) 304 if (unlikely(current_jiffies > cp->time))
305 cp->count = 0; 305 cp->count = 0;