]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86: change __get_cpu_var calls introduced in 3.14
authorChristoph Lameter <cl@linux.com>
Thu, 6 Mar 2014 00:05:27 +0000 (11:05 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 Mar 2014 07:13:48 +0000 (18:13 +1100)
More were added recently.

Signed-off-by: Christoph Lameter <cl@linux.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/cpu/perf_event_intel_rapl.c
kernel/sched/deadline.c
kernel/time/tick-broadcast.c

index 5ad35ad94d0f819b1cf54f627d5df4fcfc58e460..d0dbcdf612d93b6e743f38739f00327d4d59a8b5 100644 (file)
@@ -129,7 +129,7 @@ static inline u64 rapl_scale(u64 v)
         * or use ldexp(count, -32).
         * Watts = Joules/Time delta
         */
-       return v << (32 - __get_cpu_var(rapl_pmu)->hw_unit);
+       return v << (32 - __this_cpu_read(rapl_pmu->hw_unit));
 }
 
 static u64 rapl_event_update(struct perf_event *event)
@@ -181,7 +181,7 @@ static void rapl_stop_hrtimer(struct rapl_pmu *pmu)
 
 static enum hrtimer_restart rapl_hrtimer_handle(struct hrtimer *hrtimer)
 {
-       struct rapl_pmu *pmu = __get_cpu_var(rapl_pmu);
+       struct rapl_pmu *pmu = __this_cpu_read(rapl_pmu);
        struct perf_event *event;
        unsigned long flags;
 
@@ -228,7 +228,7 @@ static void __rapl_pmu_event_start(struct rapl_pmu *pmu,
 
 static void rapl_pmu_event_start(struct perf_event *event, int mode)
 {
-       struct rapl_pmu *pmu = __get_cpu_var(rapl_pmu);
+       struct rapl_pmu *pmu = __this_cpu_read(rapl_pmu);
        unsigned long flags;
 
        spin_lock_irqsave(&pmu->lock, flags);
@@ -238,7 +238,7 @@ static void rapl_pmu_event_start(struct perf_event *event, int mode)
 
 static void rapl_pmu_event_stop(struct perf_event *event, int mode)
 {
-       struct rapl_pmu *pmu = __get_cpu_var(rapl_pmu);
+       struct rapl_pmu *pmu = __this_cpu_read(rapl_pmu);
        struct hw_perf_event *hwc = &event->hw;
        unsigned long flags;
 
@@ -272,7 +272,7 @@ static void rapl_pmu_event_stop(struct perf_event *event, int mode)
 
 static int rapl_pmu_event_add(struct perf_event *event, int mode)
 {
-       struct rapl_pmu *pmu = __get_cpu_var(rapl_pmu);
+       struct rapl_pmu *pmu = __this_cpu_read(rapl_pmu);
        struct hw_perf_event *hwc = &event->hw;
        unsigned long flags;
 
@@ -662,7 +662,7 @@ static int __init rapl_pmu_init(void)
                return -1;
        }
 
-       pmu = __get_cpu_var(rapl_pmu);
+       pmu = __this_cpu_read(rapl_pmu);
 
        pr_info("RAPL PMU detected, hw unit 2^-%d Joules,"
                " API unit is 2^-32 Joules,"
index e4f3ac3b8514584e31fb6b1f2a9540b852bd2b21..950c13008b62bb9a9da0af9f7474c2a46545f6f7 100644 (file)
@@ -1141,7 +1141,7 @@ static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask_dl);
 static int find_later_rq(struct task_struct *task)
 {
        struct sched_domain *sd;
-       struct cpumask *later_mask = __get_cpu_var(local_cpu_mask_dl);
+       struct cpumask *later_mask = this_cpu_ptr(local_cpu_mask_dl);
        int this_cpu = smp_processor_id();
        int best_cpu, cpu = task_cpu(task);
 
index 64c5990fd500b86e86e9d0a92d86fa7b7b45a0b1..066f0ec05e487396315356df0ea04c8563ffa390 100644 (file)
@@ -554,7 +554,7 @@ int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
 void tick_check_oneshot_broadcast_this_cpu(void)
 {
        if (cpumask_test_cpu(smp_processor_id(), tick_broadcast_oneshot_mask)) {
-               struct tick_device *td = &__get_cpu_var(tick_cpu_device);
+               struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
 
                /*
                 * We might be in the middle of switching over from