OSDN Git Service

arm64: pgalloc: consistently use PGALLOC_GFP
authorMark Rutland <mark.rutland@arm.com>
Wed, 19 Nov 2014 17:44:12 +0000 (17:44 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 20 Nov 2014 12:05:18 +0000 (12:05 +0000)
commit15670ef1eac9817cf48da12c885aabcdd88e9add
tree27ebaa960609279a5ff7fa66a86f84b6b3ce52b2
parentd6c763afab142a85e4770b4bc2a5f40f256d5c5d
arm64: pgalloc: consistently use PGALLOC_GFP

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: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/pgalloc.h
arch/arm64/mm/pgd.c