All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-io-mapping-precompute-remap-protection-flags-for-clarity.patch removed from -mm tree
@ 2025-05-13  6:54 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-05-13  6:54 UTC (permalink / raw)
  To: mm-commits, vbabka, rppt, riel, lorenzo.stoakes, liam.howlett,
	david, anshuman.khandual, liuye, akpm


The quilt patch titled
     Subject: mm/io-mapping: precompute remap protection flags for clarity
has been removed from the -mm tree.  Its filename was
     mm-io-mapping-precompute-remap-protection-flags-for-clarity.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: Ye Liu <liuye@kylinos.cn>
Subject: mm/io-mapping: precompute remap protection flags for clarity
Date: Sun, 27 Apr 2025 18:04:40 +0800

Patch series "mm: small cleanups for io-mapping, debug_page_alloc and
numa".

This series includes three small cleanups to mm/:

- io-mapping: simplify remap protection flag calculation
- debug_page_alloc: improve error message by printing invalid input
- numa: remove unnecessary variable for clarity

No functional changes.


This patch (of 3):

In io_mapping_map_user(), precompute the page protection flags in a local
variable before calling remap_pfn_range_notrack().

No functional change.

Link: https://lkml.kernel.org/r/20250427100442.958352-1-ye.liu@linux.dev
Link: https://lkml.kernel.org/r/20250427100442.958352-2-ye.liu@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/io-mapping.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/mm/io-mapping.c~mm-io-mapping-precompute-remap-protection-flags-for-clarity
+++ a/mm/io-mapping.c
@@ -21,9 +21,10 @@ int io_mapping_map_user(struct io_mappin
 	if (WARN_ON_ONCE((vma->vm_flags & expected_flags) != expected_flags))
 		return -EINVAL;
 
+	pgprot_t remap_prot = __pgprot((pgprot_val(iomap->prot) & _PAGE_CACHE_MASK) |
+				       (pgprot_val(vma->vm_page_prot) & ~_PAGE_CACHE_MASK));
+
 	/* We rely on prevalidation of the io-mapping to skip track_pfn(). */
-	return remap_pfn_range_notrack(vma, addr, pfn, size,
-		__pgprot((pgprot_val(iomap->prot) & _PAGE_CACHE_MASK) |
-			 (pgprot_val(vma->vm_page_prot) & ~_PAGE_CACHE_MASK)));
+	return remap_pfn_range_notrack(vma, addr, pfn, size, remap_prot);
 }
 EXPORT_SYMBOL_GPL(io_mapping_map_user);
_

Patches currently in -mm which might be from liuye@kylinos.cn are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-13  6:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13  6:54 [merged mm-stable] mm-io-mapping-precompute-remap-protection-flags-for-clarity.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.