Skip to content

Commit

Permalink
arm64: mm: remove pointless PAGE_MASKing
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Jeremy Linton <[email protected]>
Cc: Laura Abbott <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
Mark Rutland authored and wildea01 committed Dec 10, 2015
1 parent 49003a8 commit e2c30ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm64/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit e2c30ee

Please sign in to comment.