linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/pgtable: remove unddefined __HAVE_ARCH_P4D_ALLOC_ONE/__HAVE_ARCH_P4D_FREE
@ 2026-01-07  6:39 alexs
  2026-01-07 14:53 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: alexs @ 2026-01-07  6:39 UTC (permalink / raw)
  To: Arnd Bergmann, open list:GENERIC INCLUDE/ASM HEADER FILES, open list
  Cc: linux-kernel, Alex Shi, linux-arch, linux-mm, Andrew Morton

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/pgtable: remove unddefined __HAVE_ARCH_P4D_ALLOC_ONE/__HAVE_ARCH_P4D_FREE
  2026-01-07  6:39 [PATCH] mm/pgtable: remove unddefined __HAVE_ARCH_P4D_ALLOC_ONE/__HAVE_ARCH_P4D_FREE alexs
@ 2026-01-07 14:53 ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2026-01-07 14:53 UTC (permalink / raw)
  To: alexs
  Cc: Arnd Bergmann, open list:GENERIC INCLUDE/ASM HEADER FILES,
	open list, linux-mm, Andrew Morton

On Wed, Jan 07, 2026 at 02:39:10PM +0800, alexs@kernel.org wrote:
> 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.

No, let's not.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-07 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-07  6:39 [PATCH] mm/pgtable: remove unddefined __HAVE_ARCH_P4D_ALLOC_ONE/__HAVE_ARCH_P4D_FREE alexs
2026-01-07 14:53 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox