ARM: 7862/1: pcpu: replace __get_cpu_var_uses
[firefly-linux-kernel-4.4.55.git] / arch / arm / kernel / hw_breakpoint.c
index 7b95de6013571df3528716f2bba00f8dfd13badf..3d446605cbf84b89890bdf5bb2398a64a8401120 100644 (file)
@@ -344,13 +344,13 @@ int arch_install_hw_breakpoint(struct perf_event *bp)
                /* Breakpoint */
                ctrl_base = ARM_BASE_BCR;
                val_base = ARM_BASE_BVR;
-               slots = (struct perf_event **)__get_cpu_var(bp_on_reg);
+               slots = this_cpu_ptr(bp_on_reg);
                max_slots = core_num_brps;
        } else {
                /* Watchpoint */
                ctrl_base = ARM_BASE_WCR;
                val_base = ARM_BASE_WVR;
-               slots = (struct perf_event **)__get_cpu_var(wp_on_reg);
+               slots = this_cpu_ptr(wp_on_reg);
                max_slots = core_num_wrps;
        }
 
@@ -396,12 +396,12 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp)
        if (info->ctrl.type == ARM_BREAKPOINT_EXECUTE) {
                /* Breakpoint */
                base = ARM_BASE_BCR;
-               slots = (struct perf_event **)__get_cpu_var(bp_on_reg);
+               slots = this_cpu_ptr(bp_on_reg);
                max_slots = core_num_brps;
        } else {
                /* Watchpoint */
                base = ARM_BASE_WCR;
-               slots = (struct perf_event **)__get_cpu_var(wp_on_reg);
+               slots = this_cpu_ptr(wp_on_reg);
                max_slots = core_num_wrps;
        }
 
@@ -697,7 +697,7 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,
        struct arch_hw_breakpoint *info;
        struct arch_hw_breakpoint_ctrl ctrl;
 
-       slots = (struct perf_event **)__get_cpu_var(wp_on_reg);
+       slots = this_cpu_ptr(wp_on_reg);
 
        for (i = 0; i < core_num_wrps; ++i) {
                rcu_read_lock();
@@ -768,7 +768,7 @@ static void watchpoint_single_step_handler(unsigned long pc)
        struct perf_event *wp, **slots;
        struct arch_hw_breakpoint *info;
 
-       slots = (struct perf_event **)__get_cpu_var(wp_on_reg);
+       slots = this_cpu_ptr(wp_on_reg);
 
        for (i = 0; i < core_num_wrps; ++i) {
                rcu_read_lock();
@@ -802,7 +802,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
        struct arch_hw_breakpoint *info;
        struct arch_hw_breakpoint_ctrl ctrl;
 
-       slots = (struct perf_event **)__get_cpu_var(bp_on_reg);
+       slots = this_cpu_ptr(bp_on_reg);
 
        /* The exception entry code places the amended lr in the PC. */
        addr = regs->ARM_pc;