arm64/mm: remove unnecessary boundary check
authorMiles Chen <miles.chen@mediatek.com>
Thu, 25 Feb 2016 03:44:34 +0000 (11:44 +0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 26 Feb 2016 13:39:53 +0000 (13:39 +0000)
Remove the unnecessary boundary check since there is a huge
gap between user and kernel address that they would never overlap.
(arm64 does not have enough levels of page tables to cover 64-bit
virtual address)

See Documentation/arm64/memory.txt

Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/init.c

index e1f425fe5a81c8e8b5d8ddcaa8439703a6bcbc99..80c8bdeeb41abf8f35eebdf7bc6ed4b6871ae242 100644 (file)
@@ -401,8 +401,6 @@ void __init mem_init(void)
 #ifdef CONFIG_COMPAT
        BUILD_BUG_ON(TASK_SIZE_32                       > TASK_SIZE_64);
 #endif
-       BUILD_BUG_ON(TASK_SIZE_64                       > MODULES_VADDR);
-       BUG_ON(TASK_SIZE_64                             > MODULES_VADDR);
 
        if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) {
                extern int sysctl_overcommit_memory;