diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-12-10 10:08:09 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-12-10 10:12:55 +0100 |
commit | f9b57cf80c8b585614ba223732be0d8f19d558d8 (patch) | |
tree | ab630d0ae380c9a9d09da746086a8e811b563174 /arch/x86/mm/pat_internal.h | |
parent | x86/mm/pat: Clean up PAT initialization flags (diff) | |
download | linux-f9b57cf80c8b585614ba223732be0d8f19d558d8.tar.xz linux-f9b57cf80c8b585614ba223732be0d8f19d558d8.zip |
x86/mm/pat: Move the memtype related files to arch/x86/mm/pat/
- pat.c offers, dominantly, the memtype APIs - so rename it to memtype.c.
- pageattr.c is offering, primarily, the set_memory*() page attribute APIs,
which is offered via the <asm/set_memory.h> header: name the .c file
along the same pattern.
I.e. perform these renames, and move them all next to each other in arch/x86/mm/pat/:
pat.c => memtype.c
pat_internal.h => memtype.h
pat_interval.c => memtype_interval.c
pageattr.c => set_memory.c
pageattr-test.c => cpa-test.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm/pat_internal.h')
-rw-r--r-- | arch/x86/mm/pat_internal.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/arch/x86/mm/pat_internal.h b/arch/x86/mm/pat_internal.h deleted file mode 100644 index 23ce8cdac159..000000000000 --- a/arch/x86/mm/pat_internal.h +++ /dev/null @@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __PAT_INTERNAL_H_ -#define __PAT_INTERNAL_H_ - -extern int pat_debug_enable; - -#define dprintk(fmt, arg...) \ - do { if (pat_debug_enable) pr_info("x86/PAT: " fmt, ##arg); } while (0) - -struct memtype { - u64 start; - u64 end; - u64 subtree_max_end; - enum page_cache_mode type; - struct rb_node rb; -}; - -static inline char *cattr_name(enum page_cache_mode pcm) -{ - switch (pcm) { - case _PAGE_CACHE_MODE_UC: return "uncached"; - case _PAGE_CACHE_MODE_UC_MINUS: return "uncached-minus"; - case _PAGE_CACHE_MODE_WB: return "write-back"; - case _PAGE_CACHE_MODE_WC: return "write-combining"; - case _PAGE_CACHE_MODE_WT: return "write-through"; - case _PAGE_CACHE_MODE_WP: return "write-protected"; - default: return "broken"; - } -} - -#ifdef CONFIG_X86_PAT -extern int memtype_check_insert(struct memtype *entry_new, - enum page_cache_mode *new_type); -extern struct memtype *memtype_erase(u64 start, u64 end); -extern struct memtype *memtype_lookup(u64 addr); -extern int memtype_copy_nth_element(struct memtype *entry_out, loff_t pos); -#else -static inline int memtype_check_insert(struct memtype *entry_new, - enum page_cache_mode *new_type) -{ return 0; } -static inline struct memtype *memtype_erase(u64 start, u64 end) -{ return NULL; } -static inline struct memtype *memtype_lookup(u64 addr) -{ return NULL; } -static inline int memtype_copy_nth_element(struct memtype *out, loff_t pos) -{ return 0; } -#endif - -#endif /* __PAT_INTERNAL_H_ */ |