x86-mm-pat-inline-memtype_match-into-memtype_erase.patch removed from -mm tree
The quilt patch titled
Subject: x86/mm/pat: inline memtype_match() into memtype_erase()
has been removed from the -mm tree. Its filename was
x86-mm-pat-inline-memtype_match-into-memtype_erase.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: David Hildenbrand <[email protected]>
Subject: x86/mm/pat: inline memtype_match() into memtype_erase()
Date: Mon, 12 May 2025 14:34:22 +0200
Let's just have it in a single function. The resulting function is certainly small enough and readable.
Signed-off-by David Hildenbrand <[email protected]>
Reviewed-by Lorenzo Stoakes <[email protected]>
Reviewed-by Liam R. Howlett <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Borislav Betkov <[email protected]>
Cc Dave Airlie <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jann Horn <[email protected]>
Cc Jonas Lahtinen <[email protected]>
Cc "Masami Hiramatsu (Google)" <[email protected]>
Cc Mathieu Desnoyers <[email protected]>
Cc Peter Xu <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Thomas Gleinxer <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Vlastimil Babka <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/x86/mm/pat/memtype_interval.c | 31 +++++++-------------------- 1 file changed, 9 insertions(+), 22 deletions(-)
arch/x86/mm/pat/memtype_interval.c renamed from arch/x86/mm/pat/memtype_interval.c~x86-mm-pat-inline-memtype_match-into-memtype_erase +9 -22
@@ -49,21 +49,6 @@ INTERVAL_TREE_DEFINE(struct memtype, rb,static struct rb_root_cached memtype_rbroot =RB_ROOT_CACHED ; -static struct memtype *memtype_match (u64 start,u64 end) -{ -struct memtype *entry_match; - - entry_match =interval_iter_first (&memtype_rbroot, start, end-1 ); - -while (entry_match !=NULL && entry_match->start < end) { -if (entry_match->start == start && entry_match->end == end) -return entry_match; - entry_match =interval_iter_next (entry_match, start, end-1 ); - } - -return NULL ;/* Returns NULL if there is no match */ -} -static int memtype_check_conflict (u64 start,u64 end,enum page_cache_mode reqtype,enum page_cache_mode *newtype)
@@ -119,14 +104,16 @@ int memtype_check_insert(struct memtypestruct memtype *memtype_erase (u64 start,u64 end) { -struct memtype *entry_old; - - entry_old =memtype_match (start, end); -if (!entry_old) -return ERR_PTR (-EINVAL ); +struct memtype *entry =interval_iter_first (&memtype_rbroot, start, end -1 ); -interval_remove (entry_old, &memtype_rbroot); -return entry_old; +while (entry && entry->start < end) { +if (entry->start == start && entry->end == end) { +interval_remove (entry, &memtype_rbroot); +return entry; + } + entry =interval_iter_next (entry, start, end -1 ); + } +return ERR_PTR (-EINVAL ); }struct memtype *memtype_lookup (u64 addr)
_
Patches currently in -mm which might be from [email protected] are