diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-01-28 15:48:59 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-01-28 15:48:59 +0100 |
commit | b3890e4704594fa23abe1395d1fafc97d3214be8 (patch) | |
tree | 23e2659713e01779e8854363eb7d1fac49683d32 /arch/x86/kernel/cpu/amd.c | |
parent | 29bf4dbc9841366577ba44175b00c543ad1712d6 (diff) | |
parent | 2a2662bf88e693d477ef08351d03934f7bc0b51c (diff) |
Merge branch 'perf/hw_breakpoints' into perf/core
The new hw_breakpoint bits are now ready for v3.20, merge them
into the main branch, to avoid conflicts.
Conflicts:
tools/perf/Documentation/perf-record.txt
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 15c5df92f74e..a220239cea65 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -869,3 +869,22 @@ static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum) return false; } + +void set_dr_addr_mask(unsigned long mask, int dr) +{ + if (!cpu_has_bpext) + return; + + switch (dr) { + case 0: + wrmsr(MSR_F16H_DR0_ADDR_MASK, mask, 0); + break; + case 1: + case 2: + case 3: + wrmsr(MSR_F16H_DR1_ADDR_MASK - 1 + dr, mask, 0); + break; + default: + break; + } +} |