linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* patch for NVIDIA on -rt
@ 2010-08-16 19:29 Joakim Hernberg
  2010-08-16 21:26 ` Reagan Thomas
  0 siblings, 1 reply; 2+ messages in thread
From: Joakim Hernberg @ 2010-08-16 19:29 UTC (permalink / raw)
  To: linux-rt-users

For those that might need it.

>From bff65cf087bae512ae9f485f4556e89d304f99a9 Mon Sep 17 00:00:00 2001
From: Joakim B Hernberg <jbh@alchemy.lu>
Date: Sun, 8 Aug 2010 12:39:34 +0200
Subject: [PATCH] Patch nvidia proprietary video driver 256.44 for rt patched 
kernel 2.6.33.7-rt29

---
 kernel/nv-linux.h |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/kernel/nv-linux.h b/kernel/nv-linux.h
index 3ba43e7..e95460a 100644
--- a/kernel/nv-linux.h
+++ b/kernel/nv-linux.h
@@ -218,16 +218,16 @@ extern int nv_pat_mode;
 #endif
 
 #if defined(CONFIG_PREEMPT_RT)
-typedef atomic_spinlock_t         nv_spinlock_t;
-#define NV_SPIN_LOCK_INIT(lock)   atomic_spin_lock_init(lock)
-#define NV_SPIN_LOCK_IRQ(lock)    atomic_spin_lock_irq(lock)
-#define NV_SPIN_UNLOCK_IRQ(lock)  atomic_spin_unlock_irq(lock)
-#define NV_SPIN_LOCK_IRQSAVE(lock,flags) atomic_spin_lock_irqsave(lock,flags)
+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)
+#define NV_SPIN_UNLOCK_IRQ(lock)  raw_spin_unlock_irq(lock)
+#define NV_SPIN_LOCK_IRQSAVE(lock,flags) raw_spin_lock_irqsave(lock,flags)
 #define NV_SPIN_UNLOCK_IRQRESTORE(lock,flags) \
-  atomic_spin_unlock_irqrestore(lock,flags)
-#define NV_SPIN_LOCK(lock)        atomic_spin_lock(lock)
-#define NV_SPIN_UNLOCK(lock)      atomic_spin_unlock(lock)
-#define NV_SPIN_UNLOCK_WAIT(lock) atomic_spin_unlock_wait(lock)
+  raw_spin_unlock_irqrestore(lock,flags)
+#define NV_SPIN_LOCK(lock)        raw_spin_lock(lock)
+#define NV_SPIN_UNLOCK(lock)      raw_spin_unlock(lock)
+#define NV_SPIN_UNLOCK_WAIT(lock) raw_spin_unlock_wait(lock)
 #else
 typedef spinlock_t                nv_spinlock_t;
 #define NV_SPIN_LOCK_INIT(lock)   spin_lock_init(lock)
@@ -791,7 +791,7 @@ static inline int nv_execute_on_all_cpus(void (*func)(void 
*info), void *info)
 }
 
 #if defined(CONFIG_PREEMPT_RT)
-#define NV_INIT_MUTEX(mutex) semaphore_init(mutex)
+#define NV_INIT_MUTEX(mutex) sema_init(mutex,1)
 #else
 #if !defined(__SEMAPHORE_INITIALIZER) && 
defined(__COMPAT_SEMAPHORE_INITIALIZER)
 #define __SEMAPHORE_INITIALIZER __COMPAT_SEMAPHORE_INITIALIZER
-- 
1.7.2.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: patch for NVIDIA on -rt
  2010-08-16 19:29 patch for NVIDIA on -rt Joakim Hernberg
@ 2010-08-16 21:26 ` Reagan Thomas
  0 siblings, 0 replies; 2+ messages in thread
From: Reagan Thomas @ 2010-08-16 21:26 UTC (permalink / raw)
  To: Joakim Hernberg; +Cc: linux-rt-users

  On 8/16/2010 2:29 PM, Joakim Hernberg wrote:
> For those that might need it.
>
> > From bff65cf087bae512ae9f485f4556e89d304f99a9 Mon Sep 17 00:00:00 2001
> From: Joakim B Hernberg<jbh@alchemy.lu>
> Date: Sun, 8 Aug 2010 12:39:34 +0200
> Subject: [PATCH] Patch nvidia proprietary video driver 256.44 for rt patched
> kernel 2.6.33.7-rt29
>
> ---
>   kernel/nv-linux.h |   20 ++++++++++----------
That patch works for me here.  Thank you.

I had to do a little web searching to find out how to use this patch 
and, though I'm probably the only one on this list who was ignorant of 
this procedure, I'll share it here just in case it's useful:

1. Extract the NVidia source:

      ./NVIDIA-Linux-x86-256.44.run -x

2. Apply the patch:

    cd [path]/NVIDIA-Linux-x86-256.44/kernel
    patch < [PathToPatchFile]/[PatchFilename]
    cd ..

3. Build the driver:

     ./nvidia-installer -K --kernel-name=2.6.33.7-rt29



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-16 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16 19:29 patch for NVIDIA on -rt Joakim Hernberg
2010-08-16 21:26 ` Reagan Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).