Merge tag 'mips_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[openwrt/staging/blogic.git] / include / asm-generic / pgtable.h
index b5278ec627db2efe8b88352ee4b2e33feced1765..7056a25479d6b17fd43509d54ff8e9f8073c6387 100644 (file)
@@ -524,6 +524,10 @@ static inline int arch_unmap_one(struct mm_struct *mm,
 #define flush_tlb_fix_spurious_fault(vma, address) flush_tlb_page(vma, address)
 #endif
 
+#ifndef pgprot_nx
+#define pgprot_nx(prot)        (prot)
+#endif
+
 #ifndef pgprot_noncached
 #define pgprot_noncached(prot) (prot)
 #endif
@@ -1242,6 +1246,29 @@ static inline bool arch_has_pfn_modify_check(void)
 # define PAGE_KERNEL_EXEC PAGE_KERNEL
 #endif
 
+/*
+ * Page Table Modification bits for pgtbl_mod_mask.
+ *
+ * These are used by the p?d_alloc_track*() set of functions an in the generic
+ * vmalloc/ioremap code to track at which page-table levels entries have been
+ * modified. Based on that the code can better decide when vmalloc and ioremap
+ * mapping changes need to be synchronized to other page-tables in the system.
+ */
+#define                __PGTBL_PGD_MODIFIED    0
+#define                __PGTBL_P4D_MODIFIED    1
+#define                __PGTBL_PUD_MODIFIED    2
+#define                __PGTBL_PMD_MODIFIED    3
+#define                __PGTBL_PTE_MODIFIED    4
+
+#define                PGTBL_PGD_MODIFIED      BIT(__PGTBL_PGD_MODIFIED)
+#define                PGTBL_P4D_MODIFIED      BIT(__PGTBL_P4D_MODIFIED)
+#define                PGTBL_PUD_MODIFIED      BIT(__PGTBL_PUD_MODIFIED)
+#define                PGTBL_PMD_MODIFIED      BIT(__PGTBL_PMD_MODIFIED)
+#define                PGTBL_PTE_MODIFIED      BIT(__PGTBL_PTE_MODIFIED)
+
+/* Page-Table Modification Mask */
+typedef unsigned int pgtbl_mod_mask;
+
 #endif /* !__ASSEMBLY__ */
 
 #ifndef io_remap_pfn_range