mm-make-ptval_to_str-generally-available.patch removed from -mm tree
The quilt patch titled
Subject: mm: make ptval_to_str() generally available
has been removed from the -mm tree. Its filename was
mm-make-ptval_to_str-generally-available.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Anshuman Khandual <[email protected]>
Subject: mm: make ptval_to_str() generally available
Date: Mon, 31 Aug 2026 11:13:23 +0530
Patch series "mm: Drop pxd_ERROR()".
pxd_ERROR() macros have been provided by all platforms, which are very much identical and can be dropped off completely if these pgtable printing could be moved to callers in generic MM aka all pxd_clear_bad().
But first cleanups and re-organizations are required in some platforms that are using these macros internally. Afterwards [pte|pmd|pud|p4d|pgd]_ERROR() macros have been completely dropped from the entire tree.
This patch (of 8):
Move ptval_to_str() inside a header thus making the helper more generally available for new users which are being added later. While here, also move another related string size macro PTVAL_STR_MAX inside the header as well.
---
include/linux/pgtable.h | 14 ++++++++++++++ mm/memory.c | 15 +-------------- 2 files changed, 15 insertions(+), 14 deletions(-)
include/linux/pgtable.h renamed from include/linux/pgtable.h~mm-make-ptval_to_str-generally-available +14 -0
@@ -2313,6 +2313,20 @@ static inline const char *pgtable_level_ } } +void ptval_bytes_to_hex_str (char *buf,size_t buf_size,const void *entry,size_t entry_size); + +#define ptval_to_str (buf, val) \ + do { \ + auto __val = (val); \ + \ + ptval_bytes_to_hex_str((buf), sizeof(buf), &__val, sizeof(__val)); \ + } while (0) + +#if defined(__SIZEOF_INT128__) +#define PTVAL_STR_MAX (32 + 1)/* Max 128-bit value in hex + NUL */ +#else +#define PTVAL_STR_MAX (16 + 1)/* Max 64-bit value in hex + NUL */ +#endif #endif /* !__ASSEMBLER__ */ #if !defined(MAX_POSSIBLE_PHYSMEM_BITS ) && !defined(CONFIG_64BIT )
mm/memory.c renamed from mm/memory.c~mm-make-ptval_to_str-generally-available +1 -14
@@ -495,7 +495,7 @@ static inline void add_mm_rss_vec(struct/* Allow a burst of 60 bad page map reports per minute. */ static DEFINE_RATELIMIT_STATE(bad_page_map_ratelimit, 60 * HZ, 60); -static void ptval_bytes_to_hex_str (char *buf,size_t buf_size,const void *entry,size_t entry_size) +void ptval_bytes_to_hex_str (char *buf,size_t buf_size,const void *entry,size_t entry_size) {if (WARN_ON_ONCE (buf_size < entry_size *2 +1 )) {snprintf (buf, buf_size,"overflow" );
@@ -522,19 +522,6 @@ static void ptval_bytes_to_hex_str(char } } -#define ptval_to_str (buf, val) \ - do { \ - auto __val = (val); \ - \ - ptval_bytes_to_hex_str((buf), sizeof(buf), &__val, sizeof(__val)); \ - } while (0) - -#if defined(__SIZEOF_INT128__) -#define PTVAL_STR_MAX (32 + 1)/* Max 128-bit value in hex + NUL */ -#else -#define PTVAL_STR_MAX (16 + 1)/* Max 64-bit value in hex + NUL */ -#endif -static void __print_bad_page_map_pgtable (struct mm_struct *mm,unsigned long addr) {char pgd_str[PTVAL_STR_MAX ];
_
Patches currently in -mm which might be from [email protected] are
mm-constify-arguments-in-default-pxdp_get.patch arm64-mm-move-__check_safe_pte_update.patch arm64-mm-standardize-printing-for-pgtable-entries.patch