]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit09d831651b83e83e9fb04fd245d09aa1264e8592
tree27ebaa960609279a5ff7fa66a86f84b6b3ce52b2
parent7fd4a80487ca4848ed872b172842f855cc840f79
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