This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linux compatibility: make page size configurable


The patch below makes the page size in the linux compatibility
package configurable. Using a larger page size can save a
substantial amount of RAM when using JFFS2 under eCos, by
allowing the file system to write larger, and hence fewer nodes.

tk


diff -ru packages-orig/compat/linux/current/ChangeLog packages/compat/linux/current/ChangeLog
--- packages-orig/compat/linux/current/ChangeLog	2003-10-24 15:44:31.000000000 +0200
+++ packages/compat/linux/current/ChangeLog	2003-11-12 19:49:37.000000000 +0100
@@ -1,3 +1,9 @@
+2003-11-12  Thomas Koeller <thomas.koeller@baslerweb.com>
+
+	* cdl/linux.cdl:
+	* include/asm/page.h:
+	Make page size configurable via cdl.
+
 2003-10-18  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/rbtree.c (rb_erase): Fix bug in red-black tree which caused
diff -ru packages-orig/compat/linux/current/cdl/linux.cdl packages/compat/linux/current/cdl/linux.cdl
--- packages-orig/compat/linux/current/cdl/linux.cdl	2003-01-22 02:10:41.000000000 +0100
+++ packages/compat/linux/current/cdl/linux.cdl	2003-11-12 19:42:31.000000000 +0100
@@ -41,7 +41,7 @@
 ######DESCRIPTIONBEGIN####
 #
 # Author(s):      dwmw2
-# Contributors:
+# Contributors:   tkoeller
 # Date:           2003-01-08
 #
 #####DESCRIPTIONEND####
@@ -59,6 +59,18 @@
 
      compile      rbtree.c
 
+    cdl_option CYGNUM_LINUX_COMPAT_PAGE_SIZE_EXPONENT {
+        display         "Define page size"
+        flavor          data
+        legal_values    10 to 16
+        default_value   12
+        no_define
+        define          PAGE_SHIFT
+        description     "
+            Define the page size. The value entered here is used as an exponent X in
+            the expression 2^^X to ensure that the page size is always an integer power
+            of two."
+    }
 }
 
 # EOF linux.cdl
diff -ru packages-orig/compat/linux/current/include/asm/page.h packages/compat/linux/current/include/asm/page.h
--- packages-orig/compat/linux/current/include/asm/page.h	2003-01-22 02:10:41.000000000 +0100
+++ packages/compat/linux/current/include/asm/page.h	2003-11-12 19:46:55.000000000 +0100
@@ -1,9 +1,10 @@
 #ifndef __ASM_PAGE_H__
 #define __ASM_PAGE_H__
 
+#include <pkgconf/linux_compat.h>
+
 /* These aren't used by much yet. If that changes, you might want
    to make them actually correct :) */
-#define PAGE_SHIFT 0xC
 #define PAGE_SIZE  (0x1 << PAGE_SHIFT)
 
 

-- 
--------------------------------------------------

Thomas Koeller, Software Development

Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany

Tel +49 (4102) 463-162
Fax +49 (4102) 463-239

mailto:thomas.koeller@baslerweb.com
http://www.baslerweb.com

==============================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]