Skip to contentSkip to conversation

LoongArch: Remove __GFP_HIGHMEM masking

PATCH In review Vishal Moola (Oracle) 2 participants 2 messages Nov 7, 2025 – Nov 8, 2025 LoongArch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 LoongArch: Remove __GFP_HIGHMEM masking

Remove unnecessary __GFP_HIGHMEM masking, which was introduced with commit 382739797f79 ("loongarch: convert various functions to use ptdescs"). GFP_KERNEL doesn't contain __GFP_HIGHMEM.

---
 arch/loongarch/include/asm/pgalloc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/loongarch/include/asm/pgalloc.h +1 -1
index 1c63a9d9a6d3..08dcc698ec18 100644
@@ -88,7 +88,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)
 {
 	pud_t *pud;
-	struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0);
+	struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, 0);
 
 	if (!ptdesc)
 		return NULL;
Signature · 1 line
2.51.1
maintainer
#1 lore raw

Hi, Vishal,

Quoted 4 lines · Vishal Moola (Oracle)

Remove unnecessary __GFP_HIGHMEM masking, which was introduced with commit 382739797f79 ("loongarch: convert various functions to use ptdescs"). GFP_KERNEL doesn't contain __GFP_HIGHMEM.

I have planned to submit a similar patch after [1] is merged, but anyway, thank you for your contribution.

[1] https://lore.kernel.org/linux-mm/CAAhV-H5C_Af72a5QcJs25qUMsJqO26=8oNvvLrJ7z+xHZh8oKQ@mail.gmail.com/T/#t

Huacai

Quoted 23 lines
---
 arch/loongarch/include/asm/pgalloc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/loongarch/include/asm/pgalloc.h +1 -2
index 1c63a9d9a6d3..08dcc698ec18 100644
@@ -88,7 +88,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)
 {
        pud_t *pud;
-       struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, 0);
+       struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, 0);
 
        if (!ptdesc)
                return NULL;
--

2.51.1