Re: PageSkip

From: Russell King (rmk@arm.linux.org.uk)
Date: Sun Aug 13 2000 - 10:49:08 EST


David S. Miller writes:
> It should die just about everywhere, there should be no use for it
> anymore for any port.
>
> it only existed to handle generic parts of the kernel which wished to
> walk the mem_map[] array by hand, there is no such code any more
> thanks to various cleanups by Kanoj and others. Ergo PageSkip and
> PG_skip can both be just eradicated along with any code referencing
> it. Unless, you are using it for some strange purpose inside your
> ports, and I bet even those cases can be easily removed.

Ok, here is a patch which "mostly" kills it off. Its still left in
the mips64 architecture directory since they have to fix it
themselves. The ARM stuff has gone separately to Linus.

Otherwise, all traces of it have been removed. Could people test
this patch, and report back if its OK? Thanks.

Note that s390 and sh do not appear to have maintainers listed
in either the credits or maintainers files, so they're not
explicitly sent this. If someone knows where they are, could
they forward this please?

diff -urN linux-orig/arch/mips64/sgi-ip27/ip27-memory.c linux/arch/mips64/sgi-ip27/ip27-memory.c
--- linux-orig/arch/mips64/sgi-ip27/ip27-memory.c Thu Aug 10 20:45:49 2000
+++ linux/arch/mips64/sgi-ip27/ip27-memory.c Sun Aug 13 10:19:49 2000
@@ -32,6 +32,12 @@
 #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
 #define SLOT_IGNORED 0xffff
 
+/* FIXME:
+ * PG_skip is used on sparc/sparc64 architectures to "skip" certain
+ * parts of the address space.
+ */
+#define PG_skip 10
+
 short slot_lastfilled_cache[MAX_COMPACT_NODES];
 unsigned short slot_psize_cache[MAX_COMPACT_NODES][MAX_MEM_SLOTS];
 static pfn_t numpages;
@@ -250,6 +256,9 @@
                                         PLAT_NODE_DATA_SIZE(node);
         }
 }
+
+/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
+#define PageSkip(page) test_bit(PG_skip, &(page)->flags)
 
 void __init mem_init(void)
 {
diff -urN linux-orig/include/asm-alpha/pgtable.h linux/include/asm-alpha/pgtable.h
--- linux-orig/include/asm-alpha/pgtable.h Thu Aug 10 20:46:32 2000
+++ linux/include/asm-alpha/pgtable.h Sun Aug 13 10:07:49 2000
@@ -304,7 +304,6 @@
 #define module_unmap vfree
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) (0)
 #define kern_addr_valid(addr) (1)
 
 #define io_remap_page_range(start, busaddr, size, prot) \
diff -urN linux-orig/include/asm-i386/pgtable.h linux/include/asm-i386/pgtable.h
--- linux-orig/include/asm-i386/pgtable.h Thu Aug 10 20:46:32 2000
+++ linux/include/asm-i386/pgtable.h Sun Aug 13 10:07:49 2000
@@ -333,7 +333,6 @@
 #endif /* !__ASSEMBLY__ */
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) (0)
 #define kern_addr_valid(addr) (1)
 
 #define io_remap_page_range remap_page_range
diff -urN linux-orig/include/asm-ia64/pgtable.h linux/include/asm-ia64/pgtable.h
--- linux-orig/include/asm-ia64/pgtable.h Thu Aug 10 20:46:32 2000
+++ linux/include/asm-ia64/pgtable.h Sun Aug 13 10:07:49 2000
@@ -402,9 +402,6 @@
 #define module_map vmalloc
 #define module_unmap vfree
 
