aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pat_rbtree.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-11-19 09:00:45 +0100
committerIngo Molnar <mingo@kernel.org>2019-11-19 09:00:45 +0100
commit9f4813b531a0b8cc502fcfb142937fe4e9104d77 (patch)
tree97ff9123582e2a9d0fd21b73cbd4abe728cafa93 /arch/x86/mm/pat_rbtree.c
parentx86/mm: Clean up the pmd_read_atomic() comments (diff)
parentLinux 5.4-rc8 (diff)
downloadlinux-9f4813b531a0b8cc502fcfb142937fe4e9104d77.tar.gz
linux-9f4813b531a0b8cc502fcfb142937fe4e9104d77.zip
Merge tag 'v5.4-rc8' into WIP.x86/mm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm/pat_rbtree.c')
-rw-r--r--arch/x86/mm/pat_rbtree.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/x86/mm/pat_rbtree.c b/arch/x86/mm/pat_rbtree.c
index fa16036fa592..65ebe4b88f7c 100644
--- a/arch/x86/mm/pat_rbtree.c
+++ b/arch/x86/mm/pat_rbtree.c
@@ -54,23 +54,10 @@ static u64 get_subtree_max_end(struct rb_node *node)
return ret;
}
-static u64 compute_subtree_max_end(struct memtype *data)
-{
- u64 max_end = data->end, child_max_end;
-
- child_max_end = get_subtree_max_end(data->rb.rb_right);
- if (child_max_end > max_end)
- max_end = child_max_end;
-
- child_max_end = get_subtree_max_end(data->rb.rb_left);
- if (child_max_end > max_end)
- max_end = child_max_end;
-
- return max_end;
-}
+#define NODE_END(node) ((node)->end)
-RB_DECLARE_CALLBACKS(static, memtype_rb_augment_cb, struct memtype, rb,
- u64, subtree_max_end, compute_subtree_max_end)
+RB_DECLARE_CALLBACKS_MAX(static, memtype_rb_augment_cb,
+ struct memtype, rb, u64, subtree_max_end, NODE_END)
/* Find the first (lowest start addr) overlapping range from rb tree */
static struct memtype *memtype_rb_lowest_match(struct rb_root *root,