diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/4level-fixup.h | 2 | ||||
-rw-r--r-- | include/asm-generic/5level-fixup.h | 2 | ||||
-rw-r--r-- | include/asm-generic/pgtable-nop4d-hack.h | 2 | ||||
-rw-r--r-- | include/asm-generic/pgtable-nop4d.h | 2 | ||||
-rw-r--r-- | include/asm-generic/pgtable-nopmd.h | 2 | ||||
-rw-r--r-- | include/asm-generic/pgtable-nopud.h | 2 | ||||
-rw-r--r-- | include/asm-generic/pgtable.h | 16 |
7 files changed, 22 insertions, 6 deletions
diff --git a/include/asm-generic/4level-fixup.h b/include/asm-generic/4level-fixup.h index 89f3b03b1445..e3667c9a33a5 100644 --- a/include/asm-generic/4level-fixup.h +++ b/include/asm-generic/4level-fixup.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #define _4LEVEL_FIXUP_H | 3 | #define _4LEVEL_FIXUP_H |
4 | 4 | ||
5 | #define __ARCH_HAS_4LEVEL_HACK | 5 | #define __ARCH_HAS_4LEVEL_HACK |
6 | #define __PAGETABLE_PUD_FOLDED | 6 | #define __PAGETABLE_PUD_FOLDED 1 |
7 | 7 | ||
8 | #define PUD_SHIFT PGDIR_SHIFT | 8 | #define PUD_SHIFT PGDIR_SHIFT |
9 | #define PUD_SIZE PGDIR_SIZE | 9 | #define PUD_SIZE PGDIR_SIZE |
diff --git a/include/asm-generic/5level-fixup.h b/include/asm-generic/5level-fixup.h index 9c2e0708eb82..73474bb52344 100644 --- a/include/asm-generic/5level-fixup.h +++ b/include/asm-generic/5level-fixup.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #define _5LEVEL_FIXUP_H | 3 | #define _5LEVEL_FIXUP_H |
4 | 4 | ||
5 | #define __ARCH_HAS_5LEVEL_HACK | 5 | #define __ARCH_HAS_5LEVEL_HACK |
6 | #define __PAGETABLE_P4D_FOLDED | 6 | #define __PAGETABLE_P4D_FOLDED 1 |
7 | 7 | ||
8 | #define P4D_SHIFT PGDIR_SHIFT | 8 | #define P4D_SHIFT PGDIR_SHIFT |
9 | #define P4D_SIZE PGDIR_SIZE | 9 | #define P4D_SIZE PGDIR_SIZE |
diff --git a/include/asm-generic/pgtable-nop4d-hack.h b/include/asm-generic/pgtable-nop4d-hack.h index 0c34215263b8..1d6dd38c0e5e 100644 --- a/include/asm-generic/pgtable-nop4d-hack.h +++ b/include/asm-generic/pgtable-nop4d-hack.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
6 | #include <asm-generic/5level-fixup.h> | 6 | #include <asm-generic/5level-fixup.h> |
7 | 7 | ||
8 | #define __PAGETABLE_PUD_FOLDED | 8 | #define __PAGETABLE_PUD_FOLDED 1 |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Having the pud type consist of a pgd gets the size right, and allows | 11 | * Having the pud type consist of a pgd gets the size right, and allows |
diff --git a/include/asm-generic/pgtable-nop4d.h b/include/asm-generic/pgtable-nop4d.h index 1a29b2a0282b..04cb913797bc 100644 --- a/include/asm-generic/pgtable-nop4d.h +++ b/include/asm-generic/pgtable-nop4d.h | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
6 | 6 | ||
7 | #define __PAGETABLE_P4D_FOLDED | 7 | #define __PAGETABLE_P4D_FOLDED 1 |
8 | 8 | ||
9 | typedef struct { pgd_t pgd; } p4d_t; | 9 | typedef struct { pgd_t pgd; } p4d_t; |
10 | 10 | ||
diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h index f35f6e8149e4..b85b8271a73d 100644 --- a/include/asm-generic/pgtable-nopmd.h +++ b/include/asm-generic/pgtable-nopmd.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | struct mm_struct; | 9 | struct mm_struct; |
10 | 10 | ||
11 | #define __PAGETABLE_PMD_FOLDED | 11 | #define __PAGETABLE_PMD_FOLDED 1 |
12 | 12 | ||
13 | /* | 13 | /* |
14 | * Having the pmd type consist of a pud gets the size right, and allows | 14 | * Having the pmd type consist of a pud gets the size right, and allows |
diff --git a/include/asm-generic/pgtable-nopud.h b/include/asm-generic/pgtable-nopud.h index e950b9c50f34..9bef475db6fe 100644 --- a/include/asm-generic/pgtable-nopud.h +++ b/include/asm-generic/pgtable-nopud.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #else | 9 | #else |
10 | #include <asm-generic/pgtable-nop4d.h> | 10 | #include <asm-generic/pgtable-nop4d.h> |
11 | 11 | ||
12 | #define __PAGETABLE_PUD_FOLDED | 12 | #define __PAGETABLE_PUD_FOLDED 1 |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * Having the pud type consist of a p4d gets the size right, and allows | 15 | * Having the pud type consist of a p4d gets the size right, and allows |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 5657a20e0c59..359fb935ded6 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -1127,4 +1127,20 @@ static inline bool arch_has_pfn_modify_check(void) | |||
1127 | #endif | 1127 | #endif |
1128 | #endif | 1128 | #endif |
1129 | 1129 | ||
1130 | /* | ||
1131 | * On some architectures it depends on the mm if the p4d/pud or pmd | ||
1132 | * layer of the page table hierarchy is folded or not. | ||
1133 | */ | ||
1134 | #ifndef mm_p4d_folded | ||
1135 | #define mm_p4d_folded(mm) __is_defined(__PAGETABLE_P4D_FOLDED) | ||
1136 | #endif | ||
1137 | |||
1138 | #ifndef mm_pud_folded | ||
1139 | #define mm_pud_folded(mm) __is_defined(__PAGETABLE_PUD_FOLDED) | ||
1140 | #endif | ||
1141 | |||
1142 | #ifndef mm_pmd_folded | ||
1143 | #define mm_pmd_folded(mm) __is_defined(__PAGETABLE_PMD_FOLDED) | ||
1144 | #endif | ||
1145 | |||
1130 | #endif /* _ASM_GENERIC_PGTABLE_H */ | 1146 | #endif /* _ASM_GENERIC_PGTABLE_H */ |