lkml.org 
[lkml]   [2004]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Is it possible to implement interrupt time printk's reliably?
So how do printk's work in the very early boot? Is the video card active before
the kernel probes it's module, or are these very early printk's being queued
until the video driver is probed?

--- Andrew Morton <akpm@osdl.org> wrote:
> Jon Smirl <jonsmirl@yahoo.com> wrote:
> >
> >
> > --- Andrew Morton <akpm@osdl.org> wrote:
> > > Jon Smirl <jonsmirl@yahoo.com> wrote:
> > > >
> > > > > If you're in process context you can use acquire_console_sem(), which
> will
> > > > > serialise against printk.
> > > > >
> > > >
> > > > Won't I deadlock if I have acquire_console_sem(), take an interrupt, and
> > > then a
> > > > printk is issued from the interrupt handelr?
> > > >
> > >
> > > Nope. If printk finds the semaphore to be held it queues up the
> characters
> > > and returns without printing them. The console_sem-holding process will
> > > print the newly buffered characters before releasing the semaphore.
> >
> > Is this solution sufficient for kernel developers wanting to use printk from
> > interrupt handlers? I've gotten negative feedback from Linus when I
> suggested
> > queuing them before.
> >
>
> It has been this way for several years.


=====
Jon Smirl
jonsmirl@yahoo.com




__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.031 / U:3.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site