]> Pileus Git - ~andy/linux/blobdiff - arch/um/include/asm/pgtable.h
um: Implement a custom pte_same() function
[~andy/linux] / arch / um / include / asm / pgtable.h
index 6a3f9845743ea485c24254696ff4b41646e418d0..294254e13a355e8e037c2177c447742ccfcb4082 100644 (file)
@@ -273,6 +273,12 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval)
 }
 #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
 
+#define __HAVE_ARCH_PTE_SAME
+static inline int pte_same(pte_t pte_a, pte_t pte_b)
+{
+       return !((pte_val(pte_a) ^ pte_val(pte_b)) & ~_PAGE_NEWPAGE);
+}
+
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.