Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-96xx-kmod/F-17
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv31182
Added Files:
3.7_kernel.patch
Log Message:
add patch for kernel-3.7 (not added to specfile)
3.7_kernel.patch:
conftest.sh | 7 ++++++-
nv.c | 4 ++++
2 files changed, 10 insertions(+), 1 deletion(-)
--- NEW FILE 3.7_kernel.patch ---
--- a/usr/src/nv/conftest.sh
+++ b/usr/src/nv/conftest.sh
@@ -128,6 +128,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"
fi
if [ "$XEN_PRESENT" != "0" ]; then
MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-xen $MACH_CFLAGS"
@@ -137,6 +138,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"
fi
if [ "$XEN_PRESENT" != "0" ]; then
MACH_CFLAGS="-I$HEADERS/asm/mach-xen $MACH_CFLAGS"
@@ -144,9 +146,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"
fi
if [ -n "$BUILD_PARAMS" ]; then
CFLAGS="$CFLAGS -D$BUILD_PARAMS"
--- a/usr/src/nv/nv.c
+++ b/usr/src/nv/nv.c
@@ -2350,7 +2350,11 @@ int nv_kern_mmap(
/* prevent the swapper from swapping it out */
/* mark the memory i/o so the buffers aren't dumped on core dumps */
+#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
}
NV_VMA_FILE(vma) = file;