x86/mm/pat: Rename <asm/pat.h> => <asm/memtype.h>
authorIngo Molnar <mingo@kernel.org>
Wed, 20 Nov 2019 14:33:57 +0000 (15:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Dec 2019 09:12:55 +0000 (10:12 +0100)
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>
20 files changed:
arch/x86/include/asm/memtype.h [new file with mode: 0644]
arch/x86/include/asm/mtrr.h
arch/x86/include/asm/pat.h [deleted file]
arch/x86/include/asm/pci.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/mtrr/generic.c
arch/x86/kernel/cpu/mtrr/mtrr.c
arch/x86/kernel/cpu/scattered.c
arch/x86/kernel/cpu/topology.c
arch/x86/kernel/x86_init.c
arch/x86/kvm/mmu/mmu.c
arch/x86/mm/iomap_32.c
arch/x86/mm/ioremap.c
arch/x86/mm/pat/memtype.c
arch/x86/mm/pat/memtype_interval.c
arch/x86/mm/pat/set_memory.c
arch/x86/pci/i386.c
arch/x86/xen/mmu_pv.c
drivers/infiniband/hw/mlx5/main.c
drivers/media/pci/ivtv/ivtvfb.c

diff --git a/arch/x86/include/asm/memtype.h b/arch/x86/include/asm/memtype.h
new file mode 100644 (file)
index 0000000..ec18e38
--- /dev/null
@@ -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 */
index 3337d2233aefc0da733519b877b33b70746c2b2f..829df26fd7a3ec2066f6a339cfbd3c51befd2ed5 100644 (file)
@@ -24,7 +24,7 @@
 #define _ASM_X86_MTRR_H
 
 #include <uapi/asm/mtrr.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 
 
 /*
diff --git a/arch/x86/include/asm/pat.h b/arch/x86/include/asm/pat.h
deleted file mode 100644 (file)
index 4a9a97d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_X86_PAT_H
-#define _ASM_X86_PAT_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_PAT_H */
index 90d0731fdcb6337c8c49719fcea1cabe4af43b54..c1fdd43fe18764517165847b69bc5349dd3b46fd 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/scatterlist.h>
 #include <linux/numa.h>
 #include <asm/io.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/x86_init.h>
 
 struct pci_sysdata {
index 2e4d90294fe67cded7b5baa2b465c4f8008b6880..9d6a35a4586e902eb93c82bf8a5fab7c5db42baa 100644 (file)
@@ -49,7 +49,7 @@
 #include <asm/cpu.h>
 #include <asm/mce.h>
 #include <asm/msr.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/microcode.h>
 #include <asm/microcode_intel.h>
 #include <asm/intel-family.h>
index aa5c064a6a227f5cc71f787b3a4122f56f57acfe..51b9190c628b220b77f5ab386e6b62677ffeb185 100644 (file)
@@ -15,7 +15,7 @@
 #include <asm/tlbflush.h>
 #include <asm/mtrr.h>
 #include <asm/msr.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 
 #include "mtrr.h"
 
index 507039c20128a6870e1e660d5f5bb3b470cfb18f..6a80f36b5d598ab51c9ba5600a5933900ae113ea 100644 (file)
@@ -52,7 +52,7 @@
 #include <asm/e820/api.h>
 #include <asm/mtrr.h>
 #include <asm/msr.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 
 #include "mtrr.h"
 
index adf9b71386effa99207724997efd6eff34f3c10b..62b137c3c97a2089eafe530305eb111b16353132 100644 (file)
@@ -4,7 +4,7 @@
  */
 #include <linux/cpu.h>
 
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/apic.h>
 #include <asm/processor.h>
 
index ee48c3fc8a65e28049e83c72096208760d8f79c5..d3a0791bc052adee6dd73c46416a9ab8226e4f89 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <linux/cpu.h>
 #include <asm/apic.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/processor.h>
 
 #include "cpu.h"
index ce89430a7f8011aa5d49e1ee99dcae19a9862cf1..23e25f3034c2d43a7df2ac1971ef51c0973fd9a8 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm/irq.h>
 #include <asm/io_apic.h>
 #include <asm/hpet.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/tsc.h>
 #include <asm/iommu.h>
 #include <asm/mach_traps.h>
index 6f92b40d798cab7d4b9f4a451621319e687e29df..a32b847a8089dd0238f6c6aacdefd26a12b297f8 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/kthread.h>
 
 #include <asm/page.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/cmpxchg.h>
 #include <asm/e820/api.h>
 #include <asm/io.h>
index 4a0762ebe051d0f0d10bc6f5da055756400e4a24..f60398aeb6445fb4537fb7be3fdac7f12e411f81 100644 (file)
@@ -4,7 +4,7 @@
  */
 
 #include <asm/iomap.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <linux/export.h>
 #include <linux/highmem.h>
 
index e49de6cbc64ef99f0274b79c57ce603feff59944..44e4beb4239f93bb83876bd21ab6f8007460be71 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 #include <asm/pgalloc.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/setup.h>
 
 #include "physaddr.h"
index 7ed37354e5212bcae430f66f085da1eb64058c75..394be8611748ade72487c21b512d0cc26016c7c5 100644 (file)
@@ -52,7 +52,7 @@
 #include <asm/mtrr.h>
 #include <asm/page.h>
 #include <asm/msr.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/io.h>
 
 #include "memtype.h"
index a7fbbdd88eebfdb0cfc4634799b96d914616b456..a07e4882bf366df5df02ba44e152e882a4a97042 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/gfp.h>
 
 #include <asm/pgtable.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 
 #include "memtype.h"
 
index 3e5e98b78bf3f4acc0b707063451d8b331e1e3cd..d4ab493b16474408229b7b187b1a07ca7cee84d2 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/uaccess.h>
 #include <asm/pgalloc.h>
 #include <asm/proto.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/set_memory.h>
 
 #include "../mm_internal.h"
index 9df652d3d9275bca15c9d5b8ff54de8e8235f161..fa855bbaebaf191530498bbf29487ef61867071b 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/errno.h>
 #include <linux/memblock.h>
 
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/e820/api.h>
 #include <asm/pci_x86.h>
 #include <asm/io_apic.h>
index c8dbee62ec2ab1ab11ce668388cb9d86f56c94af..bbba8b17829a187a9efdd3dc1de6cfbc398a7ee6 100644 (file)
@@ -67,7 +67,7 @@
 #include <asm/linkage.h>
 #include <asm/page.h>
 #include <asm/init.h>
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #include <asm/smp.h>
 #include <asm/tlb.h>
 
index 51100350b688058dc782306a57fa81abd907612f..c0c2c56b7a80db327a59f9bc1f7c441fb1984a4f 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/slab.h>
 #include <linux/bitmap.h>
 #if defined(CONFIG_X86)
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #endif
 #include <linux/sched.h>
 #include <linux/sched/mm.h>
index 95a56cce9b657c32cff59be0950f9c12a4045153..1daf9e07cad7484eaa5e66b2b8a8d6fdcc9ffb37 100644 (file)
@@ -37,7 +37,7 @@
 #include <linux/ivtvfb.h>
 
 #ifdef CONFIG_X86_64
-#include <asm/pat.h>
+#include <asm/memtype.h>
 #endif
 
 /* card parameters */