[to-be-updated] mm-vmalloc-extract-vm_shift-to-consolidate-mapping-shift-selection.patch removed from -mm tree
Andrew Morton <[email protected]>
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The quilt patch titled
Subject: mm/vmalloc: extract vm_shift() to consolidate mapping shift selection
has been removed from the -mm tree. Its filename was
mm-vmalloc-extract-vm_shift-to-consolidate-mapping-shift-selection.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: Wen Jiang <[email protected]>
Subject: mm/vmalloc: extract vm_shift() to consolidate mapping shift selection
Date: Wed, 15 Jul 2026 20:08:11 +0800
Extract the vmalloc mapping shift selection from
__vmalloc_node_range_noprof() into vm_shift(), preparing for reuse by the
vmap batching path.
No functional change.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Wen Jiang <[email protected]>
Suggested-by: Dev Jain <[email protected]>
Tested-by: Xueyuan Chen <[email protected]>
Tested-by: Leo Yan <[email protected]>
Reviewed-by: David Hildenbrand (Arm) <[email protected]>
Reviewed-by: Dev Jain <[email protected]>
Cc: Andrew Donnellan <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Cc: "Barry Song (Xiaomi)" <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Ryan Roberts <[email protected]>
Cc: "Uladzislau Rezki (Sony)" <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
mm/vmalloc.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
--- a/mm/vmalloc.c~mm-vmalloc-extract-vm_shift-to-consolidate-mapping-shift-selection
+++ a/mm/vmalloc.c
@@ -3576,6 +3576,14 @@ void vunmap(const void *addr)
}
EXPORT_SYMBOL(vunmap);
+static inline unsigned int vm_shift(pgprot_t prot, unsigned long size)
+{
+ if (arch_vmap_pmd_supported(prot) && size >= PMD_SIZE)
+ return PMD_SHIFT;
+
+ return arch_vmap_pte_supported_shift(size);
+}
+
/**
* vmap - map an array of pages into virtually contiguous space
* @pages: array of page pointers
@@ -4087,11 +4095,7 @@ void *__vmalloc_node_range_noprof(unsign
* supporting them.
*/
- if (arch_vmap_pmd_supported(prot) && size >= PMD_SIZE)
- shift = PMD_SHIFT;
- else
- shift = arch_vmap_pte_supported_shift(size);
-
+ shift = vm_shift(prot, size);
align = max(original_align, 1UL << shift);
}
_
Patches currently in -mm which might be from [email protected] are
mm-vmalloc-map-contiguous-pages-in-batches-for-vmap-if-possible-fix.patch