linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: alexs@kernel.org
To: Arnd Bergmann <arnd@arndb.de>,
	linux-arch@vger.kernel.org (open list:GENERIC INCLUDE/ASM HEADER
	FILES), linux-kernel@vger.kernel.org (open list)
Cc: linux-kernel@vger.kernel.org, Alex Shi <alexs@kernel.org>,
	linux-arch@vger.kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] mm/pgtable: remove unddefined __HAVE_ARCH_P4D_ALLOC_ONE/__HAVE_ARCH_P4D_FREE
Date: Wed,  7 Jan 2026 14:39:10 +0800	[thread overview]
Message-ID: <20260107063911.15299-1-alexs@kernel.org> (raw)

From: Alex Shi <alexs@kernel.org>

No any archs has ever define __HAVE_ARCH_P4D_ALLOC_ONE/__HAVE_ARCH_P4D_FREE
So let's remove them.

Signed-off-by: Alex Shi <alexs@kernel.org>
Cc: linux-arch@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 include/asm-generic/pgalloc.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/asm-generic/pgalloc.h b/include/asm-generic/pgalloc.h
index 5fb31e0fe15f..11bafe764599 100644
--- a/include/asm-generic/pgalloc.h
+++ b/include/asm-generic/pgalloc.h
@@ -246,13 +246,11 @@ static inline p4d_t *__p4d_alloc_one_noprof(struct mm_struct *mm, unsigned long
 }
 #define __p4d_alloc_one(...)	alloc_hooks(__p4d_alloc_one_noprof(__VA_ARGS__))
 
-#ifndef __HAVE_ARCH_P4D_ALLOC_ONE
 static inline p4d_t *p4d_alloc_one_noprof(struct mm_struct *mm, unsigned long addr)
 {
 	return __p4d_alloc_one_noprof(mm, addr);
 }
 #define p4d_alloc_one(...)	alloc_hooks(p4d_alloc_one_noprof(__VA_ARGS__))
-#endif
 
 static inline void __p4d_free(struct mm_struct *mm, p4d_t *p4d)
 {
@@ -262,13 +260,11 @@ static inline void __p4d_free(struct mm_struct *mm, p4d_t *p4d)
 	pagetable_dtor_free(ptdesc);
 }
 
-#ifndef __HAVE_ARCH_P4D_FREE
 static inline void p4d_free(struct mm_struct *mm, p4d_t *p4d)
 {
 	if (!mm_p4d_folded(mm))
 		__p4d_free(mm, p4d);
 }
-#endif
 
 #endif /* CONFIG_PGTABLE_LEVELS > 4 */
 
-- 
2.43.0



             reply	other threads:[~2026-01-07  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07  6:39 alexs [this message]
2026-01-07 14:53 ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260107063911.15299-1-alexs@kernel.org \
    --to=alexs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox