Commit e2c30ee3 authored by Mark Rutland's avatar Mark Rutland Committed by Will Deacon

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: default avatarMark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>
Cc: Laura Abbott <labbott@fedoraproject.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 49003a8d
...@@ -288,7 +288,7 @@ static void __init create_mapping(phys_addr_t phys, unsigned long virt, ...@@ -288,7 +288,7 @@ static void __init create_mapping(phys_addr_t phys, unsigned long virt,
&phys, virt); &phys, virt);
return; 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); size, prot, early_alloc);
} }
...@@ -309,7 +309,7 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, ...@@ -309,7 +309,7 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt,
return; 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); phys, virt, size, prot, late_alloc);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment