Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-kmod/F-17
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv27178
Modified Files:
nvidia-kmod.spec
Added Files:
3.7_kernel.patch
Log Message:
* Sat Jan 19 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 1:304.64-2
- patch for 3.7 kernel
3.7_kernel.patch:
conftest.sh | 7 ++++++-
nv-mmap.c | 4 ++++
2 files changed, 10 insertions(+), 1 deletion(-)
--- NEW FILE 3.7_kernel.patch ---
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -127,6 +127,7 @@ build_cflags() {
if [ "$ARCH" = "i386" -o "$ARCH" =
"x86_64" ]; then
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
MACH_CFLAGS="$MACH_CFLAGS
-I$SOURCES/arch/x86/include/asm/mach-default"
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/arch/x86/include/uapi"
elif [ "$ARCH" = "arm" ]; then
MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/arm/mach-tegra/include
-D__LINUX_ARM_ARCH__=7"
fi
@@ -138,6 +139,7 @@ build_cflags() {
if [ "$ARCH" = "i386" -o "$ARCH" =
"x86_64" ]; then
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
MACH_CFLAGS="$MACH_CFLAGS
-I$SOURCES/arch/x86/include/asm/mach-default"
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/arch/x86/include/uapi"
elif [ "$ARCH" = "arm" ]; then
MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/arm/mach-tegra/include
-D__LINUX_ARM_ARCH__=7"
fi
@@ -147,9 +149,12 @@ build_cflags() {
fi
CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS
$AUTOCONF_CFLAGS"
+ CFLAGS="$CFLAGS -I$HEADERS -I$HEADERS/uapi"
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64"
]; then
- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include
-I$OUTPUT/arch/x86/include/generated"
+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
+ CFLAGS="$CFLAGS -I$OUTPUT/arch/x86/include/generated"
+ CFLAGS="$CFLAGS -I$OUTPUT/arch/x86/include/generated/uapi"
elif [ "$ARCH" = "arm" ]; then
CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include
-I$OUTPUT/arch/arm/include/generated"
fi
--- a/kernel/nv-mmap.c
+++ b/kernel/nv-mmap.c
@@ -463,7 +463,11 @@ int nv_kern_mmap(
NV_PRINT_AT(NV_DBG_MEMINFO, at);
nv_vm_list_page_count(&at->page_table[i], pages);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP));
+#else
vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
+#endif
#if defined(VM_DRIVER_PAGES)
vma->vm_flags |= VM_DRIVER_PAGES;
Index: nvidia-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-kmod/F-17/nvidia-kmod.spec,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -r1.151 -r1.152
--- nvidia-kmod.spec 17 Jan 2013 09:28:02 -0000 1.151
+++ nvidia-kmod.spec 19 Jan 2013 23:09:56 -0000 1.152
@@ -3,13 +3,13 @@
# "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
Name: nvidia-kmod
Epoch: 1
Version: 304.64
# Taken over by kmodtool
-Release: 1%{?dist}.8
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -24,7 +24,7 @@
# </switch me>
Source11: nvidia-kmodtool-excludekernel-filterfile
-
+Patch0: 3.7_kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -51,7 +51,7 @@
for arch in x86 x64
do
pushd nvidiapkg-${arch}
- echo "NoPatch"
+%patch0 -p1
popd
done
@@ -85,6 +85,9 @@
%changelog
+* Sat Jan 19 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 1:304.64-2
+- patch for 3.7 kernel
+
* Thu Jan 17 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 1:304.64-1.8
- Rebuilt for updated kernel