• Mark Rutland's avatar
    arm64: pgalloc: consistently use PGALLOC_GFP · 15670ef1
    Mark Rutland authored
    We currently allocate different levels of page tables with a variety of
    differing flags, and the PGALLOC_GFP flags, intended for use when
    allocating any level of page table, are only used for ptes in
    pte_alloc_one. On x86, PGALLOC_GFP is used for all page table
    allocations.
    
    Currently the major differences are:
    
    * __GFP_NOTRACK -- Needed to ensure page tables are always accessible in
      the presence of kmemcheck to prevent recursive faults. Currently
      kmemcheck cannot be selected for arm64.
    
    * __GFP_REPEAT -- Causes the allocator to try to reclaim pages and retry
      upon a failure to allocate.
    
    * __GFP_ZERO -- Sometimes passed explicitly, sometimes zalloc variants
      are used.
    
    While we've no encountered issues so far, it would be preferable to be
    consistent. This patch ensures all levels of table are allocated in the
    same manner, with PGALLOC_GFP.
    
    Cc: Steve Capper <steve.capper@arm.com>
    Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    15670ef1
pgalloc.h 3.29 KB