summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pat_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pat_internal.h')
-rw-r--r--arch/x86/mm/pat_internal.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/x86/mm/pat_internal.h b/arch/x86/mm/pat_internal.h
index 6c98780eb731..4f39eefa3e61 100644
--- a/arch/x86/mm/pat_internal.h
+++ b/arch/x86/mm/pat_internal.h
@@ -9,8 +9,8 @@ extern int pat_debug_enable;
struct memtype {
u64 start;
u64 end;
+ u64 subtree_max_end;
unsigned long type;
- struct list_head nd;
struct rb_node rb;
};
@@ -25,4 +25,22 @@ static inline char *cattr_name(unsigned long flags)
}
}
+#ifdef CONFIG_X86_PAT
+extern int rbt_memtype_check_insert(struct memtype *new,
+ unsigned long *new_type);
+extern int rbt_memtype_erase(u64 start, u64 end);
+extern struct memtype *rbt_memtype_lookup(u64 addr);
+extern int rbt_memtype_copy_nth_element(struct memtype *out, loff_t pos);
+#else
+static inline int rbt_memtype_check_insert(struct memtype *new,
+ unsigned long *new_type)
+{ return 0; }
+static inline int rbt_memtype_erase(u64 start, u64 end)
+{ return 0; }
+static inline struct memtype *rbt_memtype_lookup(u64 addr)
+{ return NULL; }
+static inline int rbt_memtype_copy_nth_element(struct memtype *out, loff_t pos)
+{ return 0; }
+#endif
+
#endif /* __PAT_INTERNAL_H_ */
OpenPOWER on IntegriCloud