mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Smirl <jonsmirl@yahoo.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, keithp@keithp.com
Subject: Re: Is it possible to implement interrupt time printk's reliably?
Date: Sun, 9 May 2004 09:33:10 -0700 (PDT)	[thread overview]
Message-ID: <20040509163310.46944.qmail@web14923.mail.yahoo.com> (raw)
In-Reply-To: <20040507130119.45924379.akpm@osdl.org>

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 

  reply	other threads:[~2004-05-09 16:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-07  2:52 Jon Smirl
2004-05-07  5:17 ` Andrew Morton
2004-05-07 13:34   ` Jon Smirl
2004-05-07 19:13     ` Andrew Morton
2004-05-07 19:26       ` Jon Smirl
2004-05-07 20:01         ` Andrew Morton
2004-05-09 16:33           ` Jon Smirl [this message]
2004-05-10 21:55             ` James Simmons
2004-05-10 22:22               ` Jon Smirl
2004-05-11  0:23                 ` James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040509163310.46944.qmail@web14923.mail.yahoo.com \
    --to=jonsmirl@yahoo.com \
    --cc=akpm@osdl.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®