]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm: remove unnecessary __GFP_HIGHMEM in __p*d_alloc_one_*()
authorHuacai Chen <chenhuacai@loongson.cn>
Fri, 7 Nov 2025 09:55:36 +0000 (17:55 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 20 Nov 2025 21:43:59 +0000 (13:43 -0800)
commit05be0287955970b043a0742e85b6c285dea4f286
treea6cfc5f3cc915ab1c6546d2b528045a1c2f5c624
parentc0ae966fac00bfd31490b6a9bf494d28865ff840
mm: remove unnecessary __GFP_HIGHMEM in __p*d_alloc_one_*()

__{pgd,p4d,pud,pmd,pte}_alloc_one_*() always allocate pages with GFP flag
GFP_PGTABLE_KERNEL/GFP_PGTABLE_USER.  These two macros are defined as
follows:

 #define GFP_PGTABLE_KERNEL (GFP_KERNEL | __GFP_ZERO)
 #define GFP_PGTABLE_USER (GFP_PGTABLE_KERNEL | __GFP_ACCOUNT)

There is no __GFP_HIGHMEM in them, so we needn't to clear __GFP_HIGHMEM
explicitly.

Link: https://lkml.kernel.org/r/20251109021817.346181-1-chenhuacai@loongson.cn
Link: https://lkml.kernel.org/r/20251107095536.3101371-1-chenhuacai@loongson.cn
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/asm-generic/pgalloc.h