mtd/include/linux/mtd xip.h,1.3,1.4

Nicolas Pitre nico at infradead.org
Mon Oct 17 17:03:19 EDT 2005


Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv24774/include/linux/mtd

Modified Files:
	xip.h 
Log Message:
Don't let gcc inline functions marked __xipram

If they get inlined into non __xipram functions we're screwed.

Signed-off-by: Nicolas Pitre <nico at cam.org>


Index: xip.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/xip.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xip.h	11 Jul 2005 09:37:08 -0000	1.3
+++ xip.h	17 Oct 2005 21:03:16 -0000	1.4
@@ -23,19 +23,19 @@
 #ifdef CONFIG_MTD_XIP
 
 /*
- * Function that are modifying the flash state away from array mode must
- * obviously not be running from flash.  The __xipram is therefore marking
- * those functions so they get relocated to ram.
- */
-#define __xipram __attribute__ ((__section__ (".data")))
-
-/*
  * We really don't want gcc to guess anything.
  * We absolutely _need_ proper inlining.
  */
 #include <linux/compiler.h>
 
 /*
+ * Function that are modifying the flash state away from array mode must
+ * obviously not be running from flash.  The __xipram is therefore marking
+ * those functions so they get relocated to ram.
+ */
+#define __xipram noinline __attribute__ ((__section__ (".data")))
+
+/*
  * Each architecture has to provide the following macros.  They must access
  * the hardware directly and not rely on any other (XIP) functions since they
  * won't be available when used (flash not in array mode).





More information about the linux-mtd-cvs mailing list