From: Mark Rutland Date: Wed, 9 Dec 2015 12:44:36 +0000 (+0000) Subject: UPSTREAM: arm64: mm: remove pointless PAGE_MASKing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c47e4a12f511721dab3d2407d18e0e1a6b7b0e1c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git UPSTREAM: arm64: mm: remove pointless PAGE_MASKing As pgd_offset{,_k} shift the input address by PGDIR_SHIFT, the sub-page bits will always be shifted out. There is no need to apply PAGE_MASK before this. Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Jeremy Linton Cc: Laura Abbott Cc: Will Deacon Signed-off-by: Will Deacon Bug: 30369029 Patchset: rework-pagetable (cherry picked from commit e2c30ee320eb96304896c7ab84499e5bc5e5fb6e) Signed-off-by: Jeff Vander Stoep Change-Id: I86d3438aecf7295d5895e1430c1e19fbc82c9719 --- diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 4c381f0e77a7..7b6e58a58bf3 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -288,7 +288,7 @@ static void __init create_mapping(phys_addr_t phys, unsigned long virt, &phys, virt); return; } - __create_mapping(&init_mm, pgd_offset_k(virt & PAGE_MASK), phys, virt, + __create_mapping(&init_mm, pgd_offset_k(virt), phys, virt, size, prot, early_alloc); } @@ -309,7 +309,7 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, return; } - return __create_mapping(&init_mm, pgd_offset_k(virt & PAGE_MASK), + return __create_mapping(&init_mm, pgd_offset_k(virt), phys, virt, size, prot, late_alloc); }