aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/pgtable.h')
-rw-r--r--include/asm-i386/pgtable.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 38bf97514436..0dc051a8078b 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -246,6 +246,22 @@ static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return p
246# include <asm/pgtable-2level.h> 246# include <asm/pgtable-2level.h>
247#endif 247#endif
248 248
249/*
250 * We only update the dirty/accessed state if we set
251 * the dirty bit by hand in the kernel, since the hardware
252 * will do the accessed bit for us, and we don't want to
253 * race with other CPU's that might be updating the dirty
254 * bit at the same time.
255 */
256#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
257#define ptep_set_access_flags(vma, address, ptep, entry, dirty) \
258do { \
259 if (dirty) { \
260 (ptep)->pte_low = (entry).pte_low; \
261 flush_tlb_page(vma, address); \
262 } \
263} while (0)
264
249#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY 265#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
250static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) 266static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
251{ 267{
@@ -415,23 +431,8 @@ extern void noexec_setup(const char *str);
415/* 431/*
416 * The i386 doesn't have any external MMU info: the kernel page 432 * The i386 doesn't have any external MMU info: the kernel page
417 * tables contain all the necessary information. 433 * tables contain all the necessary information.
418 *
419 * Also, we only update the dirty/accessed state if we set
420 * the dirty bit by hand in the kernel, since the hardware
421 * will do the accessed bit for us, and we don't want to
422 * race with other CPU's that might be updating the dirty
423 * bit at the same time.
424 */ 434 */
425#define update_mmu_cache(vma,address,pte) do { } while (0) 435#define update_mmu_cache(vma,address,pte) do { } while (0)
426#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
427#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
428 do { \
429 if (__dirty) { \
430 (__ptep)->pte_low = (__entry).pte_low; \
431 flush_tlb_page(__vma, __address); \
432 } \
433 } while (0)
434
435#endif /* !__ASSEMBLY__ */ 436#endif /* !__ASSEMBLY__ */
436 437
437#ifdef CONFIG_FLATMEM 438#ifdef CONFIG_FLATMEM