From: Paul <paul_c@domain.hid>
To: adeos-main <adeos-main@gna.org>
Subject: [Adeos-main] [PATCH] printk documentation
Date: Sun, 30 Dec 2007 20:29:59 +0000 [thread overview]
Message-ID: <200712302029.59827.paul_c@domain.hid> (raw)
[-- Attachment #1: Type: text/plain, Size: 344 bytes --]
Hi Philippe
Running some full kernel package builds with 2.6.23 & Xenomai v2.4.x, and once
again hit a problem I reported in May[1] - This issue as crept back in
causing the kernel documentation targets to fail.
Patch attached to resolve the problem.
Regards, Paul.
[1] https://mail.gna.org/public/adeos-main/2007-05/msg00034.html
[-- Attachment #2: ipipe_printk.patch --]
[-- Type: text/x-diff, Size: 2554 bytes --]
---
kernel/printk.c | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c
index 6b49827..a50b8ea 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -479,29 +479,6 @@ static int have_callable_console(void)
return 0;
}
-/**
- * printk - print a kernel message
- * @fmt: format string
- *
- * This is printk(). It can be called from any context. We want it to work.
- * Be aware of the fact that if oops_in_progress is not set, we might try to
- * wake klogd up which could deadlock on runqueue lock if printk() is called
- * from scheduler code.
- *
- * We try to grab the console_sem. If we succeed, it's easy - we log the output and
- * call the console drivers. If we fail to get the semaphore we place the output
- * into the log buffer and return. The current holder of the console_sem will
- * notice the new output in release_console_sem() and will send it to the
- * consoles before releasing the semaphore.
- *
- * One effect of this deferred printing is that code which calls printk() and
- * then changes console_loglevel may break. This is because console_loglevel
- * is inspected when the actual printing occurs.
- *
- * See also:
- * printf(3)
- */
-
#ifdef CONFIG_IPIPE
static ipipe_spinlock_t __ipipe_printk_lock = IPIPE_SPIN_LOCK_UNLOCKED;
@@ -534,6 +514,29 @@ void __ipipe_flush_printk (unsigned virq, void *cookie)
spin_unlock_irqrestore(&__ipipe_printk_lock, flags);
}
+/**
+ * printk - print a kernel message
+ * @fmt: format string
+ *
+ * This is printk(). It can be called from any context. We want it to work.
+ * Be aware of the fact that if oops_in_progress is not set, we might try to
+ * wake klogd up which could deadlock on runqueue lock if printk() is called
+ * from scheduler code.
+ *
+ * We try to grab the console_sem. If we succeed, it's easy - we log the output and
+ * call the console drivers. If we fail to get the semaphore we place the output
+ * into the log buffer and return. The current holder of the console_sem will
+ * notice the new output in release_console_sem() and will send it to the
+ * consoles before releasing the semaphore.
+ *
+ * One effect of this deferred printing is that code which calls printk() and
+ * then changes console_loglevel may break. This is because console_loglevel
+ * is inspected when the actual printing occurs.
+ *
+ * See also:
+ * printf(3)
+ */
+
asmlinkage int printk(const char *fmt, ...)
{
int r, fbytes, oldcount, cs = -1;
--
1.4.4.4
next reply other threads:[~2007-12-30 20:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-30 20:29 Paul [this message]
2007-12-30 22:48 ` [Adeos-main] [PATCH] printk documentation Philippe Gerum
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=200712302029.59827.paul_c@domain.hid \
--to=paul_c@domain.hid \
--cc=adeos-main@gna.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.