perf/hw_breakpoint: Pass arch breakpoint struct to arch_check_bp_in_kernelspace()
[linux-2.6-block.git] / arch / arm64 / kernel / hw_breakpoint.c
index 413dbe530da836d3dc1119830628454168921064..6a90d12e4ff2c319eab3a00f3d0624ee013e31a0 100644 (file)
@@ -343,14 +343,13 @@ static int get_hbp_len(u8 hbp_len)
 /*
  * Check whether bp virtual address is in kernel space.
  */
-int arch_check_bp_in_kernelspace(struct perf_event *bp)
+int arch_check_bp_in_kernelspace(struct arch_hw_breakpoint *hw)
 {
        unsigned int len;
        unsigned long va;
-       struct arch_hw_breakpoint *info = counter_arch_bp(bp);
 
-       va = info->address;
-       len = get_hbp_len(info->ctrl.len);
+       va = hw->address;
+       len = get_hbp_len(hw->ctrl.len);
 
        return (va >= TASK_SIZE) && ((va + len - 1) >= TASK_SIZE);
 }
@@ -502,7 +501,7 @@ static int arch_build_bp_info(struct perf_event *bp)
         * Note that we disallow combined EL0/EL1 breakpoints because
         * that would complicate the stepping code.
         */
-       if (arch_check_bp_in_kernelspace(bp))
+       if (arch_check_bp_in_kernelspace(info))
                info->ctrl.privilege = AARCH64_BREAKPOINT_EL1;
        else
                info->ctrl.privilege = AARCH64_BREAKPOINT_EL0;