Re: console spin_lock

2001-01-18 Thread James Simmons
> This statement of mine was grade-A bollocks. printk cannot of > course call down(). It needs to use __down_trylock and buffer > it up if it fails. (faster, too!) Okay. I'm going to start working on this tomorrow. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: console spin_lock

2001-01-18 Thread Russell King
Andrew Morton writes: > The subtler problem will be interrupt-capable drivers which > do a bare spin_lock() to serialise wrt their interrupt routines, > relying upon interrupts being disabled. They'll be deadlocky > and will need changing. That's trivial to find and fix though. Uhh, what if you

Re: console spin_lock

2001-01-18 Thread Andrew Morton
James Simmons wrote: > ... > By you saying couldn't be acquired from interrupt context do you mean > from a process context or do you mean it failed to aquire it while in > the interrupt context? Actually, printk() must always use __down_trylock(). > > - Get rid of console_tasklet. Do it in pr

Re: console spin_lock

2001-01-17 Thread James Simmons
> heh. > > I'm actually planning on grabbing console_lock and thoroughly strangling > it Ha Ha!! > - Use a semaphore for serialisation. I think this would be the best solution as well. > - For printk in interrupt context, grab the > semaphore (yes, you can do this). Don't forget about the

Re: console spin_lock

2001-01-17 Thread Roman Zippel
Hi, On Thu, 18 Jan 2001, Andrew Morton wrote: > - Get rid of the special printk buffer - share the > log buffer. (Implies writes to console > devices will be broken into two writes when they > wrap around). > - Teach vsprintf to print into a circular buffer > (snprintf thus comes for fr

Re: [linux-fbdev] Re: console spin_lock

2001-01-17 Thread Petr Vandrovec
On 18 Jan 01 at 0:49, Andrew Morton wrote: > Assumption: > - Once the system is up and running, it's always safe to > call down() when in_interrupt() returns false - probably > not the case in parts of the exit path - tough. > > Anyway, that's the thoughtware. Sound sane? Do not forget to

Re: console spin_lock

2001-01-17 Thread Andrew Morton
James Simmons wrote: > > Some time ago a intel i810 framebuffer driver was written. It only worked > for 2.2.X. With 2.4.X a spinlock is used in the upper layers of the > console system. Sooner or later we are going to run into the situtation > where we will have graphics hardware which has no v