Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 09-23-09, 01:47 PM   #1
pavlinux
Registered User
 
pavlinux's Avatar
 
Join Date: Feb 2006
Location: Moscow, Russia
Posts: 57
Default Patch for 190.32 and latest Realtime rt11 kernel

http://pavlinux.ru/nv/nvidia-190.32-for-2.6.31.patch

Code:
diff -ur 190.32/usr/src/nv/nv-linux.h 190.32-rt/usr/src/nv/nv-linux.h
--- nv-linux.h	2009-09-08 23:57:13.000000000 +0400
+++ nv-linux.h	2009-09-23 22:15:05.889398178 +0400
@@ -743,7 +743,7 @@
 #define nv_up(lock)                     up(&lock)
 
 #if defined(CONFIG_PREEMPT_RT)
-#define NV_INIT_MUTEX(mutex) init_MUTEX(mutex)
+#define NV_INIT_MUTEX(mutex) semaphore_init(mutex)
 #else
 #if !defined(__SEMAPHORE_INITIALIZER) && defined(__COMPAT_SEMAPHORE_INITIALIZER)
 #define __SEMAPHORE_INITIALIZER __COMPAT_SEMAPHORE_INITIALIZER
diff -ur 190.32/usr/src/nv/os-interface.c 190.32-rt/usr/src/nv/os-interface.c
--- os-interface.c	2009-09-08 23:57:13.000000000 +0400
+++ os-interface.c	2009-09-23 22:21:27.826648129 +0400
@@ -108,11 +108,7 @@
 {
     nv_stack_t        *sp;
     struct completion  completion;
-#if defined(CONFIG_PREEMPT_RT)
-    raw_spinlock_t     lock;
-#else
     spinlock_t         lock;
-#endif
     S032               count;
 } os_sema_t;



Unigine Tropic Demo Benchmark

linux-2.6.31-rt11 + 190.32
linux-2.6.30.2 + 190.16
linux-2.6.29 + 180.44
pavlinux is offline   Reply With Quote
Old 09-23-09, 02:33 PM   #2
ir123
*BANNED*
 
Join Date: Jun 2008
Posts: 92
Default Re: Patch for 190.32 and latest Realtime rt11 kernel

What about suspend and resume?
ir123 is offline   Reply With Quote
Old 09-23-09, 03:04 PM   #3
pavlinux
Registered User
 
pavlinux's Avatar
 
Join Date: Feb 2006
Location: Moscow, Russia
Posts: 57
Default Re: Patch for 190.32 and latest Realtime rt11 kernel

Quote:
Originally Posted by ir123 View Post
What about suspend and resume?
Do not use, - reboot or shutdown and power on, much faster.
pavlinux is offline   Reply With Quote
Old 09-23-09, 06:02 PM   #4
ir123
*BANNED*
 
Join Date: Jun 2008
Posts: 92
Default Re: Patch for 190.32 and latest Realtime rt11 kernel

Faster than suspend/resume?

I guess if it doesn't work, then yes, it's a long wait.
ir123 is offline   Reply With Quote
Old 09-23-09, 08:23 PM   #5
pavlinux
Registered User
 
pavlinux's Avatar
 
Join Date: Feb 2006
Location: Moscow, Russia
Posts: 57
Default Re: Patch for 190.32 and latest Realtime rt11 kernel

Quote:
Originally Posted by ir123 View Post
Faster than suspend/resume?
To disk, not to RAM
pavlinux is offline   Reply With Quote
Old 10-03-09, 04:37 AM   #6
eskuai
Registered User
 
Join Date: Aug 2007
Posts: 35
Default Re: Patch for 190.32 and latest Realtime rt11 kernel

On Sat, 2009-09-12 at 11:24 +0200, Jan Engelhardt wrote:
> For interested parties and archival, patches to the four nvidia packages
> (185, 173, 96, 71) for 2.6.31-rt.
> Tested {2.6.31-rc8-rt9 with 96}, which seems to work.

Adding on patch for nvidia-beta (currently at 190.36, also worked for
190.32). Tested against 2.6.31-rt11.

diff -Naur nv.orig/nv-linux.h nv/nv-linux.h
--- nv-linux.h 2009-09-02 18:42:19.000000000 +0800
+++ nv-linux.h 2009-09-22 19:31:12.285960428 +0800
@@ -743,7 +743,7 @@
#define nv_up(lock) up(&lock)

