|
44 | 44 | /* Page protection bits */
|
45 | 45 | #define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_USER)
|
46 | 46 |
|
47 |
| -#define PAGE_NONE __pgprot(0) |
| 47 | +#define PAGE_NONE __pgprot(_PAGE_PROT_NONE) |
48 | 48 | #define PAGE_READ __pgprot(_PAGE_BASE | _PAGE_READ)
|
49 | 49 | #define PAGE_WRITE __pgprot(_PAGE_BASE | _PAGE_READ | _PAGE_WRITE)
|
50 | 50 | #define PAGE_EXEC __pgprot(_PAGE_BASE | _PAGE_EXEC)
|
@@ -98,7 +98,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
98 | 98 |
|
99 | 99 | static inline int pmd_present(pmd_t pmd)
|
100 | 100 | {
|
101 |
| - return (pmd_val(pmd) & _PAGE_PRESENT); |
| 101 | + return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE)); |
102 | 102 | }
|
103 | 103 |
|
104 | 104 | static inline int pmd_none(pmd_t pmd)
|
@@ -178,7 +178,7 @@ static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long addr)
|
178 | 178 |
|
179 | 179 | static inline int pte_present(pte_t pte)
|
180 | 180 | {
|
181 |
| - return (pte_val(pte) & _PAGE_PRESENT); |
| 181 | + return (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROT_NONE)); |
182 | 182 | }
|
183 | 183 |
|
184 | 184 | static inline int pte_none(pte_t pte)
|
@@ -380,7 +380,7 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
|
380 | 380 | *
|
381 | 381 | * Format of swap PTE:
|
382 | 382 | * bit 0: _PAGE_PRESENT (zero)
|
383 |
| - * bit 1: reserved for future use (zero) |
| 383 | + * bit 1: _PAGE_PROT_NONE (zero) |
384 | 384 | * bits 2 to 6: swap type
|
385 | 385 | * bits 7 to XLEN-1: swap offset
|
386 | 386 | */
|
|
0 commit comments