From: Linus Torvalds Date: Thu, 5 Jun 2014 15:05:29 +0000 (-0700) Subject: Merge branch 'x86/vdso' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip... X-Git-Tag: firefly_0821_release~176^2~3785^2~13 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a0abcf2e8f8017051830f738ac1bf5ef42703243;p=firefly-linux-kernel-4.4.55.git Merge branch 'x86/vdso' of git://git./linux/kernel/git/tip/tip into next Pull x86 cdso updates from Peter Anvin: "Vdso cleanups and improvements largely from Andy Lutomirski. This makes the vdso a lot less ''special''" * 'x86/vdso' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso, build: Make LE access macros clearer, host-safe x86/vdso, build: Fix cross-compilation from big-endian architectures x86/vdso, build: When vdso2c fails, unlink the output x86, vdso: Fix an OOPS accessing the HPET mapping w/o an HPET x86, mm: Replace arch_vma_name with vm_ops->name for vsyscalls x86, mm: Improve _install_special_mapping and fix x86 vdso naming mm, fs: Add vm_ops->name as an alternative to arch_vma_name x86, vdso: Fix an OOPS accessing the HPET mapping w/o an HPET x86, vdso: Remove vestiges of VDSO_PRELINK and some outdated comments x86, vdso: Move the vvar and hpet mappings next to the 64-bit vDSO x86, vdso: Move the 32-bit vdso special pages after the text x86, vdso: Reimplement vdso.so preparation in build-time C x86, vdso: Move syscall and sysenter setup into kernel/cpu/common.c x86, vdso: Clean up 32-bit vs 64-bit vdso params x86, mm: Ensure correct alignment of the fixmap --- a0abcf2e8f8017051830f738ac1bf5ef42703243 diff --cc arch/x86/mm/init_64.c index b92591fa8970,bdcde58ca9ed..df1a9927ad29 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@@ -1218,24 -1226,12 +1226,15 @@@ int in_gate_area(struct mm_struct *mm, */ int in_gate_area_no_mm(unsigned long addr) { - return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END); - } - - const char *arch_vma_name(struct vm_area_struct *vma) - { - if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) - return "[vdso]"; - if (vma == &gate_vma) - return "[vsyscall]"; - return NULL; + return (addr & PAGE_MASK) == VSYSCALL_ADDR; } -#ifdef CONFIG_X86_UV -unsigned long memory_block_size_bytes(void) +static unsigned long probe_memory_block_size(void) { + /* start from 2g */ + unsigned long bz = 1UL<<31; + +#ifdef CONFIG_X86_UV if (is_uv_system()) { printk(KERN_INFO "UV: memory block size 2GB\n"); return 2UL * 1024 * 1024 * 1024; diff --cc mm/mmap.c index 8a56d39df4ed,52bbc9514d9d..ced5efcdd4b6 --- a/mm/mmap.c +++ b/mm/mmap.c @@@ -2961,10 -2992,13 +2991,11 @@@ int install_special_mapping(struct mm_s unsigned long addr, unsigned long len, unsigned long vm_flags, struct page **pages) { - struct vm_area_struct *vma = _install_special_mapping(mm, - addr, len, vm_flags, pages); + struct vm_area_struct *vma = __install_special_mapping( + mm, addr, len, vm_flags, &legacy_special_mapping_vmops, + (void *)pages); - if (IS_ERR(vma)) - return PTR_ERR(vma); - return 0; + return PTR_ERR_OR_ZERO(vma); } static DEFINE_MUTEX(mm_all_locks_mutex);