Skip to content

Commit

Permalink
mm: vmap: decrease wrps num [1/1]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hanjie Lin authored and tobetter committed Jun 20, 2019
1 parent 23afae0 commit 899a9a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm64/include/asm/hw_breakpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
Expand Down

0 comments on commit 899a9a4

Please sign in to comment.