Skip to content

Commit 0429fbc

Browse files
committed
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 ...
2 parents 6929c35 + 513d1a2 commit 0429fbc

File tree

149 files changed

+560
-547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+560
-547
lines changed

arch/alpha/kernel/perf_event.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static void maybe_change_configuration(struct cpu_hw_events *cpuc)
431431
*/
432432
static int alpha_pmu_add(struct perf_event *event, int flags)
433433
{
434-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
434+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
435435
struct hw_perf_event *hwc = &event->hw;
436436
int n0;
437437
int ret;
@@ -483,7 +483,7 @@ static int alpha_pmu_add(struct perf_event *event, int flags)
483483
*/
484484
static void alpha_pmu_del(struct perf_event *event, int flags)
485485
{
486-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
486+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
487487
struct hw_perf_event *hwc = &event->hw;
488488
unsigned long irq_flags;
489489
int j;
@@ -531,7 +531,7 @@ static void alpha_pmu_read(struct perf_event *event)
531531
static void alpha_pmu_stop(struct perf_event *event, int flags)
532532
{
533533
struct hw_perf_event *hwc = &event->hw;
534-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
534+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
535535

536536
if (!(hwc->state & PERF_HES_STOPPED)) {
537537
cpuc->idx_mask &= ~(1UL<<hwc->idx);
@@ -551,7 +551,7 @@ static void alpha_pmu_stop(struct perf_event *event, int flags)
551551
static void alpha_pmu_start(struct perf_event *event, int flags)
552552
{
553553
struct hw_perf_event *hwc = &event->hw;
554-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
554+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
555555

556556
if (WARN_ON_ONCE(!(hwc->state & PERF_HES_STOPPED)))
557557
return;
@@ -724,7 +724,7 @@ static int alpha_pmu_event_init(struct perf_event *event)
724724
*/
725725
static void alpha_pmu_enable(struct pmu *pmu)
726726
{
727-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
727+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
728728

729729
if (cpuc->enabled)
730730
return;
@@ -750,7 +750,7 @@ static void alpha_pmu_enable(struct pmu *pmu)
750750

751751
static void alpha_pmu_disable(struct pmu *pmu)
752752
{
753-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
753+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
754754

755755
if (!cpuc->enabled)
756756
return;
@@ -814,8 +814,8 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,
814814
struct hw_perf_event *hwc;
815815
int idx, j;
816816

817-
__get_cpu_var(irq_pmi_count)++;
818-
cpuc = &__get_cpu_var(cpu_hw_events);
817+
__this_cpu_inc(irq_pmi_count);
818+
cpuc = this_cpu_ptr(&cpu_hw_events);
819819

820820
/* Completely counting through the PMC's period to trigger a new PMC
821821
* overflow interrupt while in this interrupt routine is utterly

arch/alpha/kernel/time.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ unsigned long est_cycle_freq;
5656

5757
DEFINE_PER_CPU(u8, irq_work_pending);
5858

59-
#define set_irq_work_pending_flag() __get_cpu_var(irq_work_pending) = 1
60-
#define test_irq_work_pending() __get_cpu_var(irq_work_pending)
61-
#define clear_irq_work_pending() __get_cpu_var(irq_work_pending) = 0
59+
#define set_irq_work_pending_flag() __this_cpu_write(irq_work_pending, 1)
60+
#define test_irq_work_pending() __this_cpu_read(irq_work_pending)
61+
#define clear_irq_work_pending() __this_cpu_write(irq_work_pending, 0)
6262

6363
void arch_irq_work_raise(void)
6464
{

arch/arm/kernel/smp_twd.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int twd_timer_ack(void)
9292

9393
static void twd_timer_stop(void)
9494
{
95-
struct clock_event_device *clk = __this_cpu_ptr(twd_evt);
95+
struct clock_event_device *clk = raw_cpu_ptr(twd_evt);
9696

9797
twd_set_mode(CLOCK_EVT_MODE_UNUSED, clk);
9898
disable_percpu_irq(clk->irq);
@@ -108,7 +108,7 @@ static void twd_update_frequency(void *new_rate)
108108
{
109109
twd_timer_rate = *((unsigned long *) new_rate);
110110

111-
clockevents_update_freq(__this_cpu_ptr(twd_evt), twd_timer_rate);
111+
clockevents_update_freq(raw_cpu_ptr(twd_evt), twd_timer_rate);
112112
}
113113

114114
static int twd_rate_change(struct notifier_block *nb,
@@ -134,7 +134,7 @@ static struct notifier_block twd_clk_nb = {
134134

135135
static int twd_clk_init(void)
136136
{
137-
if (twd_evt && __this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk))
137+
if (twd_evt && raw_cpu_ptr(twd_evt) && !IS_ERR(twd_clk))
138138
return clk_notifier_register(twd_clk, &twd_clk_nb);
139139

140140
return 0;
@@ -153,7 +153,7 @@ static void twd_update_frequency(void *data)
153153
{
154154
twd_timer_rate = clk_get_rate(twd_clk);
155155

156-
clockevents_update_freq(__this_cpu_ptr(twd_evt), twd_timer_rate);
156+
clockevents_update_freq(raw_cpu_ptr(twd_evt), twd_timer_rate);
157157
}
158158

159159
static int twd_cpufreq_transition(struct notifier_block *nb,
@@ -179,7 +179,7 @@ static struct notifier_block twd_cpufreq_nb = {
179179

180180
static int twd_cpufreq_init(void)
181181
{
182-
if (twd_evt && __this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk))
182+
if (twd_evt && raw_cpu_ptr(twd_evt) && !IS_ERR(twd_clk))
183183
return cpufreq_register_notifier(&twd_cpufreq_nb,
184184
CPUFREQ_TRANSITION_NOTIFIER);
185185

@@ -269,7 +269,7 @@ static void twd_get_clock(struct device_node *np)
269269
*/
270270
static void twd_timer_setup(void)
271271
{
272-
struct clock_event_device *clk = __this_cpu_ptr(twd_evt);
272+
struct clock_event_device *clk = raw_cpu_ptr(twd_evt);
273273
int cpu = smp_processor_id();
274274

275275
/*

arch/avr32/kernel/kprobes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs)
104104

105105
static void __kprobes set_current_kprobe(struct kprobe *p)
106106
{
107-
__get_cpu_var(current_kprobe) = p;
107+
__this_cpu_write(current_kprobe, p);
108108
}
109109

110110
static int __kprobes kprobe_handler(struct pt_regs *regs)

arch/blackfin/include/asm/ipipe.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul)
157157
}
158158

159159
#define __ipipe_do_root_xirq(ipd, irq) \
160-
((ipd)->irqs[irq].handler(irq, &__raw_get_cpu_var(__ipipe_tick_regs)))
160+
((ipd)->irqs[irq].handler(irq, raw_cpu_ptr(&__ipipe_tick_regs)))
161161

162162
#define __ipipe_run_irqtail(irq) /* Must be a macro */ \
163163
do { \

arch/blackfin/kernel/perf_event.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static void bfin_perf_event_update(struct perf_event *event,
300300

301301
static void bfin_pmu_stop(struct perf_event *event, int flags)
302302
{
303-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
303+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
304304
struct hw_perf_event *hwc = &event->hw;
305305
int idx = hwc->idx;
306306

@@ -318,7 +318,7 @@ static void bfin_pmu_stop(struct perf_event *event, int flags)
318318

319319
static void bfin_pmu_start(struct perf_event *event, int flags)
320320
{
321-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
321+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
322322
struct hw_perf_event *hwc = &event->hw;
323323
int idx = hwc->idx;
324324

@@ -335,7 +335,7 @@ static void bfin_pmu_start(struct perf_event *event, int flags)
335335

336336
static void bfin_pmu_del(struct perf_event *event, int flags)
337337
{
338-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
338+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
339339

340340
bfin_pmu_stop(event, PERF_EF_UPDATE);
341341
__clear_bit(event->hw.idx, cpuc->used_mask);
@@ -345,7 +345,7 @@ static void bfin_pmu_del(struct perf_event *event, int flags)
345345

346346
static int bfin_pmu_add(struct perf_event *event, int flags)
347347
{
348-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
348+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
349349
struct hw_perf_event *hwc = &event->hw;
350350
int idx = hwc->idx;
351351
int ret = -EAGAIN;
@@ -421,7 +421,7 @@ static int bfin_pmu_event_init(struct perf_event *event)
421421

422422
static void bfin_pmu_enable(struct pmu *pmu)
423423
{
424-
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
424+
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
425425
struct perf_event *event;
426426
struct hw_perf_event *hwc;
427427
int i;

arch/blackfin/mach-common/ints-priority.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1309,12 +1309,12 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
13091309
bfin_write_TIMER_STATUS(1); /* Latch TIMIL0 */
13101310
#endif
13111311
/* This is basically what we need from the register frame. */
1312-
__raw_get_cpu_var(__ipipe_tick_regs).ipend = regs->ipend;
1313-
__raw_get_cpu_var(__ipipe_tick_regs).pc = regs->pc;
1312+
__this_cpu_write(__ipipe_tick_regs.ipend, regs->ipend);
1313+
__this_cpu_write(__ipipe_tick_regs.pc, regs->pc);
13141314
if (this_domain != ipipe_root_domain)
1315-
__raw_get_cpu_var(__ipipe_tick_regs).ipend &= ~0x10;
1315+
__this_cpu_and(__ipipe_tick_regs.ipend, ~0x10);
13161316
else
1317-
__raw_get_cpu_var(__ipipe_tick_regs).ipend |= 0x10;
1317+
__this_cpu_or(__ipipe_tick_regs.ipend, 0x10);
13181318
}
13191319

13201320
/*

arch/blackfin/mach-common/smp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static irqreturn_t ipi_handler_int1(int irq, void *dev_instance)
146146
platform_clear_ipi(cpu, IRQ_SUPPLE_1);
147147

148148
smp_rmb();
149-
bfin_ipi_data = &__get_cpu_var(bfin_ipi);
149+
bfin_ipi_data = this_cpu_ptr(&bfin_ipi);
150150
while ((pending = atomic_xchg(&bfin_ipi_data->bits, 0)) != 0) {
151151
msg = 0;
152152
do {

arch/ia64/include/asm/hw_irq.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static inline ia64_vector __ia64_irq_to_vector(int irq)
159159
static inline unsigned int
160160
__ia64_local_vector_to_irq (ia64_vector vec)
161161
{
162-
return __get_cpu_var(vector_irq)[vec];
162+
return __this_cpu_read(vector_irq[vec]);
163163
}
164164
#endif
165165

arch/ia64/include/asm/sn/arch.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct sn_hub_info_s {
5757
u16 nasid_bitmask;
5858
};
5959
DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info);
60-
#define sn_hub_info (&__get_cpu_var(__sn_hub_info))
60+
#define sn_hub_info this_cpu_ptr(&__sn_hub_info)
6161
#define is_shub2() (sn_hub_info->shub2)
6262
#define is_shub1() (sn_hub_info->shub2 == 0)
6363

@@ -72,7 +72,7 @@ DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info);
7272
* cpu.
7373
*/
7474
DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]);
75-
#define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0]))
75+
#define sn_cnodeid_to_nasid this_cpu_ptr(&__sn_cnodeid_to_nasid[0])
7676

7777

7878
extern u8 sn_partition_id;

arch/ia64/include/asm/sn/nodepda.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ typedef struct nodepda_s nodepda_t;
7070
*/
7171

7272
DECLARE_PER_CPU(struct nodepda_s *, __sn_nodepda);
73-
#define sn_nodepda (__get_cpu_var(__sn_nodepda))
73+
#define sn_nodepda __this_cpu_read(__sn_nodepda)
7474
#define NODEPDA(cnodeid) (sn_nodepda->pernode_pdaindr[cnodeid])
7575

7676
/*

arch/ia64/include/asm/switch_to.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extern void ia64_load_extra (struct task_struct *task);
3232

3333
#ifdef CONFIG_PERFMON
3434
DECLARE_PER_CPU(unsigned long, pfm_syst_info);
35-
# define PERFMON_IS_SYSWIDE() (__get_cpu_var(pfm_syst_info) & 0x1)
35+
# define PERFMON_IS_SYSWIDE() (__this_cpu_read(pfm_syst_info) & 0x1)
3636
#else
3737
# define PERFMON_IS_SYSWIDE() (0)
3838
#endif

arch/ia64/include/asm/uv/uv_hub.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ struct uv_hub_info_s {
108108
unsigned char n_val;
109109
};
110110
DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
111-
#define uv_hub_info (&__get_cpu_var(__uv_hub_info))
111+
#define uv_hub_info this_cpu_ptr(&__uv_hub_info)
112112
#define uv_cpu_hub_info(cpu) (&per_cpu(__uv_hub_info, cpu))
113113

114114
/*

arch/ia64/kernel/irq.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ia64_vector __ia64_irq_to_vector(int irq)
4242

4343
unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
4444
{
45-
return __get_cpu_var(vector_irq)[vec];
45+
return __this_cpu_read(vector_irq[vec]);
4646
}
4747
#endif
4848

arch/ia64/kernel/irq_ia64.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
330330
int irq;
331331
struct irq_desc *desc;
332332
struct irq_cfg *cfg;
333-
irq = __get_cpu_var(vector_irq)[vector];
333+
irq = __this_cpu_read(vector_irq[vector]);
334334
if (irq < 0)
335335
continue;
336336

@@ -344,7 +344,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
344344
goto unlock;
345345

346346
spin_lock_irqsave(&vector_lock, flags);
347-
__get_cpu_var(vector_irq)[vector] = -1;
347+
__this_cpu_write(vector_irq[vector], -1);
348348
cpu_clear(me, vector_table[vector]);
349349
spin_unlock_irqrestore(&vector_lock, flags);
350350
cfg->move_cleanup_count--;

arch/ia64/kernel/kprobes.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -396,15 +396,15 @@ static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb)
396396
{
397397
unsigned int i;
398398
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);
400400
kcb->kprobe_status = kcb->prev_kprobe[i-1].status;
401401
atomic_sub(1, &kcb->prev_kprobe_index);
402402
}
403403

404404
static void __kprobes set_current_kprobe(struct kprobe *p,
405405
struct kprobe_ctlblk *kcb)
406406
{
407-
__get_cpu_var(current_kprobe) = p;
407+
__this_cpu_write(current_kprobe, p);
408408
}
409409

410410
static void kretprobe_trampoline(void)
@@ -823,7 +823,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
823823
/*
824824
* jprobe instrumented function just completed
825825
*/
826-
p = __get_cpu_var(current_kprobe);
826+
p = __this_cpu_read(current_kprobe);
827827
if (p->break_handler && p->break_handler(p, regs)) {
828828
goto ss_probe;
829829
}

arch/ia64/kernel/mca.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
13411341
ia64_mlogbuf_finish(1);
13421342
}
13431343

1344-
if (__get_cpu_var(ia64_mca_tr_reload)) {
1344+
if (__this_cpu_read(ia64_mca_tr_reload)) {
13451345
mca_insert_tr(0x1); /*Reload dynamic itrs*/
13461346
mca_insert_tr(0x2); /*Reload dynamic itrs*/
13471347
}
@@ -1868,14 +1868,14 @@ ia64_mca_cpu_init(void *cpu_data)
18681868
"MCA", cpu);
18691869
format_mca_init_stack(data, offsetof(struct ia64_mca_cpu, init_stack),
18701870
"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)));
18721872

18731873
/*
18741874
* Stash away a copy of the PTE needed to map the per-CPU page.
18751875
* We may need it during MCA recovery.
18761876
*/
1877-
__get_cpu_var(ia64_mca_per_cpu_pte) =
1878-
pte_val(mk_pte_phys(__pa(cpu_data), PAGE_KERNEL));
1877+
__this_cpu_write(ia64_mca_per_cpu_pte,
1878+
pte_val(mk_pte_phys(__pa(cpu_data), PAGE_KERNEL)));
18791879

18801880
/*
18811881
* Also, stash away a copy of the PAL address and the PTE
@@ -1884,10 +1884,10 @@ ia64_mca_cpu_init(void *cpu_data)
18841884
pal_vaddr = efi_get_pal_addr();
18851885
if (!pal_vaddr)
18861886
return;
1887-
__get_cpu_var(ia64_mca_pal_base) =
1888-
GRANULEROUNDDOWN((unsigned long) pal_vaddr);
1889-
__get_cpu_var(ia64_mca_pal_pte) = pte_val(mk_pte_phys(__pa(pal_vaddr),
1890-
PAGE_KERNEL));
1887+
__this_cpu_write(ia64_mca_pal_base,
1888+
GRANULEROUNDDOWN((unsigned long) pal_vaddr));
1889+
__this_cpu_write(ia64_mca_pal_pte, pte_val(mk_pte_phys(__pa(pal_vaddr),
1890+
PAGE_KERNEL)));
18911891
}
18921892

18931893
static void ia64_mca_cmc_vector_adjust(void *dummy)

arch/ia64/kernel/process.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static inline void play_dead(void)
215215
unsigned int this_cpu = smp_processor_id();
216216

217217
/* Ack it */
218-
__get_cpu_var(cpu_state) = CPU_DEAD;
218+
__this_cpu_write(cpu_state, CPU_DEAD);
219219

220220
max_xtp();
221221
local_irq_disable();
@@ -273,7 +273,7 @@ ia64_save_extra (struct task_struct *task)
273273
if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
274274
pfm_save_regs(task);
275275

276-
info = __get_cpu_var(pfm_syst_info);
276+
info = __this_cpu_read(pfm_syst_info);
277277
if (info & PFM_CPUINFO_SYST_WIDE)
278278
pfm_syst_wide_update_task(task, info, 0);
279279
#endif
@@ -293,7 +293,7 @@ ia64_load_extra (struct task_struct *task)
293293
if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
294294
pfm_load_regs(task);
295295

296-
info = __get_cpu_var(pfm_syst_info);
296+
info = __this_cpu_read(pfm_syst_info);
297297
if (info & PFM_CPUINFO_SYST_WIDE)
298298
pfm_syst_wide_update_task(task, info, 1);
299299
#endif

0 commit comments

Comments
 (0)