Skip to contentSkip to conversation

linux/i386: adjust the way _PAGE_IO gets defined

PATCH New Jan Beulich 1 participant 1 message Apr 4, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux/i386: adjust the way _PAGE_IO gets defined

Instead of adding a duplicate definition for the newly used bit, rename the definition previously present, which permits catching both current (out-of-tree) or future conflicting uses.

As usual, written and tested on 2.6.25-rc8 and made apply to the 2.6.18 tree without further testing.

include/asm-i386/mach-xen/asm/pgtable.h +6 -7
Index: head-2008-04-02/include/asm-i386/mach-xen/asm/pgtable.h
===================================================================
@@ -105,8 +105,9 @@ void paging_init(void);
 #define _PAGE_BIT_DIRTY		6
 #define _PAGE_BIT_PSE		7	/* 4 MB (or 2MB) page, Pentium+, if present.. */
 #define _PAGE_BIT_GLOBAL	8	/* Global TLB entry PPro+ */
-#define _PAGE_BIT_UNUSED1	9	/* available for programmer */
-#define _PAGE_BIT_UNUSED2	10
+#define _PAGE_BIT_IO		9	/* Mapped page is I/O or foreign and
+					 * has no associated page struct. */
+#define _PAGE_BIT_UNUSED2	10	/* available for programmer */
 #define _PAGE_BIT_UNUSED3	11
 #define _PAGE_BIT_NX		63
 
@@ -119,8 +120,9 @@ void paging_init(void);
 #define _PAGE_DIRTY	0x040
 #define _PAGE_PSE	0x080	/* 4 MB (or 2MB) page, Pentium+, if present.. */
 #define _PAGE_GLOBAL	0x100	/* Global TLB entry PPro+ */
-#define _PAGE_UNUSED1	0x200	/* available for programmer */
-#define _PAGE_UNUSED2	0x400
+#define _PAGE_IO	0x200	/* Mapped page is I/O or foreign and has no
+				 * associated page struct. */
+#define _PAGE_UNUSED2	0x400	/* available for programmer */
 #define _PAGE_UNUSED3	0x800
 
 /* If _PAGE_PRESENT is clear, we use these: */
@@ -133,9 +135,6 @@ void paging_init(void);
 #define _PAGE_NX	0
 #endif
 
-/* Mapped page is I/O or foreign and has no associated page struct. */
-#define _PAGE_IO	0x200
-
 #define _PAGE_TABLE	(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
 #define _KERNPG_TABLE	(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
 #define _PAGE_CHG_MASK	(PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_IO)