diff options
author | Jacob Shin <jacob.w.shin@gmail.com> | 2014-05-29 17:26:50 +0200 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2014-12-03 15:14:26 +0100 |
commit | d6d55f0b9d900673548515614b56ab55aa2c51f8 (patch) | |
tree | 2c5d9bdff4444fec201a014e071e718a0f34d8aa /arch/x86/include/asm/debugreg.h | |
parent | 4e6e311e596eadba30d4f56f64eae7d45611a01c (diff) | |
download | op-kernel-dev-d6d55f0b9d900673548515614b56ab55aa2c51f8.zip op-kernel-dev-d6d55f0b9d900673548515614b56ab55aa2c51f8.tar.gz |
perf/x86/amd: AMD support for bp_len > HW_BREAKPOINT_LEN_8
Implement hardware breakpoint address mask for AMD Family 16h and
above processors. CPUID feature bit indicates hardware support for
DRn_ADDR_MASK MSRs. These masks further qualify DRn/DR7 hardware
breakpoint addresses to allow matching of larger addresses ranges.
Valuable advice and pseudo code from Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jacob Shin <jacob.w.shin@gmail.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: xiakaixu <xiakaixu@huawei.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'arch/x86/include/asm/debugreg.h')
-rw-r--r-- | arch/x86/include/asm/debugreg.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/debugreg.h b/arch/x86/include/asm/debugreg.h index 61fd18b..12cb66f 100644 --- a/arch/x86/include/asm/debugreg.h +++ b/arch/x86/include/asm/debugreg.h @@ -114,5 +114,10 @@ static inline void debug_stack_usage_inc(void) { } static inline void debug_stack_usage_dec(void) { } #endif /* X86_64 */ +#ifdef CONFIG_CPU_SUP_AMD +extern void set_dr_addr_mask(unsigned long mask, int dr); +#else +static inline void set_dr_addr_mask(unsigned long mask, int dr) { } +#endif #endif /* _ASM_X86_DEBUGREG_H */ |