From: Ingo Molnar <mingo@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andy Lutomirski <luto@amacapital.net>,
Borislav Petkov <bp@alien8.de>, "H . Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH 5/5] x86/boot: Fix pr_debug() API braindamage
Date: Wed, 1 Feb 2017 10:51:17 +0100 [thread overview]
Message-ID: <1485942677-19973-6-git-send-email-mingo@kernel.org> (raw)
In-Reply-To: <1485942677-19973-1-git-send-email-mingo@kernel.org>
From: Borislav Petkov <bp@alien8.de>
What looked like a straightforward conversion from printk(KERN_DEBUG, ...)
to pr_debug() broke the boot log output:
DMI: /M57SLI-S4, BIOS FF 01/24/2008
-e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
-e820: remove [mem 0x000a0000-0x000fffff] usable
+usable ==> reserved
+usable
e820: last_pfn = 0x230000 max_arch_pfn = 0x400000000
...
x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT
-e820: update [mem 0xd0000000-0xffffffff] usable ==> reserved
+usable ==> reserved
i.e. spurious (and nonsensical) kernel log entries were created...
We need a pr_debug_and_I_mean_it() function which does nothing but
printk(KERN_DEBUG...
Signed-off-by: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
[ Wrote changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/e820.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index e2fb20ac5135..6e9b26fa6d05 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -411,7 +411,7 @@ __e820__range_update(struct e820_table *table, u64 start, u64 size, enum e820_ty
size = ULLONG_MAX - start;
end = start + size;
- pr_debug("e820: update [mem %#010Lx-%#010Lx] ", start, end - 1);
+ printk(KERN_DEBUG "e820: update [mem %#010Lx-%#010Lx] ", start, end - 1);
e820_print_type(old_type);
pr_cont(" ==> ");
e820_print_type(new_type);
@@ -487,7 +487,7 @@ u64 __init e820__range_remove(u64 start, u64 size, enum e820_type old_type, bool
size = ULLONG_MAX - start;
end = start + size;
- pr_debug("e820: remove [mem %#010Lx-%#010Lx] ", start, end - 1);
+ printk(KERN_DEBUG "e820: remove [mem %#010Lx-%#010Lx] ", start, end - 1);
if (check_type)
e820_print_type(old_type);
pr_cont("\n");
@@ -1121,7 +1121,7 @@ void __init e820__reserve_resources_late(void)
if (start >= end)
continue;
- pr_debug("e820: reserve RAM buffer [mem %#010llx-%#010llx]\n", start, end);
+ printk(KERN_DEBUG "e820: reserve RAM buffer [mem %#010llx-%#010llx]\n", start, end);
reserve_region_with_split(&iomem_resource, start, end, "RAM buffer");
}
}
--
2.7.4
next prev parent reply other threads:[~2017-02-01 9:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 9:51 [PATCH 0/5] x86: Clean up and reorganize the E820 table handling code, #updates Ingo Molnar
2017-02-01 9:51 ` [PATCH 1/5] x86/boot/e820: Fix and clean up e820_type switch() statements Ingo Molnar
2017-02-01 9:51 ` [PATCH 2/5] x86/boot/e820: Separate the E820 ABI structures from the in-kernel structures Ingo Molnar
2017-02-01 9:51 ` [PATCH 3/5] x86/boot/e820: Simplify e820__update_table() Ingo Molnar
2017-02-01 9:51 ` [PATCH 4/5] xen, x86/headers: Add <linux/device.h> dependency to <asm/xen/page.h> Ingo Molnar
2017-02-01 10:00 ` Juergen Gross
2017-02-01 10:08 ` Ingo Molnar
2017-02-01 9:51 ` Ingo Molnar [this message]
2017-02-01 11:57 ` [PATCH 5/5] x86/boot: Fix pr_debug() API braindamage Joe Perches
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=1485942677-19973-6-git-send-email-mingo@kernel.org \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yinghai@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