r1748 - in trunk

dslinux_amadeus at dslinux.in-berlin.de dslinux_amadeus at dslinux.in-berlin.de
Sun Apr 29 20:41:04 CEST 2007


Author: amadeus
Date: 2007-04-29 20:40:59 +0200 (Sun, 29 Apr 2007)
New Revision: 1748

Log:
Optimisations in code size and speed.

Modified: trunk/linux-2.6.x/arch/arm/Kconfig.debug
===================================================================
--- trunk/linux-2.6.x/arch/arm/Kconfig.debug	2007-04-29 07:26:42 UTC (rev 1747)
+++ trunk/linux-2.6.x/arch/arm/Kconfig.debug	2007-04-29 18:40:59 UTC (rev 1748)
@@ -6,14 +6,14 @@
 # If you know what you are doing and are willing to live without stack
 # traces, you can get a slightly smaller kernel by setting this option to
 # n, but then RMK will have to kill you ;).
-config FRAME_POINTER
-	bool
-	default y
-	help
-	  If you say N here, the resulting kernel will be slightly smaller and
-	  faster. However, when a problem occurs with the kernel, the
-	  information that is reported is severely limited. Most people
-	  should say Y here.
+# config FRAME_POINTER
+#	bool
+#	default y
+#	help
+#	  If you say N here, the resulting kernel will be slightly smaller and
+#	  faster. However, when a problem occurs with the kernel, the
+#	  information that is reported is severely limited. Most people
+#	  should say Y here.
 
 config DEBUG_USER
 	bool "Verbose user fault messages"

Modified: trunk/linux-2.6.x/arch/arm/mach-nds/gbaram.c
===================================================================
--- trunk/linux-2.6.x/arch/arm/mach-nds/gbaram.c	2007-04-29 07:26:42 UTC (rev 1747)
+++ trunk/linux-2.6.x/arch/arm/mach-nds/gbaram.c	2007-04-29 18:40:59 UTC (rev 1748)
@@ -48,27 +48,21 @@
 /* Set the mode of Supercard CF/SD to I/O */
 static void sc_set_io(void)
 {
-	register volatile u16* p = (volatile u16*)0x09FFFFFE;
-	register u16 pattern = 0xA55A;
-	sc_save_value = *p;
-	*p = pattern;
-	*p = pattern;
-	pattern = 0x03;
-	*p = pattern;
-	*p = pattern;
+	sc_save_value = readw(0x09FFFFFE);
+	writew(0xA55A, 0x09FFFFFE);
+	writew(0xA55A, 0x09FFFFFE);
+	writew(0x0003, 0x09FFFFFE);
+	writew(0x0003, 0x09FFFFFE);
 }
 
 /* Set the mode of Supercard CF/SD to RAM */
 static void sc_set_ram(void)
 {
-	register volatile u16* p = (volatile u16*)0x09FFFFFE;
-	register u16 pattern = 0xA55A;
-	*p = pattern;
-	*p = pattern;
-	pattern = 0x05;
-	*p = pattern;
-	*p = pattern;
-	*p = sc_save_value;
+	writew(0xA55A, 0x09FFFFFE);
+	writew(0xA55A, 0x09FFFFFE);
+	writew(0x0005, 0x09FFFFFE);
+	writew(0x0005, 0x09FFFFFE);
+	writew(sc_save_value, 0x09FFFFFE);
 }
 
 //==========================================================================
@@ -80,35 +74,33 @@
 /* Set the mode of M3 CF/SD to I/O */
 static void m3_set_io(void)
 {
-	register volatile u16 dummy;
-	dummy = *(volatile u16*)0x08e00002;
-	dummy = *(volatile u16*)0x0800000e;
-	dummy = *(volatile u16*)0x08801ffc;
-	dummy = *(volatile u16*)0x0800104a;
-	dummy = *(volatile u16*)0x08800612;
-	dummy = *(volatile u16*)0x08000000;
-	dummy = *(volatile u16*)0x08801b66;
-	dummy = *(volatile u16*)0x08800006;	// mode MEDIA
-	dummy = *(volatile u16*)0x0800080e;
-	dummy = *(volatile u16*)0x08000000;
-	dummy = *(volatile u16*)0x09000000;
+	(void)readw(0x08e00002);
+	(void)readw(0x0800000e);
+	(void)readw(0x08801ffc);
+	(void)readw(0x0800104a);
+	(void)readw(0x08800612);
+	(void)readw(0x08000000);
+	(void)readw(0x08801b66);
+	(void)readw(0x08800006);	// mode MEDIA
+	(void)readw(0x0800080e);
+	(void)readw(0x08000000);
+	(void)readw(0x09000000);
 }
 
 /* Set the mode of M3 CF/SD to RAM */
 static void m3_set_ram(void)
 {
-	register volatile u16 dummy;
-	dummy = *(volatile u16*)0x08e00002;
-	dummy = *(volatile u16*)0x0800000e;
-	dummy = *(volatile u16*)0x08801ffc;
-	dummy = *(volatile u16*)0x0800104a;
-	dummy = *(volatile u16*)0x08800612;
-	dummy = *(volatile u16*)0x08000000;
-	dummy = *(volatile u16*)0x08801b66;
-	dummy = *(volatile u16*)0x0880000C;	// mode RAM (RW) 
-	dummy = *(volatile u16*)0x0800080e;
-	dummy = *(volatile u16*)0x08000000;
-	dummy = *(volatile u16*)0x09000000;
+	(void)readw(0x08e00002);
+	(void)readw(0x0800000e);
+	(void)readw(0x08801ffc);
+	(void)readw(0x0800104a);
+	(void)readw(0x08800612);
+	(void)readw(0x08000000);
+	(void)readw(0x08801b66);
+	(void)readw(0x0880000C);	// mode RAM (RW) 
+	(void)readw(0x0800080e);
+	(void)readw(0x08000000);
+	(void)readw(0x09000000);
 }
 
 //==========================================================================
@@ -120,13 +112,13 @@
 /* Set the mode of Opera Extension to I/O */
 static void op_set_io(void)
 {
-	*(volatile u16*)0x08240000 = 0;
+	writew(0, 0x08240000);
 }
 
 /* Set the mode of Opera Extension to RAM */
 static void op_set_ram(void)
 {
-	*(volatile u16*)0x08240000 = 1;
+	writew(1, 0x08240000);
 }
 
 //==========================================================================

Modified: trunk/vendors/Nintendo/DLDI/config.linux-2.6.x
===================================================================
--- trunk/vendors/Nintendo/DLDI/config.linux-2.6.x	2007-04-29 07:26:42 UTC (rev 1747)
+++ trunk/vendors/Nintendo/DLDI/config.linux-2.6.x	2007-04-29 18:40:59 UTC (rev 1748)
@@ -38,7 +38,7 @@
 # CONFIG_BUG is not set
 # CONFIG_BASE_FULL is not set
 # CONFIG_EPOLL is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
@@ -816,7 +816,7 @@
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
-CONFIG_FRAME_POINTER=y
+# CONFIG_FRAME_POINTER is not set
 # CONFIG_DEBUG_USER is not set
 
 #




More information about the dslinux-commit mailing list