summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/pgtable-2level.h10
-rw-r--r--arch/x86/include/asm/pgtable_64.h8
2 files changed, 0 insertions, 18 deletions
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h
index 0d193e234647..eec82d4c4473 100644
--- a/arch/x86/include/asm/pgtable-2level.h
+++ b/arch/x86/include/asm/pgtable-2level.h
@@ -115,13 +115,8 @@ static __always_inline pte_t pgoff_to_pte(pgoff_t off)
115 */ 115 */
116#define PTE_FILE_MAX_BITS 29 116#define PTE_FILE_MAX_BITS 29
117#define PTE_FILE_SHIFT1 (_PAGE_BIT_PRESENT + 1) 117#define PTE_FILE_SHIFT1 (_PAGE_BIT_PRESENT + 1)
118#if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE
119#define PTE_FILE_SHIFT2 (_PAGE_BIT_FILE + 1) 118#define PTE_FILE_SHIFT2 (_PAGE_BIT_FILE + 1)
120#define PTE_FILE_SHIFT3 (_PAGE_BIT_PROTNONE + 1) 119#define PTE_FILE_SHIFT3 (_PAGE_BIT_PROTNONE + 1)
121#else
122#define PTE_FILE_SHIFT2 (_PAGE_BIT_PROTNONE + 1)
123#define PTE_FILE_SHIFT3 (_PAGE_BIT_FILE + 1)
124#endif
125#define PTE_FILE_BITS1 (PTE_FILE_SHIFT2 - PTE_FILE_SHIFT1 - 1) 120#define PTE_FILE_BITS1 (PTE_FILE_SHIFT2 - PTE_FILE_SHIFT1 - 1)
126#define PTE_FILE_BITS2 (PTE_FILE_SHIFT3 - PTE_FILE_SHIFT2 - 1) 121#define PTE_FILE_BITS2 (PTE_FILE_SHIFT3 - PTE_FILE_SHIFT2 - 1)
127 122
@@ -153,13 +148,8 @@ static __always_inline pte_t pgoff_to_pte(pgoff_t off)
153#endif /* CONFIG_MEM_SOFT_DIRTY */ 148#endif /* CONFIG_MEM_SOFT_DIRTY */
154 149
155/* Encode and de-code a swap entry */ 150/* Encode and de-code a swap entry */
156#if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE
157#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1) 151#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1)
158#define SWP_OFFSET_SHIFT (_PAGE_BIT_PROTNONE + 1) 152#define SWP_OFFSET_SHIFT (_PAGE_BIT_PROTNONE + 1)
159#else
160#define SWP_TYPE_BITS (_PAGE_BIT_PROTNONE - _PAGE_BIT_PRESENT - 1)
161#define SWP_OFFSET_SHIFT (_PAGE_BIT_FILE + 1)
162#endif
163 153
164#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > SWP_TYPE_BITS) 154#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > SWP_TYPE_BITS)
165 155
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 6d6ecd09883c..5be9063545d2 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -143,7 +143,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
143#define pte_unmap(pte) ((void)(pte))/* NOP */ 143#define pte_unmap(pte) ((void)(pte))/* NOP */
144 144
145/* Encode and de-code a swap entry */ 145/* Encode and de-code a swap entry */
146#if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE
147#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1) 146#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1)
148#ifdef CONFIG_NUMA_BALANCING 147#ifdef CONFIG_NUMA_BALANCING
149/* Automatic NUMA balancing needs to be distinguishable from swap entries */ 148/* Automatic NUMA balancing needs to be distinguishable from swap entries */
@@ -151,13 +150,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
151#else 150#else
152#define SWP_OFFSET_SHIFT (_PAGE_BIT_PROTNONE + 1) 151#define SWP_OFFSET_SHIFT (_PAGE_BIT_PROTNONE + 1)
153#endif 152#endif
154#else
155#ifdef CONFIG_NUMA_BALANCING
156#error Incompatible format for automatic NUMA balancing
157#endif
158#define SWP_TYPE_BITS (_PAGE_BIT_PROTNONE - _PAGE_BIT_PRESENT - 1)
159#define SWP_OFFSET_SHIFT (_PAGE_BIT_FILE + 1)
160#endif
161 153
162#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > SWP_TYPE_BITS) 154#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > SWP_TYPE_BITS)
163 155