-/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) (0)
-
 #define io_remap_page_range remap_page_range /* XXX is this right? */
 
 /*
diff -urN linux-orig/include/asm-m68k/pgtable.h linux/include/asm-m68k/pgtable.h
--- linux-orig/include/asm-m68k/pgtable.h Thu Aug 10 20:46:32 2000
+++ linux/include/asm-m68k/pgtable.h Sun Aug 13 10:07:49 2000
@@ -394,7 +394,6 @@
 #define module_unmap vfree
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) (0)
 #define kern_addr_valid(addr) (1)
 
 #define io_remap_page_range remap_page_range
diff -urN linux-orig/include/asm-mips/pgtable.h linux/include/asm-mips/pgtable.h
--- linux-orig/include/asm-mips/pgtable.h Thu Aug 10 20:46:33 2000
+++ linux/include/asm-mips/pgtable.h Sun Aug 13 10:07:49 2000
@@ -456,7 +456,6 @@
 #define module_unmap vfree
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) (0)
 #define kern_addr_valid(addr) (1)
 
 /* TLB operations. */
diff -urN linux-orig/include/asm-mips64/pgtable.h linux/include/asm-mips64/pgtable.h
--- linux-orig/include/asm-mips64/pgtable.h Thu Aug 10 20:46:33 2000
+++ linux/include/asm-mips64/pgtable.h Sun Aug 13 10:06:01 2000
@@ -528,8 +528,6 @@
 #define module_map vmalloc
 #define module_unmap vfree
 
-/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) test_bit(PG_skip, &(page)->flags)
 #ifndef CONFIG_DISCONTIGMEM
 #define kern_addr_valid(addr) (1)
 #endif
diff -urN linux-orig/include/asm-ppc/pgtable.h linux/include/asm-ppc/pgtable.h
--- linux-orig/include/asm-ppc/pgtable.h Thu Aug 10 20:46:33 2000
+++ linux/include/asm-ppc/pgtable.h Sun Aug 13 10:07:49 2000
@@ -483,7 +483,6 @@
                                  unsigned int cmode);
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) (0)
 #define kern_addr_valid(addr) (1)
 
 #define io_remap_page_range remap_page_range
diff -urN linux-orig/include/asm-s390/pgtable.h linux/include/asm-s390/pgtable.h
--- linux-orig/include/asm-s390/pgtable.h Thu Aug 10 20:46:34 2000
+++ linux/include/asm-s390/pgtable.h Sun Aug 13 10:07:49 2000
@@ -411,7 +411,6 @@
 #endif /* !__ASSEMBLY__ */
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) (0)
 #define kern_addr_valid(addr) (1)
 
 #endif /* _S390_PAGE_H */
diff -urN linux-orig/include/asm-sh/pgtable.h linux/include/asm-sh/pgtable.h
--- linux-orig/include/asm-sh/pgtable.h Thu Aug 10 20:46:35 2000
+++ linux/include/asm-sh/pgtable.h Sun Aug 13 10:07:49 2000
@@ -256,7 +256,6 @@
 #endif /* !__ASSEMBLY__ */
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page) (0)
 #define kern_addr_valid(addr) (1)
 
 #define io_remap_page_range remap_page_range
diff -urN linux-orig/include/linux/mm.h linux/include/linux/mm.h
--- linux-orig/include/linux/mm.h Thu Aug 10 20:46:37 2000
+++ linux/include/linux/mm.h Sun Aug 13 10:19:03 2000
@@ -172,7 +172,7 @@
 #define PG__unused_02 7
 #define PG_slab 8
 #define PG_swap_cache 9
-#define PG_skip 10
+#define PG_unused_04 10
 #define PG_unused_03 11
 #define PG_highmem 12
                                 /* bits 21-30 unused */
@@ -295,9 +295,6 @@
  * For choosing which pages to swap out, inode pages carry a
  * PG_referenced bit, which is set any time the system accesses
  * that page through the (inode,offset) hash table.
- *
- * PG_skip is used on sparc/sparc64 architectures to "skip" certain
- * parts of the address space.
  *
  * PG_error is set to indicate that an I/O error occurred on this page.
  */

   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:30 EST