From 79bdd6a06167f6f616ac5104a91c8c8360fd4216 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Mon, 28 Dec 2020 17:34:18 +0800 Subject: [PATCH] Revert "ARM: hw_breakpoint: Workaround for Cortex-A12/A17" This reverts commit 15d6bca6c40dad2544ceadeb4e5ec8b0aa30377e. Replaced by commit 2bb93af1822d ("ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses") Signed-off-by: Tao Huang --- arch/arm/kernel/hw_breakpoint.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index a08ab265ccc0..8a8470d36c65 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -731,20 +731,6 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr, /* Check if the watchpoint value matches. */ val = read_wb_reg(ARM_BASE_WVR + i); - /* - * It seems Cortex-A12/A17 do not report report - * watchpoint hit address that matches the watchpoint - * set as ARM64. - * Add this workaround for pass Android 8+ CTS - * bionic ptrace watchpoint_imprecise. - */ - if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A12) { - unsigned long dist; - - dist = val > addr ? val - addr : addr - val; - if (dist > 8) - goto unlock; - } else if (val != (addr & ~alignment_mask)) goto unlock;