source:
pkg/frankie/non-free/fglrx-driver/trunk/debian/patches/05_fix_cmpxchg.diff
@
6577
| Revision 6577, 8.8 KB checked in by alanbach-guest, 3 years ago (diff) |
|---|
-
common/lib/modules/fglrx/build_mod/drmP.h
# Fix broken usage of internal macro; fixes compiling with 2.6.33 diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/drmP.h fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/drmP.h
old new 42 42 * can build the DRM (part of PI DRI). 4/21/2000 S + B */ 43 43 #include <asm/current.h> 44 44 #endif /* __alpha__ */ 45 #include <linux/version.h> 46 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 47 #include <generated/autoconf.h> 48 #else 45 49 #include <linux/autoconf.h> 50 #endif 46 51 #include <linux/module.h> 47 52 #include <linux/kernel.h> 48 53 #include <linux/miscdevice.h> … … 51 56 #include <linux/init.h> 52 57 #include <linux/file.h> 53 58 #include <linux/pci.h> 54 #include <linux/version.h>55 59 #include <linux/sched.h> 56 60 #include <linux/smp_lock.h> /* For (un)lock_kernel */ 57 61 #include <linux/mm.h> -
common/lib/modules/fglrx/build_mod/firegl_public.c
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/firegl_public.c
old new 28 28 #error Kernel versions older than 2.6.0 are no longer supported by this module. 29 29 #endif 30 30 31 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 32 #include <generated/autoconf.h> 33 #else 31 34 #include <linux/autoconf.h> 35 #endif 32 36 33 37 #if !defined(CONFIG_X86) 34 38 #if !defined(CONFIG_X86_PC) … … 165 169 166 170 // For 2.6.18 or higher, the UTS_RELEASE is defined in the linux/utsrelease.h. 167 171 #ifndef UTS_RELEASE 172 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 173 #include <generated/utsrelease.h> 174 #else 168 175 #include <linux/utsrelease.h> 169 176 #endif 177 #endif 170 178 171 179 #if defined(__i386__) 172 180 #ifndef do_div … … 1472 1480 #ifndef __HAVE_ARCH_CMPXCHG 1473 1481 return __fgl_cmpxchg(ptr,old,new,size); 1474 1482 #else 1475 return __cmpxchg(ptr,old,new,size); 1483 switch (size) { 1484 case 1: { volatile u8 *_ptr = ptr; return cmpxchg(_ptr, old, new); } 1485 case 2: { volatile u16 *_ptr = ptr; return cmpxchg(_ptr, old, new); } 1486 case 4: { volatile u32 *_ptr = ptr; return cmpxchg(_ptr, old, new); } 1487 #ifdef __x86_64__ 1488 case 8: { volatile u64 *_ptr = ptr; return cmpxchg(_ptr, old, new); } 1489 #endif 1490 default: 1491 return old; 1492 } 1476 1493 #endif 1477 1494 } 1478 1495 -
common/lib/modules/fglrx/build_mod/kcl_acpi.c
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/kcl_acpi.c fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/kcl_acpi.c
old new 15 15 ****************************************************************************/ 16 16 17 17 #include <linux/version.h> 18 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 19 #include <generated/autoconf.h> 20 #else 18 21 #include <linux/autoconf.h> 22 #endif 19 23 #include <linux/acpi.h> 20 24 #include <linux/pci.h> 21 25 -
common/lib/modules/fglrx/build_mod/kcl_agp.c
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/kcl_agp.c fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/kcl_agp.c
old new 31 31 */ 32 32 33 33 #include <linux/version.h> 34 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 35 #include <generated/autoconf.h> 36 #else 34 37 #include <linux/autoconf.h> 38 #endif 35 39 #include <linux/pci.h> 36 40 #include <linux/agp_backend.h> 37 41 #include <linux/string.h> -
common/lib/modules/fglrx/build_mod/kcl_io.c
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/kcl_io.c fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/kcl_io.c
old new 37 37 */ 38 38 39 39 #include <linux/version.h> 40 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 41 #include <generated/autoconf.h> 42 #else 40 43 #include <linux/autoconf.h> 44 #endif 41 45 #include <linux/poll.h> 42 46 #include <linux/signal.h> 43 47 #include <asm/io.h> -
common/lib/modules/fglrx/build_mod/kcl_osconfig.h
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/kcl_osconfig.h fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/kcl_osconfig.h
old new 20 20 #define KCL_OSCONFIG_H 21 21 22 22 #include <linux/version.h> 23 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 24 #include <generated/autoconf.h> 25 #else 23 26 #include <linux/autoconf.h> 27 #endif 24 28 25 29 // Choose modern way to call 32-on-64 IOCTLs if configured in the kernel 26 30 #if defined(CONFIG_COMPAT) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) -
common/lib/modules/fglrx/build_mod/kcl_pci.c
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/kcl_pci.c fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/kcl_pci.c
old new 31 31 */ 32 32 33 33 #include <linux/version.h> 34 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 35 #include <generated/autoconf.h> 36 #else 34 37 #include <linux/autoconf.h> 38 #endif 35 39 #include <linux/pci.h> 36 40 37 41 #include "kcl_config.h" -
common/lib/modules/fglrx/build_mod/kcl_str.c
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/kcl_str.c fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/kcl_str.c
old new 30 30 * 31 31 */ 32 32 33 #include <linux/version.h> 34 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 35 #include <generated/autoconf.h> 36 #else 33 37 #include <linux/autoconf.h> 38 #endif 34 39 #include <linux/string.h> 35 40 #include <linux/module.h> 36 41 -
common/lib/modules/fglrx/build_mod/kcl_wait.c
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/kcl_wait.c fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/kcl_wait.c
old new 31 31 */ 32 32 33 33 #include <linux/version.h> 34 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 35 #include <generated/autoconf.h> 36 #else 34 37 #include <linux/autoconf.h> 38 #endif 35 39 #include <linux/wait.h> 36 40 #include <linux/highmem.h> 37 41 #include <linux/sched.h> -
common/lib/modules/fglrx/build_mod/make.sh
diff -Naur fglrx-driver-10-4.orig//common/lib/modules/fglrx/build_mod/make.sh fglrx-driver-10-4/common/lib/modules/fglrx/build_mod/make.sh
old new 218 218 # UTS-define is in external version-*.h files, i.e. linux-2.2.14-5.0-RedHat does this flaw 219 219 kernel_release=`cat $linuxincludes/linux/version-*.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` 220 220 else 221 # For 2.6.18 or higher, UTS-define is defined in utsrelease.h. 222 kernel_release=`cat $linuxincludes/linux/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` 221 UTS_REL_COUNT=`cat $linuxincludes/generated/utsrelease.h 2>/dev/null | grep UTS_RELEASE -c` 222 223 if [ $UTS_REL_COUNT -gt 0 ]; then 224 # 2.6.33+ 225 kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` 226 else 227 # For 2.6.18 to 2.6.32, UTS-define is defined in utsrelease.h. 228 kernel_release=`cat $linuxincludes/linux/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` 229 fi 223 230 fi 224 231 fi 225 232 fi … … 302 309 # 3 303 310 # linux/autoconf.h may contain this: #define CONFIG_SMP 1 304 311 305 src_file=$linuxincludes/linux/autoconf.h 312 src_file=$linuxincludes/generated/autoconf.h 313 [ -e $src_file ] || src_file=$linuxincludes/linux/autoconf.h 306 314 307 315 if [ ! -e $src_file ]; then 308 316 echo "Warning:" >> $logfile … … 355 363 MODVERSIONS=0 356 364 357 365 # linux/autoconf.h may contain this: #define CONFIG_MODVERSIONS 1 358 src_file=$linuxincludes/linux/autoconf.h 366 src_file=$linuxincludes/generated/autoconf.h 367 [ -e $src_file ] || src_file=$linuxincludes/linux/autoconf.h 359 368 if [ ! -e $src_file ]; 360 369 then 361 370 echo "Warning:" >> $logfile
Note: See TracBrowser
for help on using the repository browser.