#if defined(CONFIG_PREEMPT_RT)
-#define NV_INIT_MUTEX(mutex) init_MUTEX(mutex)
+#define NV_INIT_MUTEX(mutex) semaphore_init(mutex)
#else
#if !defined(__SEMAPHORE_INITIALIZER) &&
defined(__COMPAT_SEMAPHORE_INITIALIZER)
#define __SEMAPHORE_INITIALIZER __COMPAT_SEMAPHORE_INITIALIZER
diff -Naur nv.orig/os-interface.c nv/os-interface.c
--- os-interface.c 2009-09-02 18:42:17.000000000 +0800
+++ os-interface.c 2009-09-22 19:35:25.977961345 +0800
@@ -109,9 +109,15 @@
nv_stack_t *sp;
struct completion completion;
#if defined(CONFIG_PREEMPT_RT)
- raw_spinlock_t lock;
+ atomic_spinlock_t lock;
+#define nv_spin_lock_init(x) atomic_spin_lock_init(x)
+#define nv_spin_lock_irqsave(x, f) atomic_spin_lock_irqsave((x), (f))
+#define nv_spin_unlock_irqrestore(x, f)
atomic_spin_unlock_irqrestore((x), (f))
#else
spinlock_t lock;
+#define nv_spin_lock_init(x) spin_lock_init(x)
+#define nv_spin_lock_irqsave(x, f) spin_lock_irqsave((x), (f))
+#define nv_spin_unlock_irqrestore(x, f) spin_unlock_irqrestore((x),
(f))
#endif
S032 count;
} os_sema_t;
@@ -148,7 +154,7 @@
os_sema = (os_sema_t *)*ppSema;
os_sema->sp = sp;
init_completion(&os_sema->completion);
- spin_lock_init(&os_sema->lock);
+ nv_spin_lock_init(&os_sema->lock);
os_sema->count = 1;

if (nv_os_smp_barrier_init())
@@ -199,18 +205,18 @@
os_sema_t *os_sema = (os_sema_t *)pSema;
unsigned long old_irq;

- spin_lock_irqsave(&os_sema->lock, old_irq);
+ nv_spin_lock_irqsave(&os_sema->lock, old_irq);
if (os_sema->count <= 0)
{
os_sema->count--;
- spin_unlock_irqrestore(&os_sema->lock, old_irq);
+ nv_spin_unlock_irqrestore(&os_sema->lock, old_irq);
wait_for_completion(&os_sema->completion);
}
else
{
os_sema->count--;
rm_disable_interrupts(os_sema->sp);
- spin_unlock_irqrestore(&os_sema->lock, old_irq);
+ nv_spin_unlock_irqrestore(&os_sema->lock, old_irq);
}

return RM_OK;
@@ -233,17 +239,17 @@
os_sema_t *os_sema = (os_sema_t *)pSema;
unsigned long old_irq;

- spin_lock_irqsave(&os_sema->lock, old_irq);
+ nv_spin_lock_irqsave(&os_sema->lock, old_irq);
if (os_sema->count <= 0)
{
- spin_unlock_irqrestore(&os_sema->lock, old_irq);
+ nv_spin_unlock_irqrestore(&os_sema->lock, old_irq);
return RM_ERROR;
}
else
{
os_sema->count--;
rm_disable_interrupts(os_sema->sp);
- spin_unlock_irqrestore(&os_sema->lock, old_irq);
+ nv_spin_unlock_irqrestore(&os_sema->lock, old_irq);
return RM_OK;
}

@@ -267,7 +273,7 @@
unsigned long old_irq;
BOOL doWakeup;

- spin_lock_irqsave(&os_sema->lock, old_irq);
+ nv_spin_lock_irqsave(&os_sema->lock, old_irq);
if (os_sema->count < 0)
{
doWakeup = TRUE;
@@ -278,7 +284,7 @@
rm_enable_interrupts(os_sema->sp);
}
os_sema->count++;
- spin_unlock_irqrestore(&os_sema->lock, old_irq);
+ nv_spin_unlock_irqrestore(&os_sema->lock, old_irq);

if (doWakeup)
complete(&os_sema->completion);
@@ -1383,7 +1389,7 @@
unsigned long oldIrql;

os_sema = (os_sema_t *) pSema;
- spin_lock_irqsave(&os_sema->lock, oldIrql);
+ nv_spin_lock_irqsave(&os_sema->lock, oldIrql);

return oldIrql;
}
@@ -1394,7 +1400,7 @@
unsigned long old_irq = (unsigned long) oldIrql;

os_sema = (os_sema_t *) pSema;
- spin_unlock_irqrestore(&os_sema->lock, old_irq);
+ nv_spin_unlock_irqrestore(&os_sema->lock, old_irq);
}

RM_STATUS NV_API_CALL os_get_address_space_info(
eskuai is offline   Reply With Quote
Old 10-24-09, 12:28 PM   #7
joegiampaoli
Registered User
 
Join Date: Jan 2009
Posts: 23
Default Re: Patch for 190.32 and latest Realtime rt11 kernel

I have a similar problem with nvidia 185.18.36 on custom 2.6.31.4 RT If I install the Beta 190.32 do think this patch will work under 2.6.31.4? Thanks.

http://www.nvnews.net/vbulletin/showthread.php?t=140445
joegiampaoli is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:49 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.