diff options
Diffstat (limited to 'arch/x86/include/asm/processor.h')
| -rw-r--r-- | arch/x86/include/asm/processor.h | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index b753ea59703a..5a51379dcbe4 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
| @@ -21,7 +21,6 @@ struct mm_struct; | |||
| 21 | #include <asm/msr.h> | 21 | #include <asm/msr.h> |
| 22 | #include <asm/desc_defs.h> | 22 | #include <asm/desc_defs.h> |
| 23 | #include <asm/nops.h> | 23 | #include <asm/nops.h> |
| 24 | #include <asm/ds.h> | ||
| 25 | 24 | ||
| 26 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
| 27 | #include <linux/cpumask.h> | 26 | #include <linux/cpumask.h> |
| @@ -29,6 +28,7 @@ struct mm_struct; | |||
| 29 | #include <linux/threads.h> | 28 | #include <linux/threads.h> |
| 30 | #include <linux/math64.h> | 29 | #include <linux/math64.h> |
| 31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
| 31 | #include <linux/err.h> | ||
| 32 | 32 | ||
| 33 | #define HBP_NUM 4 | 33 | #define HBP_NUM 4 |
| 34 | /* | 34 | /* |
| @@ -113,7 +113,6 @@ struct cpuinfo_x86 { | |||
| 113 | /* Index into per_cpu list: */ | 113 | /* Index into per_cpu list: */ |
| 114 | u16 cpu_index; | 114 | u16 cpu_index; |
| 115 | #endif | 115 | #endif |
| 116 | unsigned int x86_hyper_vendor; | ||
| 117 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); | 116 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); |
| 118 | 117 | ||
| 119 | #define X86_VENDOR_INTEL 0 | 118 | #define X86_VENDOR_INTEL 0 |
| @@ -127,9 +126,6 @@ struct cpuinfo_x86 { | |||
| 127 | 126 | ||
| 128 | #define X86_VENDOR_UNKNOWN 0xff | 127 | #define X86_VENDOR_UNKNOWN 0xff |
| 129 | 128 | ||
| 130 | #define X86_HYPER_VENDOR_NONE 0 | ||
| 131 | #define X86_HYPER_VENDOR_VMWARE 1 | ||
| 132 | |||
| 133 | /* | 129 | /* |
| 134 | * capabilities of CPUs | 130 | * capabilities of CPUs |
| 135 | */ | 131 | */ |
| @@ -380,6 +376,10 @@ union thread_xstate { | |||
| 380 | struct xsave_struct xsave; | 376 | struct xsave_struct xsave; |
| 381 | }; | 377 | }; |
| 382 | 378 | ||
| 379 | struct fpu { | ||
| 380 | union thread_xstate *state; | ||
| 381 | }; | ||
| 382 | |||
| 383 | #ifdef CONFIG_X86_64 | 383 | #ifdef CONFIG_X86_64 |
| 384 | DECLARE_PER_CPU(struct orig_ist, orig_ist); | 384 | DECLARE_PER_CPU(struct orig_ist, orig_ist); |
| 385 | 385 | ||
| @@ -457,7 +457,7 @@ struct thread_struct { | |||
| 457 | unsigned long trap_no; | 457 | unsigned long trap_no; |
| 458 | unsigned long error_code; | 458 | unsigned long error_code; |
| 459 | /* floating point and extended processor state */ | 459 | /* floating point and extended processor state */ |
| 460 | union thread_xstate *xstate; | 460 | struct fpu fpu; |
| 461 | #ifdef CONFIG_X86_32 | 461 | #ifdef CONFIG_X86_32 |
| 462 | /* Virtual 86 mode info */ | 462 | /* Virtual 86 mode info */ |
| 463 | struct vm86_struct __user *vm86_info; | 463 | struct vm86_struct __user *vm86_info; |
| @@ -473,10 +473,6 @@ struct thread_struct { | |||
| 473 | unsigned long iopl; | 473 | unsigned long iopl; |
| 474 | /* Max allowed port in the bitmap, in bytes: */ | 474 | /* Max allowed port in the bitmap, in bytes: */ |
| 475 | unsigned io_bitmap_max; | 475 | unsigned io_bitmap_max; |
| 476 | /* MSR_IA32_DEBUGCTLMSR value to switch in if TIF_DEBUGCTLMSR is set. */ | ||
| 477 | unsigned long debugctlmsr; | ||
| 478 | /* Debug Store context; see asm/ds.h */ | ||
| 479 | struct ds_context *ds_ctx; | ||
| 480 | }; | 476 | }; |
| 481 | 477 | ||
| 482 | static inline unsigned long native_get_debugreg(int regno) | 478 | static inline unsigned long native_get_debugreg(int regno) |
| @@ -803,7 +799,7 @@ extern void cpu_init(void); | |||
| 803 | 799 | ||
| 804 | static inline unsigned long get_debugctlmsr(void) | 800 | static inline unsigned long get_debugctlmsr(void) |
| 805 | { | 801 | { |
| 806 | unsigned long debugctlmsr = 0; | 802 | unsigned long debugctlmsr = 0; |
| 807 | 803 | ||
| 808 | #ifndef CONFIG_X86_DEBUGCTLMSR | 804 | #ifndef CONFIG_X86_DEBUGCTLMSR |
| 809 | if (boot_cpu_data.x86 < 6) | 805 | if (boot_cpu_data.x86 < 6) |
| @@ -811,21 +807,6 @@ static inline unsigned long get_debugctlmsr(void) | |||
| 811 | #endif | 807 | #endif |
| 812 | rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctlmsr); | 808 | rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctlmsr); |
| 813 | 809 | ||
| 814 | return debugctlmsr; | ||
| 815 | } | ||
| 816 | |||
| 817 | static inline unsigned long get_debugctlmsr_on_cpu(int cpu) | ||
| 818 | { | ||
| 819 | u64 debugctlmsr = 0; | ||
| 820 | u32 val1, val2; | ||
| 821 | |||
| 822 | #ifndef CONFIG_X86_DEBUGCTLMSR | ||
| 823 | if (boot_cpu_data.x86 < 6) | ||
| 824 | return 0; | ||
| 825 | #endif | ||
| 826 | rdmsr_on_cpu(cpu, MSR_IA32_DEBUGCTLMSR, &val1, &val2); | ||
| 827 | debugctlmsr = val1 | ((u64)val2 << 32); | ||
| 828 | |||
| 829 | return debugctlmsr; | 810 | return debugctlmsr; |
| 830 | } | 811 | } |
| 831 | 812 | ||
| @@ -838,18 +819,6 @@ static inline void update_debugctlmsr(unsigned long debugctlmsr) | |||
| 838 | wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctlmsr); | 819 | wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctlmsr); |
| 839 | } | 820 | } |
| 840 | 821 | ||
| 841 | static inline void update_debugctlmsr_on_cpu(int cpu, | ||
| 842 | unsigned long debugctlmsr) | ||
| 843 | { | ||
| 844 | #ifndef CONFIG_X86_DEBUGCTLMSR | ||
| 845 | if (boot_cpu_data.x86 < 6) | ||
| 846 | return; | ||
| 847 | #endif | ||
| 848 | wrmsr_on_cpu(cpu, MSR_IA32_DEBUGCTLMSR, | ||
| 849 | (u32)((u64)debugctlmsr), | ||
| 850 | (u32)((u64)debugctlmsr >> 32)); | ||
| 851 | } | ||
| 852 | |||
| 853 | /* | 822 | /* |
| 854 | * from system description table in BIOS. Mostly for MCA use, but | 823 | * from system description table in BIOS. Mostly for MCA use, but |
| 855 | * others may find it useful: | 824 | * others may find it useful: |
