From: Jean Delvare <jdelvare@suse.de>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
Mark Rutland <mark.rutland@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] firmware: dmi_scan: Always show system identification string
Date: Tue, 13 Dec 2016 15:42:45 +0100 [thread overview]
Message-ID: <1481640165.4190.11.camel@chaos.suse> (raw)
In-Reply-To: <CAKv+Gu8HnH5mxxLvxNRqOm5vDYaU8ULX6kz=2RbbFqQ83Z5D0Q@mail.gmail.com>
On mar., 2016-12-13 at 14:25 +0000, Ard Biesheuvel wrote:
> On 12 December 2016 at 01:51, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> >
> >
> > On 2016/12/9 22:55, Ard Biesheuvel wrote:
> >> On 9 December 2016 at 06:54, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> >>> Let's keep consistent when print dmi_ids_string between SMBIOS 2.x
> >>> and SMBIOS 3.x, and always show the system identification string,
> >>> like Vendor, Product/Board name and BIOS infos.
> >>>
> >>
> >> Are you saying the printk(KERN_DEBUG) was inconsistent with the
> >> pr_debug() before?
> >
> > Yes, found it when check the boot dmesg on qemu, there is no print using pr_debug
> > with defconfig on ARM64( smbios3 present), but could shown with printk(KERN_DEBUG.
> >
>
> That's interesting. I would assume pr_debug and printk(KERN_DEBUG) to
> behave identically ...
And you'd be wrong ;-)
>From include/linux/printk.h:
304 #if defined(CONFIG_DYNAMIC_DEBUG)
305 #include <linux/dynamic_debug.h>
306
307 /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
308 #define pr_debug(fmt, ...) \
309 dynamic_pr_debug(fmt, ##__VA_ARGS__)
310 #elif defined(DEBUG)
311 #define pr_debug(fmt, ...) \
312 printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
313 #else
314 #define pr_debug(fmt, ...) \
315 no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
316 #endif
Which basically means that pr_debug() has no effect unless debugging is
actually enabled, while printk(KERN_DEBUG ...) is always printed by the
kernel (with a log level which may or may not make it to a specific
output.)
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2016-12-13 14:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 6:54 [PATCH] firmware: dmi_scan: Always show system identification string Kefeng Wang
2016-12-09 14:55 ` Ard Biesheuvel
2016-12-12 1:51 ` Kefeng Wang
2016-12-13 14:25 ` Ard Biesheuvel
2016-12-13 14:42 ` Jean Delvare [this message]
2016-12-13 14:43 ` Ard Biesheuvel
2016-12-09 15:30 ` Jean Delvare
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=1481640165.4190.11.camel@chaos.suse \
--to=jdelvare@suse.de \
--cc=ard.biesheuvel@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=wangkefeng.wang@huawei.com \
/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