wok-next view catalyst/stuff/catalyst-2.6.33.4.patch @ rev 7047

Add othello
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 01 10:53:10 2010 +0100 (2010-11-01)
parents
children
line source
1 Index: ati10.1/common/lib/modules/fglrx/build_mod/drmP.h
2 ===================================================================
3 --- ati10.1/common/lib/modules/fglrx/build_mod/drmP.h
4 +++ ati10.1/common/lib/modules/fglrx/build_mod/drmP.h 2010-01-28 19:57:07.562644291 +0200
5 @@ -42,7 +42,12 @@
6 * can build the DRM (part of PI DRI). 4/21/2000 S + B */
7 #include <asm/current.h>
8 #endif /* __alpha__ */
9 +#include <linux/version.h>
10 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
11 +#include <generated/autoconf.h>
12 +#else
13 #include <generated/autoconf.h>
14 +#endif
15 #include <linux/module.h>
16 #include <linux/kernel.h>
17 #include <linux/miscdevice.h>
18 @@ -51,7 +56,6 @@
19 #include <linux/init.h>
20 #include <linux/file.h>
21 #include <linux/pci.h>
22 -#include <linux/version.h>
23 #include <linux/sched.h>
24 #include <linux/smp_lock.h> /* For (un)lock_kernel */
25 #include <linux/mm.h>
26 Index: ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c
27 ===================================================================
28 --- ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c
29 +++ ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-01-29 14:21:58.687999115 +0200
30 @@ -28,7 +28,11 @@
31 #error Kernel versions older than 2.6.0 are no longer supported by this module.
32 #endif
34 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
35 +#include <generated/autoconf.h>
36 +#else
37 #include <generated/autoconf.h>
38 +#endif
40 #if !defined(CONFIG_X86)
41 #if !defined(CONFIG_X86_PC)
42 @@ -163,8 +167,12 @@
44 // For 2.6.18 or higher, the UTS_RELEASE is defined in the generated/utsrelease.h.
45 #ifndef UTS_RELEASE
46 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
47 +#include <generated/utsrelease.h>
48 +#else
49 #include <generated/utsrelease.h>
50 #endif
51 +#endif
53 #if defined(__i386__)
54 #ifndef do_div
55 @@ -1472,7 +1472,16 @@
56 #ifndef __HAVE_ARCH_CMPXCHG
57 return __fgl_cmpxchg(ptr,old,new,size);
58 #else
59 - return __cmpxchg(ptr,old,new,size);
60 + switch (size) {
61 + case 1: { volatile u8 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
62 + case 2: { volatile u16 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
63 + case 4: { volatile u32 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
64 +#ifdef __x86_64__
65 + case 8: { volatile u64 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
66 +#endif
67 + default:
68 + return old;
69 + }
70 #endif
71 }
74 Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c
75 ===================================================================
76 --- ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c
77 +++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2010-01-28 19:57:17.897225045 +0200
78 @@ -15,7 +15,11 @@
79 ****************************************************************************/
81 #include <linux/version.h>
82 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
83 +#include <generated/autoconf.h>
84 +#else
85 #include <generated/autoconf.h>
86 +#endif
87 #include <linux/acpi.h>
89 #include "kcl_config.h"
90 Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c
91 ===================================================================
92 --- ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c
93 +++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c 2010-01-28 19:57:26.104892082 +0200
94 @@ -31,7 +31,11 @@
95 */
97 #include <linux/version.h>
98 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
99 +#include <generated/autoconf.h>
100 +#else
101 #include <generated/autoconf.h>
102 +#endif
103 #include <linux/pci.h>
104 #include <linux/agp_backend.h>
105 #include <linux/string.h>
106 Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c
107 ===================================================================
108 --- ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c
109 +++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c 2010-01-28 19:57:34.337558105 +0200
110 @@ -37,7 +37,11 @@
111 */
113 #include <linux/version.h>
114 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
115 +#include <generated/autoconf.h>
116 +#else
117 #include <generated/autoconf.h>
118 +#endif
119 #include <linux/poll.h>
120 #include <linux/signal.h>
121 #include <asm/io.h>
122 Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h
123 ===================================================================
124 --- ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h
125 +++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h 2010-01-28 19:57:43.599182385 +0200
126 @@ -20,7 +20,11 @@
127 #define KCL_OSCONFIG_H
129 #include <linux/version.h>
130 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
131 +#include <generated/autoconf.h>
132 +#else
133 #include <generated/autoconf.h>
134 +#endif
136 // Choose modern way to call 32-on-64 IOCTLs if configured in the kernel
137 #if defined(CONFIG_COMPAT) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
138 Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c
139 ===================================================================
140 --- ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c
141 +++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c 2010-01-28 19:57:51.295870149 +0200
142 @@ -31,7 +31,11 @@
143 */
145 #include <linux/version.h>
146 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
147 +#include <generated/autoconf.h>
148 +#else
149 #include <generated/autoconf.h>
150 +#endif
151 #include <linux/pci.h>
153 #include "kcl_config.h"
154 Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c
155 ===================================================================
156 --- ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c
157 +++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c 2010-01-28 19:57:59.728528058 +0200
158 @@ -30,7 +30,12 @@
159 *
160 */
162 +#include <linux/version.h>
163 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
164 +#include <generated/autoconf.h>
165 +#else
166 #include <generated/autoconf.h>
167 +#endif
168 #include <linux/string.h>
169 #include <linux/module.h>
171 Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c
172 ===================================================================
173 --- ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c
174 +++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-01-28 19:58:08.936154527 +0200
175 @@ -31,7 +31,11 @@
176 */
178 #include <linux/version.h>
179 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
180 +#include <generated/autoconf.h>
181 +#else
182 #include <generated/autoconf.h>
183 +#endif
184 #include <linux/wait.h>
185 #include <linux/highmem.h>
186 #include <linux/sched.h>
187 Index: ati10.1/common/lib/modules/fglrx/build_mod/make.sh
188 ===================================================================
189 --- ati10.1/common/lib/modules/fglrx/build_mod/make.sh
190 +++ ati10.1/common/lib/modules/fglrx/build_mod/make.sh 2010-01-28 19:55:10.849378991 +0200
191 @@ -218,8 +218,15 @@
192 # UTS-define is in external version-*.h files, i.e. linux-2.2.14-5.0-RedHat does this flaw
193 kernel_release=`cat $linuxincludes/linux/version-*.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2`
194 else
195 - # For 2.6.18 or higher, UTS-define is defined in utsrelease.h.
196 - kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2`
197 + UTS_REL_COUNT=`cat $linuxincludes/generated/utsrelease.h 2>/dev/null | grep UTS_RELEASE -c`
198 +
199 + if [ $UTS_REL_COUNT -gt 0 ]; then
200 + # 2.6.33+
201 + kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2`
202 + else
203 + # For 2.6.18 to 2.6.32, UTS-define is defined in utsrelease.h.
204 + kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2`
205 + fi
206 fi
207 fi
208 fi
209 @@ -302,7 +309,8 @@
210 # 3
211 # generated/autoconf.h may contain this: #define CONFIG_SMP 1
213 -src_file=$linuxincludes/generated/autoconf.h
214 +src_file=$linuxincludes/generated/autoconf.h
215 +[ -e $src_file ] || src_file=$linuxincludes/generated/autoconf.h
217 if [ ! -e $src_file ]; then
218 echo "Warning:" >> $logfile
219 @@ -355,7 +363,8 @@
220 MODVERSIONS=0
222 # generated/autoconf.h may contain this: #define CONFIG_MODVERSIONS 1
223 -src_file=$linuxincludes/generated/autoconf.h
224 +src_file=$linuxincludes/generated/autoconf.h
225 +[ -e $src_file ] || src_file=$linuxincludes/generated/autoconf.h
226 if [ ! -e $src_file ];
227 then
228 echo "Warning:" >> $logfile