Hi nvidia developers.
I have been able to get the 325.15 driver succussfully working with linux-rt (3.10.x-rt series), but am still looking for information / get a question or two ansered, as well as providing some info / patches too…
It seems that the 325.xx series nvidia installer does not need patching, in regards to linux-rt (or rather “less patching”- as the old nvidia-rt patch that adds some spinlock related stuff, isn’t needed; it’s included in 325.15). For brief background, previously we (linux-rt/nvidia users) used to have to patch nv-linux.h to support CONFIG_PREEMPT_RT_FULL + add missing bits for RT.
- Now that nvidia has added the missing stuff needed by -rt kernels, I see that we can also override the PREEMPT_RT check/behavior <in nvidia-insaller/conftest> by use of IGNORE_PREEMPT_RT_PRESENCE=1 environment variable… → but is this correct?..or do we need to do something else for the installer (and driver) to work for -rt??. —>(as i have done below)<-- i wasn’t able to find any documentation on the matter…
That being said i still did end up having to patch nv-linux.h. like so;
— a/nv-linux.h 2011-10-26 13:35:32.866579965 +0200
+++ b/nv-linux.h 2011-10-26 13:35:47.265117607 +0200
@@ -43,6 +43,8 @@
#include <linux/version.h>
#include <linux/utsname.h>
+#define CONFIG_PREEMPT_RT_FULL 1
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 9)
error This driver does not support kernels older than 2.6.9!
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)
@@ -312,11 +312,7 @@
#endif
#endif
-#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_PREEMPT_RT_FULL)
-#define NV_CONFIG_PREEMPT_RT 1
-#endif
-#if defined(NV_CONFIG_PREEMPT_RT)
+#if defined(CONFIG_PREEMPT_RT_FULL)
typedef raw_spinlock_t nv_spinlock_t;
#define NV_SPIN_LOCK_INIT(lock) raw_spin_lock_init(lock)
#define NV_SPIN_LOCK_IRQ(lock) raw_spin_lock_irq(lock)
@@ -943,7 +939,7 @@
return ret;
}
-#if defined(NV_CONFIG_PREEMPT_RT)
+#if defined(CONFIG_PREEMPT_RT_FULL)
#define NV_INIT_MUTEX(mutex) sema_init(mutex,1)
#else
#if !defined(__SEMAPHORE_INITIALIZER) && defined(__COMPAT_SEMAPHORE_INITIALIZER)
…basically, I am explicitly (and/or redundantly?) defining/using CONFIG_PREEMPT_RT_FULL (while also disabling the PREEMPT_RT conftest). Using this patch AND disabling the PREEMPT_RT conftest together, yields a driver that works… However, i was under the impression that disabling the check was enough(?)
- this morning i discovered that by NOT using the above patch (because i thought it wasn’t needed); while i was able to compile the nvidia driver (since i am disabling the check) → the resulting driver locked up my machine(s). → This would indicate to me that either; A) there is a way to tell the nvidia installer to compile for RT <since support appears to be there / disabled by default> OR B). Linux RT users are still required to patch the driver and disable the check.
note: the patched-version (of 325.15) works great / as expected.
anyway, it would be great to have some clarification from an nvidia-developer on the matter, as it effects users, packagers, etc like myself. At this point, it seems that the 325.xx series has changed for us, but there isn’t anything really documented, which would be helpful. :) ~ but again, i do have it working (after some tinkering). My uptime has been over 2 days with both 3.10.4-rt1 and 3.10.6-rt3 <total of 4 dayz X2 machines, no issues> with 9800GT and newer 440GT.
thx