summaryrefslogtreecommitdiffstats
path: root/arch/x86/vdso
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-10 18:13:36 -0700
committerIngo Molnar <mingo@elte.hu>2008-07-11 15:44:58 +0200
commitb6ad92d4faade38619e89acc509ca1416b81a0bd (patch)
tree7528f614a7ede9d24f51f53da0b405920e9c9083 /arch/x86/vdso
parent8d28aab59fe939be40efae870ced0b05caa259fb (diff)
downloadlinux-b6ad92d4faade38619e89acc509ca1416b81a0bd.tar.gz
linux-b6ad92d4faade38619e89acc509ca1416b81a0bd.tar.bz2
linux-b6ad92d4faade38619e89acc509ca1416b81a0bd.zip
x86_64: vdso32 cleanup using feature flags
Use the X86_FEATURE_SYSENTER32 to remove hard-coded CPU vendor check. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/vdso')
-rw-r--r--arch/x86/vdso/vdso32-setup.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
index cf058fecfcee..0bce5429a515 100644
--- a/arch/x86/vdso/vdso32-setup.c
+++ b/arch/x86/vdso/vdso32-setup.c
@@ -203,20 +203,11 @@ static struct page *vdso32_pages[1];
#ifdef CONFIG_X86_64
-static int use_sysenter __read_mostly = -1;
-
-#define vdso32_sysenter() (use_sysenter > 0)
+#define vdso32_sysenter() (boot_cpu_has(X86_FEATURE_SYSENTER32))
/* May not be __init: called during resume */
void syscall32_cpu_init(void)
{
- if (use_sysenter < 0) {
- if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
- use_sysenter = 1;
- if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR)
- use_sysenter = 1;
- }
-
/* Load these always in case some future AMD CPU supports
SYSENTER from compat mode too. */
checking_wrmsrl(MSR_IA32_SYSENTER_CS, (u64)__KERNEL_CS);