Author: leigh123linux
Update of /cvs/nonfree/rpms/catalyst-kmod/F-17
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv15201
Modified Files:
catalyst-kmod.spec
Added Files:
3.5-do_mmap.patch
Log Message:
* Wed Aug 01 2012 Leigh Scott <leigh123linux(a)googlemail.com> - 12.6-3
- redo patch to fix module load error
3.5-do_mmap.patch:
firegl_public.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
--- NEW FILE 3.5-do_mmap.patch ---
--- lib/modules/fglrx/build_mod/firegl_public.c 2012-06-15 18:30:13.483762070 +0200
+++ lib/modules/fglrx/build_mod/firegl_public.c 2012-06-17 17:47:36.543041869 +0200
@@ -2106,6 +2106,12 @@
}
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
+# define NO_DO_MMAP
+# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f)
+# define do_munmap(a,b,c) vm_munmap(b, c)
+#endif
+
unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval(
KCL_IO_FILE_Handle file,
unsigned long addr,
@@ -2117,10 +2123,13 @@
flags = MAP_SHARED;
prot = PROT_READ|PROT_WRITE;
-
+#ifdef NO_DO_MMAP
+ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff);
+#else
down_write(¤t->mm->mmap_sem);
vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
up_write(¤t->mm->mmap_sem);
+#endif
if (IS_ERR(vaddr))
return 0;
else
@@ -2131,7 +2140,9 @@
{
int retcode = 0;
+#ifndef NO_DO_MMAP
down_write(¤t->mm->mmap_sem);
+#endif
#ifdef FGL_LINUX_RHEL_MUNMAP_API
retcode = do_munmap(current->mm,
addr,
@@ -2142,7 +2153,9 @@
addr,
len);
#endif
+#ifndef NO_DO_MMAP
up_write(¤t->mm->mmap_sem);
+#endif
return retcode;
}
Index: catalyst-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/catalyst-kmod/F-17/catalyst-kmod.spec,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- catalyst-kmod.spec 1 Aug 2012 00:08:51 -0000 1.37
+++ catalyst-kmod.spec 1 Aug 2012 10:26:41 -0000 1.38
@@ -13,7 +13,7 @@
Name: catalyst-kmod
Version: 12.6
-Release: 2%{?dist}
+Release: 3%{?dist}
# Taken over by kmodtool
Summary: AMD display driver kernel module
Group: System Environment/Kernel
@@ -23,7 +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
+Patch2: 3.5-do_mmap.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# needed for plague to make sure it builds for i686
@@ -81,7 +81,7 @@
%build
for kernel_version in %{?kernel_versions}; do
pushd _kmod_build_${kernel_version%%___*}/lib/modules/fglrx/build_mod/2.6.x
- make CC="gcc" PAGE_ATTR_FIX=0 \
+ make V=1 CC="gcc" PAGE_ATTR_FIX=0 \
KVER="${kernel_version%%___*}" \
KDIR="/usr/src/kernels/${kernel_version%%___*}"
popd
@@ -101,6 +101,9 @@
%changelog
+* Wed Aug 01 2012 Leigh Scott <leigh123linux(a)googlemail.com> - 12.6-3
+- redo patch to fix module load error
+
* Wed Aug 01 2012 Leigh Scott <leigh123linux(a)googlemail.com> - 12.6-2
- patched for 3.5 kernel