+ x86-trivial-move-of-__have-macros-in-i386-pagetable-headers.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     x86: trivial move of __HAVE macros in i386 pagetable headers

has been added to the -mm tree.  Its filename is

     x86-trivial-move-of-__have-macros-in-i386-pagetable-headers.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: x86: trivial move of __HAVE macros in i386 pagetable headers
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

Move the __HAVE_ARCH_PTEP defines to accompany the function definitions. 
Anything else is just a complete nightmare to track through the 2/3-level
paging code, and this caused duplicate definitions to be needed (pte_same),
which could have easily been taken care of with the asm-generic pgtable
functions.

Signed-off-by: Zachary Amsden <zach@xxxxxxxxxx>
Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---


diff -puN include/asm-i386/pgtable-2level.h~x86-trivial-move-of-__have-macros-in-i386-pagetable-headers include/asm-i386/pgtable-2level.h
--- a/include/asm-i386/pgtable-2level.h~x86-trivial-move-of-__have-macros-in-i386-pagetable-headers
+++ a/include/asm-i386/pgtable-2level.h
@@ -21,8 +21,9 @@
 #define pte_clear(mm,addr,xp)	do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
 #define pmd_clear(xp)	do { set_pmd(xp, __pmd(0)); } while (0)
 
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
 #define ptep_get_and_clear(mm,addr,xp)	__pte(xchg(&(xp)->pte_low, 0))
-#define pte_same(a, b)		((a).pte_low == (b).pte_low)
+
 #define pte_page(x)		pfn_to_page(pte_pfn(x))
 #define pte_none(x)		(!(x).pte_low)
 #define pte_pfn(x)		((unsigned long)(((x).pte_low >> PAGE_SHIFT)))
diff -puN include/asm-i386/pgtable-3level.h~x86-trivial-move-of-__have-macros-in-i386-pagetable-headers include/asm-i386/pgtable-3level.h
--- a/include/asm-i386/pgtable-3level.h~x86-trivial-move-of-__have-macros-in-i386-pagetable-headers
+++ a/include/asm-i386/pgtable-3level.h
@@ -105,6 +105,7 @@ static inline void pmd_clear(pmd_t *pmd)
 	*(tmp + 1) = 0;
 }
 
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
 static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
 {
 	pte_t res;
@@ -117,6 +118,7 @@ static inline pte_t ptep_get_and_clear(s
 	return res;
 }
 
+#define __HAVE_ARCH_PTE_SAME
 static inline int pte_same(pte_t a, pte_t b)
 {
 	return a.pte_low == b.pte_low && a.pte_high == b.pte_high;
diff -puN include/asm-i386/pgtable.h~x86-trivial-move-of-__have-macros-in-i386-pagetable-headers include/asm-i386/pgtable.h
--- a/include/asm-i386/pgtable.h~x86-trivial-move-of-__have-macros-in-i386-pagetable-headers
+++ a/include/asm-i386/pgtable.h
@@ -246,6 +246,7 @@ static inline pte_t pte_mkhuge(pte_t pte
 # include <asm/pgtable-2level.h>
 #endif
 
+#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)
 {
 	if (!pte_dirty(*ptep))
@@ -253,6 +254,7 @@ static inline int ptep_test_and_clear_di
 	return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte_low);
 }
 
+#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
 static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
 {
 	if (!pte_young(*ptep))
@@ -260,6 +262,7 @@ static inline int ptep_test_and_clear_yo
 	return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low);
 }
 
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
 static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full)
 {
 	pte_t pte;
@@ -272,6 +275,7 @@ static inline pte_t ptep_get_and_clear_f
 	return pte;
 }
 
+#define __HAVE_ARCH_PTEP_SET_WRPROTECT
 static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
 {
 	clear_bit(_PAGE_BIT_RW, &ptep->pte_low);
@@ -441,12 +445,6 @@ extern void noexec_setup(const char *str
 #define GET_IOSPACE(pfn)		0
 #define GET_PFN(pfn)			(pfn)
 
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
-#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
-#define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
-#define __HAVE_ARCH_PTEP_SET_WRPROTECT
-#define __HAVE_ARCH_PTE_SAME
 #include <asm-generic/pgtable.h>
 
 #endif /* _I386_PGTABLE_H */
_

Patches currently in -mm which might be from rusty@xxxxxxxxxxxxxxx are

bug-in-futex-unqueue_me.patch
x86-remove-locally-defined-ldt-structure-in-favour-of-standard-type.patch
x86-allow-a-kernel-to-not-be-in-ring-0.patch
x86-replace-sensitive-instructions-with-macros.patch
x86-roll-all-the-cpuid-asm-into-one-__cpuid-call.patch
x86-trivial-pgtableh-__assembly__-move.patch
x86-trivial-move-of-__have-macros-in-i386-pagetable-headers.patch
x86-trivial-move-of-ptep_set_access_flags.patch
x86-remove-unused-include-from-efi_stubs.patch
eisa-bus-modalias-attributes-support-1.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux