* [PATCH] x86/efi: Preface all print statements with efi* tag
@ 2015-10-25 10:26 Matt Fleming
2015-10-25 10:39 ` Josh Triplett
0 siblings, 1 reply; 2+ messages in thread
From: Matt Fleming @ 2015-10-25 10:26 UTC (permalink / raw)
To: linux-efi-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matt Fleming,
Borislav Petkov, Josh Triplett
The pr_*() calls in the x86 EFI code may or may not include a
subsystem tag, which makes it difficult to grep the kernel log for all
relevant EFI messages and leads users to miss important information.
Recently, a bug reporter provided all the EFI print messages from the
kernel log when trying to diagnose an issue but missed the following
statement because it wasn't prefixed with anything indicating it was
related to EFI,
pr_err("Error ident-mapping new memmap (0x%lx)!\n", pa_memmap);
Cc: Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>
Cc: Josh Triplett <josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org>
Signed-off-by: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
---
arch/x86/platform/efi/efi-bgrt.c | 3 +++
arch/x86/platform/efi/efi_64.c | 2 ++
arch/x86/platform/efi/quirks.c | 4 +++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c
index ea48449b2e63..9a52b5c4438f 100644
--- a/arch/x86/platform/efi/efi-bgrt.c
+++ b/arch/x86/platform/efi/efi-bgrt.c
@@ -10,6 +10,9 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/acpi.h>
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index a0ac0f9c307f..d347e854a5e4 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -15,6 +15,8 @@
*
*/
+#define pr_fmt(fmt) "efi: " fmt
+
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mm.h>
diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index 1c7380da65ff..6452070f3025 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) "efi: " fmt
+
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
@@ -256,7 +258,7 @@ void __init efi_apply_memmap_quirks(void)
* services.
*/
if (!efi_runtime_supported()) {
- pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
+ pr_info("Setup done, disabling due to 32/64-bit mismatch\n");
efi_unmap_memmap();
}
--
2.6.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/efi: Preface all print statements with efi* tag
2015-10-25 10:26 [PATCH] x86/efi: Preface all print statements with efi* tag Matt Fleming
@ 2015-10-25 10:39 ` Josh Triplett
0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2015-10-25 10:39 UTC (permalink / raw)
To: Matt Fleming; +Cc: linux-efi, linux-kernel, Borislav Petkov
On Sun, Oct 25, 2015 at 10:26:35AM +0000, Matt Fleming wrote:
> The pr_*() calls in the x86 EFI code may or may not include a
> subsystem tag, which makes it difficult to grep the kernel log for all
> relevant EFI messages and leads users to miss important information.
>
> Recently, a bug reporter provided all the EFI print messages from the
> kernel log when trying to diagnose an issue but missed the following
> statement because it wasn't prefixed with anything indicating it was
> related to EFI,
>
> pr_err("Error ident-mapping new memmap (0x%lx)!\n", pa_memmap);
>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Josh Triplett <josh@joshtriplett.org>
> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Good call.
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> ---
> arch/x86/platform/efi/efi-bgrt.c | 3 +++
> arch/x86/platform/efi/efi_64.c | 2 ++
> arch/x86/platform/efi/quirks.c | 4 +++-
> 3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c
> index ea48449b2e63..9a52b5c4438f 100644
> --- a/arch/x86/platform/efi/efi-bgrt.c
> +++ b/arch/x86/platform/efi/efi-bgrt.c
> @@ -10,6 +10,9 @@
> * it under the terms of the GNU General Public License version 2 as
> * published by the Free Software Foundation.
> */
> +
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include <linux/kernel.h>
> #include <linux/init.h>
> #include <linux/acpi.h>
> diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
> index a0ac0f9c307f..d347e854a5e4 100644
> --- a/arch/x86/platform/efi/efi_64.c
> +++ b/arch/x86/platform/efi/efi_64.c
> @@ -15,6 +15,8 @@
> *
> */
>
> +#define pr_fmt(fmt) "efi: " fmt
> +
> #include <linux/kernel.h>
> #include <linux/init.h>
> #include <linux/mm.h>
> diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
> index 1c7380da65ff..6452070f3025 100644
> --- a/arch/x86/platform/efi/quirks.c
> +++ b/arch/x86/platform/efi/quirks.c
> @@ -1,3 +1,5 @@
> +#define pr_fmt(fmt) "efi: " fmt
> +
> #include <linux/init.h>
> #include <linux/kernel.h>
> #include <linux/string.h>
> @@ -256,7 +258,7 @@ void __init efi_apply_memmap_quirks(void)
> * services.
> */
> if (!efi_runtime_supported()) {
> - pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
> + pr_info("Setup done, disabling due to 32/64-bit mismatch\n");
> efi_unmap_memmap();
> }
>
> --
> 2.6.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-25 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-25 10:26 [PATCH] x86/efi: Preface all print statements with efi* tag Matt Fleming
2015-10-25 10:39 ` Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).