Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2965a0e6 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds
Browse files

[PATCH] x86: trivial move of ptep_set_access_flags



Move ptep_set_access_flags to be closer to the other ptep accessors, and make
the indentation standard.

Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6049742d
Loading
Loading
Loading
Loading
+16 −15
Original line number Diff line number Diff line
@@ -246,6 +246,22 @@ static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return p
# include <asm/pgtable-2level.h>
#endif

/*
 * We only update the dirty/accessed state if we set
 * the dirty bit by hand in the kernel, since the hardware
 * will do the accessed bit for us, and we don't want to
 * race with other CPU's that might be updating the dirty
 * bit at the same time.
 */
#define  __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
#define ptep_set_access_flags(vma, address, ptep, entry, dirty)		\
do {									\
	if (dirty) {							\
		(ptep)->pte_low = (entry).pte_low;			\
		flush_tlb_page(vma, address);				\
	}								\
} while (0)

#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
{
@@ -415,23 +431,8 @@ extern void noexec_setup(const char *str);
/*
 * The i386 doesn't have any external MMU info: the kernel page
 * tables contain all the necessary information.
 *
 * Also, we only update the dirty/accessed state if we set
 * the dirty bit by hand in the kernel, since the hardware
 * will do the accessed bit for us, and we don't want to
 * race with other CPU's that might be updating the dirty
 * bit at the same time.
 */
#define update_mmu_cache(vma,address,pte) do { } while (0)
#define  __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
	do {								  \
		if (__dirty) {						  \
			(__ptep)->pte_low = (__entry).pte_low;	  	  \
			flush_tlb_page(__vma, __address);		  \
		}							  \
	} while (0)

#endif /* !__ASSEMBLY__ */

#ifdef CONFIG_FLATMEM