[patch 1/7] Make __always_inline actually force always inlining

Arjan van de Ven
2006-01-06T10:45:24Z

From: Ingo Molnar <mingo@elte.he>

This patch is the first in a series that tries to optimize the kernel in terms of size
(and thus cache behavior, both cpu and pagecache).

This first patch changes __always_inline to be a forced inline instead of
the "regular" inline it was on everything except alpha. This forced inline
matches the intention of the define better as a matter of documentation.
There is no change in behavior by this patch, since "inline" currently is
mapped to a forced inline anyway.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>

===================================================================
--- linux-2.6.15.orig/include/linux/compiler-gcc3.h
+++ linux-2.6.15/include/linux/compiler-gcc3.h
@@ -9,6 +9,8 @@
# define __inline __inline __attribute__((always_inline))
#endif

+#define __always_inline inline __attribute__((always_inline))
+
#if __GNUC_MINOR__ > 0
# define __deprecated __attribute__((deprecated))
#endif
Index: linux-2.6.15/include/linux/compiler-gcc4.h
===================================================================
--- linux-2.6.15.orig/include/linux/compiler-gcc4.h
+++ linux-2.6.15/include/linux/compiler-gcc4.h
@@ -6,6 +6,7 @@
#define inline inline __attribute__((always_inline))
#define __inline__ __inline__ __attribute__((always_inline))
#define __inline __inline __attribute__((always_inline))
+#define __always_inline inline __attribute__((always_inline))
#define __deprecated __attribute__((deprecated))
#define __attribute_used__ __attribute__((__used__))
#define __attribute_pure__ __attribute__((pure))