summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/memtype.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-11-20 17:33:57 +0300
committerIngo Molnar <mingo@kernel.org>2019-12-10 12:12:55 +0300
commiteb243d1d28663c9b92010973a6a3ffa947f682ba (patch)
treeb60706ed6277facc8e8c362a20b464509a0c8631 /arch/x86/include/asm/memtype.h
parentecdd6ee77b73d11fcf2ca6739e4d1fe590446599 (diff)
downloadlinux-eb243d1d28663c9b92010973a6a3ffa947f682ba.tar.xz
x86/mm/pat: Rename <asm/pat.h> => <asm/memtype.h>
pat.h is a file whose main purpose is to provide the memtype_*() APIs. PAT is the low level hardware mechanism - but the high level abstraction is memtype. So name the header <memtype.h> as well - this goes hand in hand with memtype.c and memtype_interval.c. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/memtype.h')
-rw-r--r--arch/x86/include/asm/memtype.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/include/asm/memtype.h b/arch/x86/include/asm/memtype.h
new file mode 100644
index 000000000000..ec18e38ae391
--- /dev/null
+++ b/arch/x86/include/asm/memtype.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_MEMTYPE_H
+#define _ASM_X86_MEMTYPE_H
+
+#include <linux/types.h>
+#include <asm/pgtable_types.h>
+
+bool pat_enabled(void);
+void pat_disable(const char *reason);
+extern void pat_init(void);
+extern void init_cache_modes(void);
+
+extern int memtype_reserve(u64 start, u64 end,
+ enum page_cache_mode req_pcm, enum page_cache_mode *ret_pcm);
+extern int memtype_free(u64 start, u64 end);
+
+extern int memtype_kernel_map_sync(u64 base, unsigned long size,
+ enum page_cache_mode pcm);
+
+int memtype_reserve_io(resource_size_t start, resource_size_t end,
+ enum page_cache_mode *pcm);
+
+void memtype_free_io(resource_size_t start, resource_size_t end);
+
+bool pat_pfn_immune_to_uc_mtrr(unsigned long pfn);
+
+#endif /* _ASM_X86_MEMTYPE_H */