rpms/catalyst-kmod/F-17 amd-3.5.0-missing_do_mmap.patch, NONE, 1.1 catalyst-kmod.spec, 1.36, 1.37

Leigh Scott leigh123linux at rpmfusion.org
Wed Aug 1 02:08:52 CEST 2012


Author: leigh123linux

Update of /cvs/nonfree/rpms/catalyst-kmod/F-17
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv20673

Modified Files:
	catalyst-kmod.spec 
Added Files:
	amd-3.5.0-missing_do_mmap.patch 
Log Message:
* Wed Aug 01 2012 Leigh Scott <leigh123linux at googlemail.com> - 12.6-2
- patched for 3.5 kernel


amd-3.5.0-missing_do_mmap.patch:
 firegl_public.c |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

--- NEW FILE amd-3.5.0-missing_do_mmap.patch ---
--- lib/modules/fglrx/build_mod/firegl_public.c
+++ lib/modules/fglrx/build_mod/firegl_public.c
@@ -2148,9 +2148,13 @@ unsigned long ATI_API_CALL KCL_MEM_Alloc
     flags = MAP_SHARED;
     prot  = PROT_READ|PROT_WRITE;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+    vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff);
+#else
     down_write(&current->mm->mmap_sem);
     vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
     up_write(&current->mm->mmap_sem);
+#endif
     if (IS_ERR(vaddr))
        return 0;
     else
@@ -2161,6 +2165,16 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAd
 {
     int retcode = 0;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+#ifdef FGL_LINUX_RHEL_MUNMAP_API
+    retcode = vm_munmap(addr,
+                        len,
+                        1);
+#else
+    retcode = vm_munmap(addr,
+                        len);
+#endif
+#else
     down_write(&current->mm->mmap_sem);
 #ifdef FGL_LINUX_RHEL_MUNMAP_API
     retcode = do_munmap(current->mm,
@@ -2171,8 +2185,9 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAd
     retcode = do_munmap(current->mm,
                         addr,
                         len);
-#endif                        
     up_write(&current->mm->mmap_sem);
+#endif
+#endif
     return retcode;
 }
 


Index: catalyst-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/catalyst-kmod/F-17/catalyst-kmod.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- catalyst-kmod.spec	31 Jul 2012 06:36:40 -0000	1.36
+++ catalyst-kmod.spec	1 Aug 2012 00:08:51 -0000	1.37
@@ -3,7 +3,7 @@
 # "buildforkernels newest" macro for just that build; immediately after
 # queuing that build enable the macro again for subsequent builds; that way
 # a new akmod package will only get build when a new one is actually needed
-%define buildforkernels newest
+%define buildforkernels current
 
 # Tweak to have debuginfo - part 1/2
 %if 0%{?fedora} > 7
@@ -13,7 +13,7 @@
 
 Name:        catalyst-kmod
 Version:     12.6
-Release:     1%{?dist}.4
+Release:     2%{?dist}
 # Taken over by kmodtool
 Summary:     AMD display driver kernel module
 Group:       System Environment/Kernel
@@ -23,6 +23,7 @@
 Source11:    catalyst-kmodtool-excludekernel-filterfile
 Patch0:      compat_alloc-Makefile.patch
 Patch1:      fglrx_kernel_3.4.0.patch
+Patch2:      amd-3.5.0-missing_do_mmap.patch
 BuildRoot:   %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # needed for plague to make sure it builds for i686
@@ -69,6 +70,7 @@
 pushd fglrxpkg
 %patch0 -p0 -b.compat_alloc
 %patch1 -p0 -b.fglrx_kernel_3.4.0
+%patch2 -p0 -b.amd-3.5.0-missing_do_mmap
 popd
 
 for kernel_version  in %{?kernel_versions} ; do
@@ -99,6 +101,9 @@
 
 
 %changelog
+* Wed Aug 01 2012 Leigh Scott <leigh123linux at googlemail.com> - 12.6-2
+- patched for 3.5 kernel
+
 * Tue Jul 31 2012 Nicolas Chauvet <kwizart at gmail.com> - 12.6-1.4
 - Rebuilt for updated kernel
 


More information about the rpmfusion-commits mailing list