<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/printk.c, branch v2.6.32</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.32</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.32'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-09-23T14:39:28Z</updated>
<entry>
<title>printk: add printk_delay to make messages readable for some scenarios</title>
<updated>2009-09-23T14:39:28Z</updated>
<author>
<name>Dave Young</name>
<email>hidave.darkstar@gmail.com</email>
</author>
<published>2009-09-22T23:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af91322ef3f29ae4114e736e2a72e28b4d619cf9'/>
<id>urn:sha1:af91322ef3f29ae4114e736e2a72e28b4d619cf9</id>
<content type='text'>
When syslog is not possible, at the same time there's no serial/net
console available, it will be hard to read the printk messages.  For
example oops/panic/warning messages in shutdown phase.

Add a printk delay feature, we can make each printk message delay some
milliseconds.

Setting the delay by proc/sysctl interface: /proc/sys/kernel/printk_delay

The value range from 0 - 10000, default value is 0

[akpm@linux-foundation.org: fix a few things]
Signed-off-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>printk boot_delay: rename printk_delay_msec to loops_per_msec</title>
<updated>2009-09-23T14:39:28Z</updated>
<author>
<name>Dave Young</name>
<email>hidave.darkstar@gmail.com</email>
</author>
<published>2009-09-22T23:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a3b6ed2235f2f619889dd6096e24b6d93bf3339'/>
<id>urn:sha1:3a3b6ed2235f2f619889dd6096e24b6d93bf3339</id>
<content type='text'>
Rename `printk_delay_msec' to `loops_per_msec', because the patch "printk:
add printk_delay to make messages readable for some scenarios" wishes to
more appropriately use the `printk_delay_msec' identifier.

[akpm@linux-foundation.org: add a comment]
Signed-off-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>cleanup console_print()</title>
<updated>2009-09-15T00:41:42Z</updated>
<author>
<name>Anirban Sinha</name>
<email>asinha@zeugmasystems.com</email>
</author>
<published>2009-09-14T18:13:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=353f6dd2dec992ddd34620a94b051b0f76227379'/>
<id>urn:sha1:353f6dd2dec992ddd34620a94b051b0f76227379</id>
<content type='text'>
console_print() is an old legacy interface mostly unused in the entire
kernel tree. It's best to clean up its existing use and let developers
use their own implementation of it as they feel fit.

Signed-off-by: Anirban Sinha &lt;asinha@zeugmasystems.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>printk: Fix "printk: Enable the use of more than one CON_BOOT (early console)"</title>
<updated>2009-08-08T16:27:37Z</updated>
<author>
<name>Sonic Zhang</name>
<email>Sonic.Zhang@analog.com</email>
</author>
<published>2009-08-06T22:58:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42c2c8c854a716b05882a122632ddcd6dbe108f1'/>
<id>urn:sha1:42c2c8c854a716b05882a122632ddcd6dbe108f1</id>
<content type='text'>
Don't return when we find the first bootconsole - it can leave
other bootconsoles still installed, and they can be used and
cause problems later (if they are in the init section, and
eventually released), and cause problems.  Make sure we remove
all of them.

Signed-off-by: Sonic Zhang &lt;Sonic.Zhang@analog.com&gt;
Signed-off-by: Robin Getz &lt;rgetz@analog.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>printk: Restore previous console_loglevel when re-enabling logging</title>
<updated>2009-07-10T14:02:23Z</updated>
<author>
<name>Frans Pop</name>
<email>elendil@planet.nl</email>
</author>
<published>2009-07-06T11:31:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1aaad49e856ce41adc07d8ae0c8ef35fc4483245'/>
<id>urn:sha1:1aaad49e856ce41adc07d8ae0c8ef35fc4483245</id>
<content type='text'>
When logging to console is disabled from userspace using klogctl()
and later re-enabled, console_loglevel gets set to the default
log level instead to the previous value.

This means that if the kernel was booted with 'quiet', the boot is
suddenly no longer quiet after logging to console gets re-enabled.

Save the current console_loglevel when logging is disabled and
restore to that value. If the log level is set to a specific value
while disabled, this is interpreted as an implicit re-enabling of
the logging.

The problem that prompted this patch is described in:

    http://lkml.org/lkml/2009/6/28/234

There are two variations possible on the patch below:

 1) If klogctl(7) is called while logging is not disabled, then set level
    to default (partially preserving current functionality):
  	case 7:		/* Enable logging to console */
 -		console_loglevel = default_console_loglevel;
 +		if (saved_console_loglevel == -1)
 +			console_loglevel = default_console_loglevel;
 +		else {
 +			console_loglevel = saved_console_loglevel;
 +			saved_console_loglevel = -1;
 +		}

 2) If klogctl(8) is called while logging is disabled, then don't enable
    logging, but remember the requested value for when logging does get
    enabled again:
  	case 8:		/* Set level of messages printed to console */
 [...]
 - 		console_loglevel = len;
 +		if (saved_console_loglevel == -1)
 +			console_loglevel = len;
 +		else
 +			saved_console_loglevel = len;

Yet another option would be to ignore the request.

Signed-off-by: Frans Pop &lt;elendil@planet.nl&gt;
Cc: cryptsetup@packages.debian.org
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
LKML-Reference: &lt;200907061331.49930.elendil@planet.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>printk: Ensure that "console enabled" messages are printed on the console</title>
<updated>2009-07-10T10:24:47Z</updated>
<author>
<name>Robin Getz</name>
<email>rgetz@blackfin.uclinux.org</email>
</author>
<published>2009-07-09T17:08:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8259cf4342029aad37660e524178c8858f48b0ab'/>
<id>urn:sha1:8259cf4342029aad37660e524178c8858f48b0ab</id>
<content type='text'>
Today, when a console is registered without CON_PRINTBUFFER,
end users never see the announcement of it being added, and
never know if they missed something, if the console is really
at the start or not, and just leads to general confusion.

This re-orders existing code, to make sure the console is
added, before the "console [%s%d] enabled" is printed out -
ensuring that this message is _always_ seen.

This has the desired/intended side effect of making sure that
"console enabled:" messages are printed on the bootconsole, and
the real console. This does cause the same line is printed
twice if the bootconsole and real console are the same device,
but if they are on different devices, the message is printed to
both consoles.

Signed-off-by : Robin Getz &lt;rgetz@blackfin.uclinux.org&gt;
Cc: "Andrew Morton" &lt;akpm@linux-foundation.org&gt;
Cc: "Linus Torvalds" &lt;torvalds@linux-foundation.org&gt;
LKML-Reference: &lt;200907091308.37370.rgetz@blackfin.uclinux.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>printk: Enable the use of more than one CON_BOOT (early console)</title>
<updated>2009-07-03T08:10:43Z</updated>
<author>
<name>Robin Getz</name>
<email>rgetz@blackfin.uclinux.org</email>
</author>
<published>2009-07-02T01:08:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d09161196c9a836eacea4b36e2f217bc34894cf'/>
<id>urn:sha1:4d09161196c9a836eacea4b36e2f217bc34894cf</id>
<content type='text'>
Today, register_console() assumes the following usage:

  - The first console to register with a flag set to CON_BOOT
    is the one and only bootconsole.

  - If another register_console() is called with an additional
    CON_BOOT, it is silently rejected.

  - As soon as a console without the CON_BOOT set calls
    registers the bootconsole is automatically unregistered.

  - Once there is a "real" console - register_console() will
    silently reject any consoles with it's CON_BOOT flag set.

In many systems (alpha, blackfin, microblaze, mips, powerpc,
sh, &amp; x86), there are early_printk implementations, which use
the CON_BOOT which come out serial ports, vga, usb, &amp; memory
buffers.

In many embedded systems, it would be nice to have two
bootconsoles - in case the primary fails, you always have
access to a backup memory buffer - but this requires at least
two CON_BOOT consoles...

This patch enables that functionality.

With the change applied, on boot you get (if you try to
re-enable a boot console after the "real" console has been
registered):

  root:/&gt; dmesg | grep console
  bootconsole [early_shadow0] enabled
  bootconsole [early_BFuart0] enabled
  Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 console=ttyBF0,57600 nmi_debug=regs
  console handover:boot [early_BFuart0] boot [early_shadow0]  -&gt; real [ttyBF0]
  Too late to register bootconsole early_shadow0

or:

  root:/&gt; dmesg | grep console
  Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600
  console [ttyBF0] enabled

Signed-off-by: Robin Getz &lt;rgetz@blackfin.uclinux.org&gt;
Cc: "Linus Torvalds" &lt;torvalds@linux-foundation.org&gt;
Cc: "Andrew Morton" &lt;akpm@linux-foundation.org&gt;
Cc: "Mike Frysinger" &lt;vapier.adi@gmail.com&gt;
Cc: "Paul Mundt" &lt;lethal@linux-sh.org&gt;
LKML-Reference: &lt;200907012108.38030.rgetz@blackfin.uclinux.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>printk: Add KERN_DEFAULT printk log-level</title>
<updated>2009-06-16T18:02:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-06-16T18:02:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e28d713704117bca0820c732210df6075b09f13b'/>
<id>urn:sha1:e28d713704117bca0820c732210df6075b09f13b</id>
<content type='text'>
This adds a KERN_DEFAULT loglevel marker, for when you cannot decide
which loglevel you want, and just want to keep an existing printk
with the default loglevel.

The difference between having KERN_DEFAULT and having no log-level
marker at all is two-fold:

 - having the log-level marker will now force a new-line if the
   previous printout had not added one (perhaps because it forgot,
   but perhaps because it expected a continuation)

 - having a log-level marker is required if you are printing out a
   message that otherwise itself could perhaps otherwise be mistaken
   for a log-level.

Signed-of-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>printk: clean up handling of log-levels and newlines</title>
<updated>2009-06-16T17:57:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-06-16T17:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5fd29d6ccbc98884569d6f3105aeca70858b3e0f'/>
<id>urn:sha1:5fd29d6ccbc98884569d6f3105aeca70858b3e0f</id>
<content type='text'>
It used to be that we would only look at the log-level in a printk()
after explicit newlines, which can cause annoying problems when the
previous printk() did not end with a '\n'. In that case, the log-level
marker would be just printed out in the middle of the line, and be
seen as just noise rather than change the logging level.

This changes things to always look at the log-level in the first
bytes of the printout. If a log level marker is found, it is always
used as the log-level. Additionally, if no newline existed, one is
added (unless the log-level is the explicit KERN_CONT marker, to
explicitly show that it's a continuation of a previous line).

Acked-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-04-05T17:23:25Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-04-05T17:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e4c393fd551654179c46b65e4a70ea20d831c783'/>
<id>urn:sha1:e4c393fd551654179c46b65e4a70ea20d831c783</id>
<content type='text'>
* 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  printk: correct the behavior of printk_timed_ratelimit()
  vsprintf: unify the format decoding layer for its 3 users, cleanup
  fix regression from "vsprintf: unify the format decoding layer for its 3 users"
  vsprintf: fix bug in negative value printing
  vsprintf: unify the format decoding layer for its 3 users
  vsprintf: add binary printf
  printk: introduce printk_once()

Fix trivial conflicts (printk_once vs log_buf_kexec_setup() added near
each other) in include/linux/kernel.h.
</content>
</entry>
</feed>
