[packages/xorg-driver-video-fglrx-legacy-12.x] - fix building with linux kernel 3.7 - rel 20
baggins
baggins at pld-linux.org
Thu Dec 20 13:06:26 CET 2012
commit 20e35691e564a4befc945e6ecfdbdfbfe8ae8c6e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Dec 20 13:06:13 2012 +0100
- fix building with linux kernel 3.7
- rel 20
linux-3.7.patch | 132 +++++++++++++++++++++++++++++++
xorg-driver-video-fglrx-legacy-12.x.spec | 4 +-
2 files changed, 135 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-fglrx-legacy-12.x.spec b/xorg-driver-video-fglrx-legacy-12.x.spec
index b375888..f7ce929 100644
--- a/xorg-driver-video-fglrx-legacy-12.x.spec
+++ b/xorg-driver-video-fglrx-legacy-12.x.spec
@@ -28,7 +28,7 @@
%define arch_dir x86_64
%endif
-%define rel 19
+%define rel 20
%define pname xorg-driver-video-fglrx-legacy-12.x
Summary: Linux Drivers for AMD graphics accelerators
Summary(pl.UTF-8): Sterowniki do akceleratorów graficznych AMD
@@ -54,6 +54,7 @@ Patch4: xorg-driver-video-fglrx-nofinger.patch
Patch5: xorg-driver-video-fglrx-GPL-only.patch
Patch6: xorg-driver-video-fglrx-kernel-fpu.patch
Patch7: linux-3.5.0-missing_do_mmap.patch
+Patch8: linux-3.7.patch
URL: http://ati.amd.com/support/drivers/linux/linux-radeon.html
%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
BuildRequires: rpmbuild(macros) >= 1.379
@@ -200,6 +201,7 @@ cp -p arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/bu
%patch5 -p1
%patch6 -p0
%patch7 -p1
+%patch8 -p1
install -d common{%{_prefix}/{%{_lib},bin,sbin},/etc}
cp -a %{x11ver}%{arch_sufix}/usr/X11R6/%{_lib}/* common%{_libdir}
diff --git a/linux-3.7.patch b/linux-3.7.patch
new file mode 100644
index 0000000..47cd425
--- /dev/null
+++ b/linux-3.7.patch
@@ -0,0 +1,132 @@
+--- 12.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-09-26 15:04:28.000000000 +0200
++++ 12.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-10-16 20:30:42.146523753 +0200
+@@ -3892,7 +3892,11 @@
+ KCL_DEBUG_ERROR(REMAP_PAGE_RANGE_STR " failed\n");
+ return -EAGAIN;
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */
++#else
++ vma->vm_flags |= VM_SHM | VM_DONTEXPAND | VM_DONTDUMP; /* Don't swap */
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ vma->vm_ops = &vm_ops;
+ break;
+
+@@ -3922,14 +3926,22 @@
+ KCL_DEBUG_ERROR(REMAP_PAGE_RANGE_STR " failed\n");
+ return -EAGAIN;
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */
++#else
++ vma->vm_flags |= VM_SHM | VM_DONTEXPAND | VM_DONTDUMP; /* Don't swap */
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ vma->vm_ops = &vm_ops;
+ }
+ break;
+ #endif
+
+ case __KE_SHM:
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */
++#else
++ vma->vm_flags |= VM_SHM | VM_DONTEXPAND | VM_DONTDUMP; /* Don't swap */
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ vma->vm_ops = &vm_shm_ops;
+ break;
+
+@@ -3937,7 +3949,11 @@
+
+ pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_RESERVED;
++#else
++ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+
+ //vma->vm_flags |= VM_SHM | VM_LOCKED; /* DDDDDDDDDDon't swap */
+ //vma->vm_mm->locked_vm += pages; /* Kernel tracks aqmount of locked pages */
+@@ -3946,14 +3962,22 @@
+
+ case __KE_CTX:
+ pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_LOCKED | VM_SHM | VM_RESERVED; /* Don't swap */
++#else
++ vma->vm_flags |= VM_LOCKED | VM_SHM | VM_DONTEXPAND | VM_DONTDUMP; /* Don't swap */
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ vma->vm_mm->locked_vm += pages; /* Kernel tracks aqmount of locked pages */
+ vma->vm_ops = &vm_ctx_ops;
+ break;
+
+ case __KE_PCI_BQS:
+ pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_LOCKED | VM_SHM | VM_RESERVED; /* Don't swap */
++#else
++ vma->vm_flags |= VM_LOCKED | VM_SHM | VM_DONTEXPAND | VM_DONTDUMP; /* Don't swap */
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ vma->vm_mm->locked_vm += pages; /* Kernel tracks aqmount of locked pages */
+ vma->vm_ops = &vm_pci_bq_ops;
+ break;
+@@ -3984,9 +4008,17 @@
+ return -EAGAIN;
+ }
+ #ifdef __x86_64__
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_RESERVED;
+ #else
++ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
++#else
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */
++#else
++ vma->vm_flags |= VM_SHM | VM_DONTEXPAND | VM_DONTDUMP; /* Don't swap */
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ #endif
+ vma->vm_ops = &vm_ops;
+ }
+@@ -4015,9 +4047,17 @@
+ return -EAGAIN;
+ }
+ #ifdef __x86_64__
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_RESERVED;
+ #else
++ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
++#else
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */
++#else
++ vma->vm_flags |= VM_SHM | VM_DONTEXPAND | VM_DONTDUMP; /* Don't swap */
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ #endif
+ vma->vm_ops = &vm_agp_bq_ops;
+ }
+@@ -4025,7 +4065,11 @@
+ #endif /* __AGP__BUILTIN__ */
+
+ case __KE_KMAP:
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_SHM | VM_RESERVED;
++#else
++ vma->vm_flags |= VM_SHM | VM_DONTEXPAND | VM_DONTDUMP;
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ vma->vm_ops = &vm_kmap_ops;
+ if (readonly && (vma->vm_flags & VM_WRITE))
+ {
+@@ -4046,7 +4090,11 @@
+ #endif
+ // fall through
+ case __KE_GART_CACHEABLE:
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= VM_RESERVED;
++#else
++ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
+ vma->vm_ops = &vm_gart_ops;
+ break;
+ default:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-fglrx-legacy-12.x.git/commitdiff/20e35691e564a4befc945e6ecfdbdfbfe8ae8c6e
More information about the pld-cvs-commit
mailing list