kexec: Use file name as the output message prefix
Subsystems (3)
PATCH v2 1/1 kexec: Use file name as the output message prefix
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. Now, we use file name as the output message prefix.
Currectly, the format of output message:
[ 140.290795] SYSC_kexec_load: hello, world [ 140.291534] kexec: sanity_check_segment_list: hello, world
Ideally, the format of output message:
[ 30.791503] kexec: SYSC_kexec_load, Hello, world [ 79.182752] kexec_core: sanity_check_segment_list, Hello, world
Remove the custom prefix "kexec" in output message.
---
v2: Use KBUILD_MODNAME as prefix, instead of custom string "kexec"
--- kernel/kexec.c | 2 ++ kernel/kexec_core.c | 4 ++-- kernel/kexec_file.c | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-)
kernel/kexec.c +2 -0
@@ -18,6 +18,8 @@#include "kexec_internal.h" +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +static int copy_user_segment_list (struct kimage *image,unsigned long nr_segments,struct kexec_segment __user *segments)
kernel/kexec_core.c +2 -2
@@ -6,7 +6,7 @@* Version 2. See the file COPYING for more details. */ -#define pr_fmt (fmt) "kexec: " fmt +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/capability.h> #include <linux/mm.h>
@@ -1027,7 +1027,7 @@ static int __init crash_notes_memory_init(void) crash_notes =__alloc_percpu (size, align);if (!crash_notes) { -pr_warn ("Kexec: Memory allocation for saving cpu register states failed\n" ); +pr_warn ("Memory allocation for saving cpu register states failed\n" );return -ENOMEM ; }return 0 ;
kernel/kexec_file.c +2 -0
@@ -22,6 +22,8 @@#include <linux/vmalloc.h> #include "kexec_internal.h" +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +/* * Declare these symbols weak so that if architecture provides a purgatory, * these will be overridden.
Signature · 1 line
1.9.1
Quoted 27 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. Now, we use file name as the output message prefix.
Currectly, the format of output message:
[ 140.290795] SYSC_kexec_load: hello, world [ 140.291534] kexec: sanity_check_segment_list: hello, worldIdeally, the format of output message:
[ 30.791503] kexec: SYSC_kexec_load, Hello, world [ 79.182752] kexec_core: sanity_check_segment_list, Hello, worldRemove the custom prefix "kexec" in output message.
Signed-off-by Minfei Huang <[email protected]>---
v2: UseKBUILD_MODNAMEas prefix, instead of custom string "kexec"--- kernel/kexec.c | 2 ++ kernel/kexec_core.c | 4 ++-- kernel/kexec_file.c | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-)kernel/kexec.c +0
-0
kernel/kexec.c line 22
Quoted 5 lines
kernel/kexec.c +2
-0@@ -18,6 +18,8 @@#include "kexec_internal.h" +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +
Move the micro to the top of the c file is better, ditto for other two files.
Otherwise:
Quoted 41 lines
kernel/kexec.c +0
-0static int copy_user_segment_list (struct kimage *image,unsigned long nr_segments,struct kexec_segment __user *segments)kernel/kexec_core.c +2
-2@@ -6,7 +6,7 @@* Version 2. See the file COPYING for more details. */ -#define pr_fmt (fmt) "kexec: " fmt +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/capability.h> #include <linux/mm.h> @@ -1027,7 +1027,7 @@ static int __init crash_notes_memory_init(void) crash_notes =__alloc_percpu (size, align);if (!crash_notes) { -pr_warn ("Kexec: Memory allocation for saving cpu register states failed\n" ); +pr_warn ("Memory allocation for saving cpu register states failed\n" );return -ENOMEM ; }return 0 ;kernel/kexec_file.c +2
-0@@ -22,6 +22,8 @@#include <linux/vmalloc.h> #include "kexec_internal.h" +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +/* * Declare these symbols weak so that if architecture provides a purgatory, * these will be overridden. Signature · 1 line
1.9.1
Thanks
Dave
Quoted 5 lines · Dave Young
Quoted 4 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. Now, we use file name as the output message prefix.
Currectly, the format of output message:
s/Currectly/Currently
Quoted 24 lines
Quoted 24 lines
[ 140.290795] SYSC_kexec_load: hello, world [ 140.291534] kexec: sanity_check_segment_list: hello, worldIdeally, the format of output message:
[ 30.791503] kexec: SYSC_kexec_load, Hello, world [ 79.182752] kexec_core: sanity_check_segment_list, Hello, worldRemove the custom prefix "kexec" in output message.
Signed-off-by Minfei Huang <[email protected]>---
v2: UseKBUILD_MODNAMEas prefix, instead of custom string "kexec"--- kernel/kexec.c | 2 ++ kernel/kexec_core.c | 4 ++-- kernel/kexec_file.c | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-)kernel/kexec.c +0
-0@@ -18,6 +18,8 @@
Quoted 6 lines
kernel/kexec.c line 22
Quoted 4 lines
kernel/kexec.c +2
-0#include "kexec_internal.h" +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +Move the micro to the top of the c file is better, ditto for other two files.
s/micro/macro
Quoted 4 lines
Otherwise:
Acked-by Dave Young <[email protected]>
Quoted 33 lines · Dave Young
Quoted 5 lines · Dave Young
Quoted 4 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. Now, we use file name as the output message prefix.
Currectly, the format of output message:
s/Currectly/Currently
Quoted 24 lines
Quoted 24 lines
[ 140.290795] SYSC_kexec_load: hello, world [ 140.291534] kexec: sanity_check_segment_list: hello, worldIdeally, the format of output message:
[ 30.791503] kexec: SYSC_kexec_load, Hello, world [ 79.182752] kexec_core: sanity_check_segment_list, Hello, worldRemove the custom prefix "kexec" in output message.
Signed-off-by Minfei Huang <[email protected]>---
v2: UseKBUILD_MODNAMEas prefix, instead of custom string "kexec"--- kernel/kexec.c | 2 ++ kernel/kexec_core.c | 4 ++-- kernel/kexec_file.c | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-)kernel/kexec.c +0
-0@@ -18,6 +18,8 @@
Quoted 9 lines
Quoted 6 lines
kernel/kexec.c line 22
Quoted 4 lines
kernel/kexec.c +2
-0#include "kexec_internal.h" +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +Move the micro to the top of the c file is better, ditto for other two files.
s/micro/macro
Thanks, Dave.
I will post next version to correct them.
Thanks
Minfei
Quoted 4 lines
Quoted 4 lines
Otherwise:
Acked-by Dave Young <[email protected]>