mm: vmap: decrease wrps num [1/1]
authorHanjie Lin <hanjie.lin@amlogic.com>
Mon, 15 Apr 2019 02:14:37 +0000 (10:14 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 15 Apr 2019 08:02:03 +0000 (01:02 -0700)
PD#SWPL-6813

Problem:
sys_ptrace watchpoint can't stop

Solution:
decrease wrps num

Verify:
u212

Change-Id: I18947bd91f8dd07cedeebbfca6d7ce01107c6a3e
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
arch/arm64/include/asm/hw_breakpoint.h

index b6b167a..9b5a831 100644 (file)
@@ -159,9 +159,15 @@ static inline int get_num_brps(void)
 static inline int get_num_wrps(void)
 {
        u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
+#ifdef CONFIG_AMLOGIC_VMAP
+       return (1 +
+               cpuid_feature_extract_unsigned_field(dfr0,
+                       ID_AA64DFR0_WRPS_SHIFT)) - 2;
+#else
        return 1 +
                cpuid_feature_extract_unsigned_field(dfr0,
                                                ID_AA64DFR0_WRPS_SHIFT);
+#endif
 }
 
 #endif /* __KERNEL__ */