x86_64: vdso32 cleanup using feature flags
authorJeremy Fitzhardinge <jeremy@goop.org>
Fri, 11 Jul 2008 01:13:36 +0000 (18:13 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 11 Jul 2008 13:44:58 +0000 (15:44 +0200)
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>
arch/x86/vdso/vdso32-setup.c

index cf058fecfceec989354ec17a3d681cae65315935..0bce5429a51546de1fab7f0acd29e921d38a9870 100644 (file)
@@ -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);