]> git.pld-linux.org Git - packages/kernel.git/blame - jam-06-force-inline.patch
- moving config-* fixed.
[packages/kernel.git] / jam-06-force-inline.patch
CommitLineData
e6d11017
JR
1 Force inlining of some functions not inlined by gcc3 due to size.
2 Author: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
3
4diff -urN linux-2.5.45.orig/include/linux/compiler.h linux-2.5.45fix/include/linux/compiler.h
5--- linux-2.5.45.orig/include/linux/compiler.h Wed Oct 30 22:43:05 2002
6+++ linux-2.5.45fix/include/linux/compiler.h Sun Nov 3 15:19:20 2002
7@@ -13,4 +13,12 @@
8 #define likely(x) __builtin_expect((x),1)
9 #define unlikely(x) __builtin_expect((x),0)
10
11+/* GCC 3 (and probably earlier, I'm not sure) can be told to always inline
12+ a function. */
13+#if __GNUC__ < 3
14+#define force_inline inline
15+#else
16+#define force_inline inline __attribute__ ((always_inline))
17+#endif
18+
19 #endif /* __LINUX_COMPILER_H */
20diff -urN linux-2.5.45.orig/include/asm-i386/string.h linux-2.5.45fix/include/asm-i386/string.h
21--- linux-2.5.45.orig/include/asm-i386/string.h Wed Oct 30 22:43:46 2002
22+++ linux-2.5.45fix/include/asm-i386/string.h Sun Nov 3 15:58:08 2002
23@@ -3,6 +3,7 @@
24
25 #ifdef __KERNEL__
26 #include <linux/config.h>
27+#include <linux/compiler.h>
28 /*
29 * On a 486 or Pentium, we are better off not using the
30 * byte string operations. But on a 386 or a PPro the
31@@ -218,7 +219,7 @@
32 * This looks horribly ugly, but the compiler can optimize it totally,
33 * as the count is constant.
34 */
35-static inline void * __constant_memcpy(void * to, const void * from, size_t n)
36+static force_inline void * __constant_memcpy(void * to, const void * from, size_t n)
37 {
38 switch (n) {
39 case 0:
40@@ -453,7 +454,7 @@
41 * This looks horribly ugly, but the compiler can optimize it totally,
42 * as we by now know that both pattern and count is constant..
43 */
44-static inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
45+static force_inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
46 {
47 switch (count) {
48 case 0:
49--- linux/include/asm-i386/uaccess.h.orig 2002-11-13 01:27:42.000000000 +0100
50+++ linux/include/asm-i386/uaccess.h 2002-11-13 01:30:04.000000000 +0100
51@@ -543,7 +543,7 @@
52 unsigned long __generic_copy_to_user(void *, const void *, unsigned long);
53 unsigned long __generic_copy_from_user(void *, const void *, unsigned long);
54
55-static inline unsigned long
56+static force_inline unsigned long
57 __constant_copy_to_user(void *to, const void *from, unsigned long n)
58 {
59 prefetch(from);
60@@ -552,7 +552,7 @@
61 return n;
62 }
63
64-static inline unsigned long
65+static force_inline unsigned long
66 __constant_copy_from_user(void *to, const void *from, unsigned long n)
67 {
68 if (access_ok(VERIFY_READ, from, n))
69@@ -562,14 +562,14 @@
70 return n;
71 }
72
73-static inline unsigned long
74+static force_inline unsigned long
75 __constant_copy_to_user_nocheck(void *to, const void *from, unsigned long n)
76 {
77 __constant_copy_user(to,from,n);
78 return n;
79 }
80
81-static inline unsigned long
82+static force_inline unsigned long
83 __constant_copy_from_user_nocheck(void *to, const void *from, unsigned long n)
84 {
85 __constant_copy_user_zeroing(to,from,n);
This page took 0.100509 seconds and 4 git commands to generate.