Author: leigh123linux
Update of /cvs/nonfree/rpms/catalyst-legacy-kmod/F-18
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv934
Modified Files:
.cvsignore sources
Added Files:
3.5-do_mmap.patch 3.7_kernel.patch
catalyst-kmodtool-excludekernel-filterfile
catalyst-legacy-kmod.spec compat_alloc-Makefile.patch
Log Message:
* Mon Feb 04 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 13.1-1
- Update to Catalyst legacy (internal version 13.1 8.97.100.7)
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;
}
3.7_kernel.patch:
firegl_public.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
--- NEW FILE 3.7_kernel.patch ---
--- lib/modules/fglrx/build_mod/firegl_public.c
+++ lib/modules/fglrx/build_mod/firegl_public.c
@@ -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:
--- NEW FILE catalyst-kmodtool-excludekernel-filterfile ---
--- NEW FILE catalyst-legacy-kmod.spec ---
# buildforkernels macro hint: when you build a new version or a new release
# that contains bugfixes or other improvements then you must disable the
# "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 current
# Tweak to have debuginfo - part 1/2
%if 0%{?fedora} > 7
%define __debug_install_post %{_builddir}/%{?buildsubdir}/find-debuginfo.sh
%{_builddir}/%{?buildsubdir}\
%{nil}
%endif
Name: catalyst-legacy-kmod
Version: 13.1
Release: 1%{?dist}
# Taken over by kmodtool
Summary: AMD display legacy driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
URL:
http://ati.amd.com/support/drivers/linux/linux-radeon.html
Source0:
http://www.linux-ati-drivers.homecall.co.uk/catalyst-legacy-kmod-data-%{v...
Source11: catalyst-kmodtool-excludekernel-filterfile
Patch0: compat_alloc-Makefile.patch
Patch1: 3.5-do_mmap.patch
Patch2: 3.7_kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# needed for plague to make sure it builds for i686
ExclusiveArch: i686 x86_64
# get the needed BuildRequires (in parts depending on what we build for)
BuildRequires: %{_bindir}/kmodtool
%{!?kernels:BuildRequires:
buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}
}
# kmodtool does its magic here
%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
--filterfile %{SOURCE11} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels
"%{?kernels}"} 2>/dev/null) }
%description
The catalyst legacy %{version} display driver kernel module.
%prep
# error out if there was something wrong with kmodtool
%{?kmodtool_check}
# print kmodtool output for debugging purposes:
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile
%{SOURCE11} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels
"%{?kernels}"} 2>/dev/null
%setup -q -c -T -a 0
# Tweak to have debuginfo - part 2/2
%if 0%{?fedora} > 7
cp -p %{_prefix}/lib/rpm/find-debuginfo.sh .
sed -i -e 's|strict=true|strict=false|' find-debuginfo.sh
%endif
mkdir fglrxpkg
%ifarch %{ix86}
cp -r fglrx/common/* fglrx/arch/x86/* fglrxpkg/
%endif
%ifarch x86_64
cp -r fglrx/common/* fglrx/arch/x86_64/* fglrxpkg/
%endif
# proper permissions
find fglrxpkg/lib/modules/fglrx/build_mod/ -type f -print0 | xargs -0 chmod 0644
# debuginfo fix
#sed -i -e 's|strip -g|/bin/true|' fglrxpkg/lib/modules/fglrx/build_mod/make.sh
pushd fglrxpkg
%patch0 -p0 -b.compat_alloc
%patch1 -p0 -b.3.5-do_mmap
%patch2 -p0 -b.3.7_kernel
popd
for kernel_version in %{?kernel_versions} ; do
cp -a fglrxpkg/ _kmod_build_${kernel_version%%___*}
done
%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 MODVERSIONS=8.98 \
KVER="${kernel_version%%___*}" \
KDIR="/usr/src/kernels/${kernel_version%%___*}"
popd
done
%install
rm -rf $RPM_BUILD_ROOT
for kernel_version in %{?kernel_versions}; do
install -D -m 0755
_kmod_build_${kernel_version%%___*}/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko
$RPM_BUILD_ROOT%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/fglrx.ko
done
%{?akmod_install}
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Feb 04 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 13.1-1
- Update to Catalyst legacy (internal version 13.1 8.97.100.7)
* Sat Jan 19 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 12.6-2
- patch for 3.7 kernel
* Thu Jan 17 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 12.6-1.7
- Rebuilt for updated kernel
* Wed Jan 09 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 12.6-1.6
- Rebuilt for updated kernel
* Sun Dec 23 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 12.6-1.5
- Rebuilt for updated kernel
* Sat Dec 22 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 12.6-1.4
- Rebuilt for updated kernel
* Tue Dec 18 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 12.6-1.3
- Rebuilt for updated kernel
* Wed Dec 12 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 12.6-1.2
- Rebuilt for updated kernel
* Wed Dec 05 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 12.6-1.1
- Rebuilt for updated kernel
* Thu Nov 29 2012 Leigh Scott <leigh123linux(a)googlemail.com> - 12.6-1
- Update to Catalyst 12.6 legacy (internal version 8.97.100.3)
* Fri Jul 06 2012 leigh scott <leigh123linux(a)googlemail.com> - 12.6-0.1
- Based on xorg-x11-drv-catalyst
- Update to Catalyst legacy 12.6 beta (internal version 8.97.100.3)
compat_alloc-Makefile.patch:
Makefile | 1 +
1 file changed, 1 insertion(+)
--- NEW FILE compat_alloc-Makefile.patch ---
--- lib/modules/fglrx/build_mod/2.6.x/Makefile.compat_alloc 2010-10-25 19:14:43.157401050
-0400
+++ lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-10-25 19:14:54.586401063 -0400
@@ -66,6 +66,7 @@
-DFGL_GART_RESERVED_SLOT \
-DFGL_LINUX253P1_VMA_API \
-DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \
+ -DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space \
ifeq ($(KERNELRELEASE),)
# on first call from remote location we get into this path
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/catalyst-legacy-kmod/F-18/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 29 Nov 2012 17:26:44 -0000 1.1
+++ .cvsignore 4 Feb 2013 17:01:56 -0000 1.2
@@ -0,0 +1 @@
+catalyst-legacy-kmod-data-13.1.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/catalyst-legacy-kmod/F-18/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 29 Nov 2012 17:26:44 -0000 1.1
+++ sources 4 Feb 2013 17:01:56 -0000 1.2
@@ -0,0 +1 @@
+18245a56253d8f87dd8ae0920552f3ca catalyst-legacy-kmod-data-13.1.tar.bz2