]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/kernel/cpu/common.c
x86, CPU: Fix trivial printk formatting issues with dmesg
authorSteven Honeyman <stevenhoneyman@gmail.com>
Wed, 5 Nov 2014 22:52:18 +0000 (22:52 +0000)
committerBorislav Petkov <bp@suse.de>
Sun, 11 Jan 2015 00:54:54 +0000 (01:54 +0100)
commitf94fe119f2e53362a3038ee856fa58412f728bc9
treef867c3d09563112495ee7fb950678016501129b3
parentb1940cd21c0f4abdce101253e860feff547291b0
x86, CPU: Fix trivial printk formatting issues with dmesg

dmesg (from util-linux) currently has two methods for reading the kernel
message ring buffer: /dev/kmsg and syslog(2). Since kernel 3.5.0 kmsg
has been the default, which escapes control characters (e.g. new lines)
before they are shown.

This change means that when dmesg is using /dev/kmsg, a 2 line printk
makes the output messy, because the second line does not get a
timestamp.

For example:

[    0.012863] CPU0: Thermal monitoring enabled (TM1)
[    0.012869] Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024
Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4
[    0.012958] Freeing SMP alternatives memory: 28K (ffffffff81d86000 - ffffffff81d8d000)
[    0.014961] dmar: Host address width 39

Because printk.c intentionally escapes control characters, they should
not be there in the first place. This patch fixes two occurrences of
this.

Signed-off-by: Steven Honeyman <stevenhoneyman@gmail.com>
Link: https://lkml.kernel.org/r/1414856696-8094-1-git-send-email-stevenhoneyman@gmail.com
[ Boris: make cpu_detect_tlb() static, while at it. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/intel.c