aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/pgtable.h')
-rw-r--r--include/asm-generic/pgtable.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 9d774d07d95b..dc8f99ee305f 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -139,8 +139,15 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
139#define pte_same(A,B) (pte_val(A) == pte_val(B)) 139#define pte_same(A,B) (pte_val(A) == pte_val(B))
140#endif 140#endif
141 141
142#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY 142#ifndef __HAVE_ARCH_PAGE_TEST_DIRTY
143#define page_test_and_clear_dirty(page) (0) 143#define page_test_dirty(page) (0)
144#endif
145
146#ifndef __HAVE_ARCH_PAGE_CLEAR_DIRTY
147#define page_clear_dirty(page) do { } while (0)
148#endif
149
150#ifndef __HAVE_ARCH_PAGE_TEST_DIRTY
144#define pte_maybe_dirty(pte) pte_dirty(pte) 151#define pte_maybe_dirty(pte) pte_dirty(pte)
145#else 152#else
146#define pte_maybe_dirty(pte) (1) 153#define pte_maybe_dirty(pte) (1)
@@ -180,6 +187,21 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
180#ifndef __HAVE_ARCH_ENTER_LAZY_MMU_MODE 187#ifndef __HAVE_ARCH_ENTER_LAZY_MMU_MODE
181#define arch_enter_lazy_mmu_mode() do {} while (0) 188#define arch_enter_lazy_mmu_mode() do {} while (0)
182#define arch_leave_lazy_mmu_mode() do {} while (0) 189#define arch_leave_lazy_mmu_mode() do {} while (0)
190#define arch_flush_lazy_mmu_mode() do {} while (0)
191#endif
192
193/*
194 * A facility to provide batching of the reload of page tables with the
195 * actual context switch code for paravirtualized guests. By convention,
196 * only one of the lazy modes (CPU, MMU) should be active at any given
197 * time, entry should never be nested, and entry and exits should always
198 * be paired. This is for sanity of maintaining and reasoning about the
199 * kernel code.
200 */
201#ifndef __HAVE_ARCH_ENTER_LAZY_CPU_MODE
202#define arch_enter_lazy_cpu_mode() do {} while (0)
203#define arch_leave_lazy_cpu_mode() do {} while (0)
204#define arch_flush_lazy_cpu_mode() do {} while (0)
183#endif 205#endif
184 206
185/* 207/*