OSDN Git Service

mm: arch: remove indirection level in alloc_zeroed_user_highpage_movable()
authorPeter Collingbourne <pcc@google.com>
Wed, 2 Jun 2021 23:52:27 +0000 (16:52 -0700)
committerWill Deacon <will@kernel.org>
Fri, 4 Jun 2021 18:32:21 +0000 (19:32 +0100)
commit92638b4e1b47f97d7269e74465dedf73096f777d
treeb9f939df93cb8b584fe056c2d32820078172f6df
parent3d0cca0b02ac98eac9157b26cf3951997db68b37
mm: arch: remove indirection level in alloc_zeroed_user_highpage_movable()

In an upcoming change we would like to add a flag to
GFP_HIGHUSER_MOVABLE so that it would no longer be an OR
of GFP_HIGHUSER and __GFP_MOVABLE. This poses a problem for
alloc_zeroed_user_highpage_movable() which passes __GFP_MOVABLE
into an arch-specific __alloc_zeroed_user_highpage() hook which ORs
in GFP_HIGHUSER.

Since __alloc_zeroed_user_highpage() is only ever called from
alloc_zeroed_user_highpage_movable(), we can remove one level
of indirection here. Remove __alloc_zeroed_user_highpage(),
make alloc_zeroed_user_highpage_movable() the hook, and use
GFP_HIGHUSER_MOVABLE in the hook implementations so that they will
pick up the new flag that we are going to add.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/Ic6361c657b2cdcd896adbe0cf7cb5a7fbb1ed7bf
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210602235230.3928842-2-pcc@google.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/alpha/include/asm/page.h
arch/arm64/include/asm/page.h
arch/ia64/include/asm/page.h
arch/m68k/include/asm/page_no.h
arch/s390/include/asm/page.h
arch/x86/include/asm/page.h
include/linux/highmem.h