• Jeremy Linton's avatar
    arm64: Mark kernel page ranges contiguous · 348a65cd
    Jeremy Linton authored
    With 64k pages, the next larger segment size is 512M. The linux
    kernel also uses different protection flags to cover its code and data.
    Because of this requirement, the vast majority of the kernel code and
    data structures end up being mapped with 64k pages instead of the larger
    pages common with a 4k page kernel.
    
    Recent ARM processors support a contiguous bit in the
    page tables which allows the a TLB to cover a range larger than a
    single PTE if that range is mapped into physically contiguous
    ram.
    
    So, for the kernel its a good idea to set this flag. Some basic
    micro benchmarks show it can significantly reduce the number of
    L1 dTLB refills.
    
    Add boot option to enable/disable CONT marking, as well as fix a
    bug found by Steve Capper.
    Signed-off-by: default avatarJeremy Linton <jeremy.linton@arm.com>
    [catalin.marinas@arm.com: remove CONFIG_ARM64_CONT_PTE altogether]
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    348a65cd
mmu.c 18.7 KB