[svn] r4888 - trunk/rpms/nvidia-x11-drv

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Fri Nov 17 18:30:27 CET 2006


Author: thias
Date: 2006-11-17 18:30:26 +0100 (Fri, 17 Nov 2006)
New Revision: 4888

Added:
   trunk/rpms/nvidia-x11-drv/NVIDIA-Linux-1.0-9629-xenrt.patch
Modified:
   trunk/rpms/nvidia-x11-drv/nvidia-x11-drv.spec
Log:
Include nvidia-x11-drv Xen patch and spec fixes from Juliano F. Ravasi.


Added: trunk/rpms/nvidia-x11-drv/NVIDIA-Linux-1.0-9629-xenrt.patch
===================================================================
--- trunk/rpms/nvidia-x11-drv/NVIDIA-Linux-1.0-9629-xenrt.patch	                        (rev 0)
+++ trunk/rpms/nvidia-x11-drv/NVIDIA-Linux-1.0-9629-xenrt.patch	2006-11-17 17:30:26 UTC (rev 4888)
@@ -0,0 +1,117 @@
+diff -urN usr/src/nv/nv.c usr/src/nv-xenrt/nv.c
+--- usr/src/nv/nv.c	2006-09-26 21:33:35.000000000 +0200
++++ usr/src/nv-xenrt/nv.c	2006-10-03 01:15:42.000000000 +0200
+@@ -42,8 +42,26 @@
+ 
+ int nv_pat_enabled = 0;
+ 
++/*
++ * disable PAT support if XEN or PREEMPT_RT is configured in kernel
++ */
++
++#if defined(CONFIG_XEN) || defined(CONFIG_PREEMPT_RT)
++static int nv_disable_pat = 1;
++#else
+ static int nv_disable_pat = 0;
++#endif
++
++/*
++ * you can re-enable PAT support for PREEMPT_RT when applying
++ * "nv_disable_pat=0" as kernel parameter for the sake of slightly
++ * better 3D performance but at the expense of higher latencies.
++ * if XEN is configured, then PAT support can't be enabled!
++ */
++
++#if !defined(CONFIG_XEN)
+ NV_MODULE_PARAMETER(nv_disable_pat);
++#endif
+ 
+ #if defined(NVCPU_X86) || defined(NVCPU_X86_64)
+ NvU64 __nv_supported_pte_mask = ~_PAGE_NX;
+diff -urN usr/src/nv/nv-linux.h usr/src/nv-xenrt/nv-linux.h
+--- usr/src/nv/nv-linux.h	2006-09-26 21:33:37.000000000 +0200
++++ usr/src/nv-xenrt/nv-linux.h	2006-10-03 01:15:42.000000000 +0200
+@@ -226,7 +226,7 @@
+  * tiny, and the kernel panics when it is exhausted. try to warn the user that
+  * they need to boost the size of their pool.
+  */
+-#if defined(CONFIG_SWIOTLB) && !defined(GFP_DMA32)
++#if defined(CONFIG_SWIOTLB) && !defined(GFP_DMA32) && !defined(CONFIG_XEN)
+ #define NV_SWIOTLB 1
+ #endif
+ 
+@@ -734,7 +734,10 @@
+ #define NV_VM_INSERT_PAGE(vma, addr, page) \
+     vm_insert_page(vma, addr, page)
+ #endif
+-#if defined(NV_REMAP_PFN_RANGE_PRESENT)
++#if defined(CONFIG_XEN)
++#define NV_REMAP_PAGE_RANGE(from, offset, x...) \
++    io_remap_pfn_range(vma, from, ((offset) >> PAGE_SHIFT), x)
++#elif defined(NV_REMAP_PFN_RANGE_PRESENT)
+ #define NV_REMAP_PAGE_RANGE(from, offset, x...) \
+     remap_pfn_range(vma, from, ((offset) >> PAGE_SHIFT), x)
+ #elif defined(NV_REMAP_PAGE_RANGE_5_PRESENT)
+@@ -746,6 +749,9 @@
+ #define NV_REMAP_PAGE_RANGE(x...) remap_page_range(x)
+ #endif
+ 
++#if !defined(CONFIG_XEN)
++#define phys_to_machine(x) x
++#endif
+ 
+ #define NV_PGD_OFFSET(address, kernel, mm)              \
+    ({                                                   \
+diff -urN usr/src/nv/nv-vm.c usr/src/nv-xenrt/nv-vm.c
+--- usr/src/nv/nv-vm.c	2006-09-26 21:33:37.000000000 +0200
++++ usr/src/nv-xenrt/nv-vm.c	2006-10-03 01:24:31.000000000 +0200
+@@ -352,6 +352,9 @@
+ 
+ static void nv_flush_caches(void)
+ {
++#if defined(CONFIG_PREEMPT_RT)
++    if(!nv_pat_enabled) return;
++#endif
+ #if defined(KERNEL_2_4)
+     // for 2.4 kernels, just automatically flush the caches and invalidate tlbs
+ #ifdef CONFIG_SMP
+@@ -508,7 +511,7 @@
+         page_ptr->phys_addr = phys_addr;
+         page_ptr->page_count = NV_GET_PAGE_COUNT(page_ptr);
+         page_ptr->virt_addr = virt_addr;
+-        page_ptr->dma_addr = page_ptr->phys_addr;
++        page_ptr->dma_addr = phys_to_machine(page_ptr->phys_addr);
+ 
+         /* lock the page for dma purposes */
+         nv_lock_page(page_ptr);
+diff -urN usr/src/nv/os-agp.c usr/src/nv-xenrt/os-agp.c
+--- usr/src/nv/os-agp.c	2006-09-26 21:33:37.000000000 +0200
++++ usr/src/nv-xenrt/os-agp.c	2006-10-03 01:15:42.000000000 +0200
+@@ -286,7 +286,7 @@
+ 
+          page_ptr->phys_addr = (ptr->memory[i] & PAGE_MASK);
+          page_ptr->virt_addr = (unsigned long) __va(page_ptr->phys_addr);
+-         page_ptr->dma_addr  = page_ptr->phys_addr;
++         page_ptr->dma_addr  = phys_to_machine(page_ptr->phys_addr);
+     }
+ 
+     return RM_OK;
+diff -urN usr/src/nv/os-interface.c usr/src/nv-xenrt/os-interface.c
+--- usr/src/nv/os-interface.c	2006-09-26 21:33:37.000000000 +0200
++++ usr/src/nv-xenrt/os-interface.c	2006-10-03 01:15:42.000000000 +0200
+@@ -527,6 +527,7 @@
+     MicroSeconds = MilliSeconds * 1000;
+     tm_end.tv_usec = MicroSeconds;
+     tm_end.tv_sec = 0;
++#if !defined(CONFIG_XEN)
+     NV_TIMERADD(&tm_aux, &tm_end, &tm_end);
+ 
+     /* do we have a full jiffie to wait? */
+@@ -564,6 +565,7 @@
+                 MicroSeconds = 0;
+         } while ((jiffies = NV_USECS_TO_JIFFIES(MicroSeconds)) != 0);
+     }
++#endif
+ 
+     if (MicroSeconds > 1000)
+     {

Modified: trunk/rpms/nvidia-x11-drv/nvidia-x11-drv.spec
===================================================================
--- trunk/rpms/nvidia-x11-drv/nvidia-x11-drv.spec	2006-11-17 11:58:12 UTC (rev 4887)
+++ trunk/rpms/nvidia-x11-drv/nvidia-x11-drv.spec	2006-11-17 17:30:26 UTC (rev 4888)
@@ -14,7 +14,7 @@
 Summary: Proprietary NVIDIA hardware accelerated OpenGL display driver
 Name: nvidia-x11-drv
 Version: %{majmin}.%{relver}
-Release: 1
+Release: 2
 License: Proprietary
 Group: User Interface/X Hardware Support
 URL: http://www.nvidia.com/object/unix.html
@@ -28,6 +28,8 @@
 Source5: nvidia.modprobe
 # http://www.nvnews.net/vbulletin/attachment.php?attachmentid=20486&d=1158955681
 Patch0: NVIDIA_kernel-1.0-9625-NOSMBUS.diff.txt
+# http://www.nvnews.net/vbulletin/showthread.php?t=77597
+Patch1: NVIDIA-Linux-1.0-9629-xenrt.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 # Required for proper dkms operation
 Requires: gcc
@@ -65,6 +67,7 @@
 %{__mv} tmp/* .
 %{__rm} -rf tmp/
 %patch0 -p0
+%patch1 -p0
 
 
 %build
@@ -85,7 +88,7 @@
 %{__cat} > %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/dkms.conf << 'EOF'
 PACKAGE_NAME=%{dkms_name}
 PACKAGE_VERSION=%{dkms_vers}
-MAKE[0]="make module KERNDIR=/lib/modules/$kernelver IGNORE_CC_MISMATCH=1"
+MAKE[0]="make module KERNDIR=/lib/modules/$kernelver IGNORE_CC_MISMATCH=1 SYSSRC=$kernel_source_dir"
 BUILT_MODULE_NAME[0]=nvidia
 DEST_MODULE_LOCATION[0]=/kernel/drivers/video/nvidia
 AUTOINSTALL=YES
@@ -278,6 +281,9 @@
 
 
 %changelog
+* Thu Nov 16 2006 Matthias Saou <http://freshrpms.net/> 1.0.9629-2
+- Include Xen patch and spec fixes from Juliano F. Ravasi.
+
 * Wed Nov  8 2006 Matthias Saou <http://freshrpms.net/> 1.0.9629-1
 - Update to 1.0-9629.
 



More information about the svn-commits mailing list