vserver 1.9.3
[linux-2.6.git] / arch / i386 / kernel / sysenter.c
index 0daa404..960d8bd 100644 (file)
@@ -24,7 +24,7 @@ extern asmlinkage void sysenter_entry(void);
 void enable_sep_cpu(void *info)
 {
        int cpu = get_cpu();
-       struct tss_struct *tss = init_tss + cpu;
+       struct tss_struct *tss = &per_cpu(init_tss, cpu);
 
        tss->ss1 = __KERNEL_CS;
        tss->esp1 = sizeof(struct tss_struct) + (unsigned long) tss;
@@ -43,18 +43,18 @@ extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
 
 static int __init sysenter_setup(void)
 {
-       unsigned long page = get_zeroed_page(GFP_ATOMIC);
+       void *page = (void *)get_zeroed_page(GFP_ATOMIC);
 
        __set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC);
 
        if (!boot_cpu_has(X86_FEATURE_SEP)) {
-               memcpy((void *) page,
+               memcpy(page,
                       &vsyscall_int80_start,
                       &vsyscall_int80_end - &vsyscall_int80_start);
                return 0;
        }
 
-       memcpy((void *) page,
+       memcpy(page,
               &vsyscall_sysenter_start,
               &vsyscall_sysenter_end - &vsyscall_sysenter_start);