]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/nslu2-linksys-kernel-2.4.22/gcc-registerparanoia.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / nslu2-linksys-kernel-2.4.22 / gcc-registerparanoia.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- linux-2.4.22/include/asm-arm/system.h~gcc-registerparanoia  2004-09-08 19:45:34.000000000 -0500
7 +++ linux-2.4.22/include/asm-arm/system.h       2004-09-08 19:53:01.000000000 -0500
8 @@ -3,6 +3,15 @@
9  
10  #ifdef __KERNEL__
11  
12 +/*
13 + * This is used to ensure the compiler did actually allocate the register we
14 + * asked it for some inline assembly sequences.  Apparently we can't trust
15 + * the compiler from one version to another so a bit of paranoia won't hurt.
16 + * This string is meant to be concatenated with the inline asm string and
17 + * will cause compilation to stop on mismatch.
18 + */
19 +#define __asmeq(x, y)  ".ifnc " x "," y " ; .err ; .endif\n\t"
20 +
21  #include <linux/config.h>
22  #include <linux/kernel.h>
23  
24 --- linux-2.4.22/include/asm-arm/uaccess.h~gcc-registerparanoia 2004-09-08 19:45:34.000000000 -0500
25 +++ linux-2.4.22/include/asm-arm/uaccess.h      2004-09-08 19:59:20.000000000 -0500
26 @@ -6,6 +6,7 @@
27   */
28  #include <linux/sched.h>
29  #include <asm/errno.h>
30 +#include <asm/system.h>
31  
32  #define VERIFY_READ 0
33  #define VERIFY_WRITE 1
34 @@ -71,7 +72,9 @@
35  extern int __get_user_bad(void);
36  
37  #define __get_user_x(__r1,__p,__e,__s,__i...)                          \
38 -          __asm__ __volatile__ ("bl    __get_user_" #__s               \
39 +          __asm__ __volatile__ (                                       \
40 +               __asmeq("%0", "r0") __asmeq("%1", "r1")                 \
41 +               "bl     __get_user_" #__s                               \
42                 : "=&r" (__e), "=r" (__r1)                              \
43                 : "0" (__p)                                             \
44                 : __i)
45 @@ -110,7 +113,9 @@
46  extern int __put_user_bad(void);
47  
48  #define __put_user_x(__r1,__p,__e,__s,__i...)                          \
49 -          __asm__ __volatile__ ("bl    __put_user_" #__s               \
50 +          __asm__ __volatile__ (                                       \
51 +               __asmeq("%0", "r0") __asmeq("%2", "r1")                 \
52 +               "bl     __put_user_" #__s                               \
53                 : "=&r" (__e)                                           \
54                 : "0" (__p), "r" (__r1)                                 \
55                 : __i)
56 --- linux-2.4.22/-~gcc-registerparanoia
57 +++ linux-2.4.22/-