public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RT :  nvidia driver and perhaps others
@ 2005-06-15  8:21 Serge Noiraud
  2005-06-15 12:40 ` Valdis.Kletnieks
  0 siblings, 1 reply; 3+ messages in thread
From: Serge Noiraud @ 2005-06-15  8:21 UTC (permalink / raw)
  To: linux-kernel, Ingo Molnar

Hi,

	I try to compile the nvidia driver for my RT kernel.
It does not work anymore.

I have a great question : Do we need to modify all drivers ?

Isn't there a better way to avoid these modifications ?
for example to have the external fonction the same than non RT kernel.
and have an internal link to the new one or something like that ?

I will have the same problem with PVIC drivers I think.

These drivers are proprietary, so I can't modify them.
I think we should change :

1 - local_irq_* to raw_local_irq_*  : is it always true ?
    I done this and now the driver loads OK
    #  define NV_CLI()                      local_irq_disable()
    #  define NV_SAVE_FLAGS(eflags)         local_save_flags(eflags)
    #  define NV_RESTORE_FLAGS(eflags)      local_irq_restore(eflags)


2 - spin_* to raw_spin_*  ?

   #define nv_init_lock(lock)  spin_lock_init(&lock)
   #define nv_lock(lock)       spin_lock(&lock)
   #define nv_unlock(lock)     spin_unlock(&lock)
   #define nv_lock_irq(lock,flags)    spin_lock_irqsave(&lock,flags)
   #define nv_unlock_irq(lock,flags) spin_unlock_irqrestore(&lock,flags)

and other in two files ... too many modifications.


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

* Re: RT : nvidia driver and perhaps others
  2005-06-15  8:21 RT : nvidia driver and perhaps others Serge Noiraud
@ 2005-06-15 12:40 ` Valdis.Kletnieks
  2005-06-15 14:45   ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks @ 2005-06-15 12:40 UTC (permalink / raw)
  To: Serge Noiraud; +Cc: linux-kernel, Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

On Wed, 15 Jun 2005 10:21:45 +0200, Serge Noiraud said:

> 	I try to compile the nvidia driver for my RT kernel.
> It does not work anymore.

You aren't going to get much sympathy here on that one...:)

> Isn't there a better way to avoid these modifications ?
> for example to have the external fonction the same than non RT kernel.
> and have an internal link to the new one or something like that ?

However, he *does* have a point here - GPL'ed out-of-tree drivers will
have these same issues.  Yes, I know the standard "get them into the tree"
refrain here...

> These drivers are proprietary, so I can't modify them.

Fortunately, NVidia supplies enough pieces to make things work..

> I think we should change :
> 
> 1 - local_irq_* to raw_local_irq_*  : is it always true ?

> 2 - spin_* to raw_spin_*  ?

Ingo et al - what *is* the recommended magic to make a driver compile and
work cleanly with or without RT?  Hopefully there's a simple "will work correctly,
but possibly sub-optimal latency" cookbook scheme....

> and other in two files ... too many modifications.

The C preprocessor is your friend - we *should* be able to make a change in one .h
like '#ifdef SOME_RT_FLAG .. #else ... #endif' to do most of the work...


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

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

* Re: RT : nvidia driver and perhaps others
  2005-06-15 12:40 ` Valdis.Kletnieks
@ 2005-06-15 14:45   ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2005-06-15 14:45 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: Ingo Molnar, linux-kernel, Serge Noiraud

On Wed, 2005-06-15 at 08:40 -0400, Valdis.Kletnieks@vt.edu wrote:
> On Wed, 15 Jun 2005 10:21:45 +0200, Serge Noiraud said:
> 
> > 	I try to compile the nvidia driver for my RT kernel.
> > It does not work anymore.
> 
> You aren't going to get much sympathy here on that one...:)

You do from me :)  I have a NVidia on two machines that I run RT on. But
they are both SMP (well one is just hyper threaded) and I couldn't get
them working with SMP. So I just use the vesa driver when running RT on
those machines :-(  It's been several versions back since I had it
working on UP with NVidia (about a month or two back, which at Ingo's
speed is an eternity).

> 
> > Isn't there a better way to avoid these modifications ?
> > for example to have the external fonction the same than non RT kernel.
> > and have an internal link to the new one or something like that ?
> 
> However, he *does* have a point here - GPL'ed out-of-tree drivers will
> have these same issues.  Yes, I know the standard "get them into the tree"
> refrain here...

Well, if local_irq_disable doesn't turn off irqs and you don't have it
bugging per Esben's patch, it shouldn't be a problem to just recompile
it again.

> 
> > These drivers are proprietary, so I can't modify them.
> 
> Fortunately, NVidia supplies enough pieces to make things work..

But you don't know what those pieces that you don't see do and if they
really need irqs disabled.  I had to hack a little to get interrupts off
to call one of the NVidia's hooks. I don't really remember all that I
did, but I still wasn't able to get it working on SMP.

> 
> > I think we should change :
> > 
> > 1 - local_irq_* to raw_local_irq_*  : is it always true ?
> 
> > 2 - spin_* to raw_spin_*  ?
> 
> Ingo et al - what *is* the recommended magic to make a driver compile and
> work cleanly with or without RT?  Hopefully there's a simple "will work correctly,
> but possibly sub-optimal latency" cookbook scheme....

Hopefully, just compiling the way it is would work.  The idea of Ingo's
magic code is to have what is already in place work with RT.

-- Steve


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

end of thread, other threads:[~2005-06-15 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-15  8:21 RT : nvidia driver and perhaps others Serge Noiraud
2005-06-15 12:40 ` Valdis.Kletnieks
2005-06-15 14:45   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox