More were added recently.

Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: H. Peter Anvin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>

Index: linux/arch/x86/kernel/cpu/perf_event_intel_rapl.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/perf_event_intel_rapl.c      2014-02-03 
13:36:13.429026651 -0600
+++ linux/arch/x86/kernel/cpu/perf_event_intel_rapl.c   2014-02-03 
13:36:13.429026651 -0600
@@ -129,7 +129,7 @@
         * 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 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 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_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 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 @@
                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: linux/kernel/sched/deadline.c
===================================================================
--- linux.orig/kernel/sched/deadline.c  2014-02-03 13:36:13.429026651 -0600
+++ linux/kernel/sched/deadline.c       2014-02-03 13:36:13.429026651 -0600
@@ -1115,7 +1115,7 @@
 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: linux/kernel/time/tick-broadcast.c
===================================================================
--- linux.orig/kernel/time/tick-broadcast.c     2014-02-03 13:36:13.429026651 
-0600
+++ linux/kernel/time/tick-broadcast.c  2014-02-03 13:36:13.429026651 -0600
@@ -541,7 +541,7 @@
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to