diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2008-12-11 07:49:59 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-12 02:08:12 -0500 |
commit | c2724775ce57c98b8af9694857b941dc61056516 (patch) | |
tree | c3936699317da3233bc31e92d68cb582ec17d193 /arch/x86/include/asm/processor.h | |
parent | b0884e25fe361f2ca228808fb5fd1b74cb04e711 (diff) |
x86, bts: provide in-kernel branch-trace interface
Impact: cleanup
Move the BTS bits from ptrace.c into ds.c.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r-- | arch/x86/include/asm/processor.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 5ca01e383269..aa5914f8e501 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -752,6 +752,19 @@ extern void switch_to_new_gdt(void); | |||
752 | extern void cpu_init(void); | 752 | extern void cpu_init(void); |
753 | extern void init_gdt(int cpu); | 753 | extern void init_gdt(int cpu); |
754 | 754 | ||
755 | static inline unsigned long get_debugctlmsr(void) | ||
756 | { | ||
757 | unsigned long debugctlmsr = 0; | ||
758 | |||
759 | #ifndef CONFIG_X86_DEBUGCTLMSR | ||
760 | if (boot_cpu_data.x86 < 6) | ||
761 | return 0; | ||
762 | #endif | ||
763 | rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctlmsr); | ||
764 | |||
765 | return debugctlmsr; | ||
766 | } | ||
767 | |||
755 | static inline void update_debugctlmsr(unsigned long debugctlmsr) | 768 | static inline void update_debugctlmsr(unsigned long debugctlmsr) |
756 | { | 769 | { |
757 | #ifndef CONFIG_X86_DEBUGCTLMSR | 770 | #ifndef CONFIG_X86_DEBUGCTLMSR |