]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/s390/include/asm/pgtable.h
KVM: s390: allow sie enablement for multi-threaded programs
[karo-tx-linux.git] / arch / s390 / include / asm / pgtable.h
index 75fb726de91f802a68293d67c3b8541281044d3c..7a60bb93e83c23ac1f3216b255abff6534d91cfa 100644 (file)
@@ -1361,6 +1361,17 @@ static inline pmd_t pmd_mkwrite(pmd_t pmd)
 }
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLB_PAGE */
 
+static inline void pmdp_flush_lazy(struct mm_struct *mm,
+                                  unsigned long address, pmd_t *pmdp)
+{
+       int active = (mm == current->active_mm) ? 1 : 0;
+
+       if ((atomic_read(&mm->context.attach_count) & 0xffff) > active)
+               __pmd_idte(address, pmdp);
+       else
+               mm->context.flush_mm = 1;
+}
+
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 
 #define __HAVE_ARCH_PGTABLE_DEPOSIT