Merge branch 'x86/vdso' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip...
[firefly-linux-kernel-4.4.55.git] / arch / x86 / xen / mmu.c
index 6f6e15d284667640def0bd65bcc55e9836ecfd01..e8a1201c3293bf074bedfaa7243f0e670064d457 100644 (file)
@@ -1494,7 +1494,7 @@ static int xen_pgd_alloc(struct mm_struct *mm)
                page->private = (unsigned long)user_pgd;
 
                if (user_pgd != NULL) {
-                       user_pgd[pgd_index(VSYSCALL_START)] =
+                       user_pgd[pgd_index(VSYSCALL_ADDR)] =
                                __pgd(__pa(level3_user_vsyscall) | _PAGE_TABLE);
                        ret = 0;
                }
@@ -2062,8 +2062,7 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot)
        case FIX_KMAP_BEGIN ... FIX_KMAP_END:
 # endif
 #else
-       case VSYSCALL_LAST_PAGE ... VSYSCALL_FIRST_PAGE:
-       case VVAR_PAGE:
+       case VSYSCALL_PAGE:
 #endif
        case FIX_TEXT_POKE0:
        case FIX_TEXT_POKE1:
@@ -2104,8 +2103,7 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot)
 #ifdef CONFIG_X86_64
        /* Replicate changes to map the vsyscall page into the user
           pagetable vsyscall mapping. */
-       if ((idx >= VSYSCALL_LAST_PAGE && idx <= VSYSCALL_FIRST_PAGE) ||
-           idx == VVAR_PAGE) {
+       if (idx == VSYSCALL_PAGE) {
                unsigned long vaddr = __fix_to_virt(idx);
                set_pte_vaddr_pud(level3_user_vsyscall, vaddr, pte);
        }