All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec: add kexec flag to support debug printing
@ 2025-11-04  2:59 Qiang Ma
  2025-11-11 13:49 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Qiang Ma @ 2025-11-04  2:59 UTC (permalink / raw)
  To: kexec; +Cc: horms, bhe, Qiang Ma

This add KEXEC_DEBUG to kexec_flags so that it can be passed
to kernel when '-d' is added with kexec_load interface. With that
flag enabled, kernel can enable the debugging message printing.

This patch requires support from the kexec_load debugging message
of the Linux kernel[1].

[1]: https://lore.kernel.org/kexec/20251103063440.1681657-1-maqianga@uniontech.com/

Signed-off-by: Qiang Ma <maqianga@uniontech.com>
---
 kexec/kexec-syscall.h | 1 +
 kexec/kexec.c         | 1 +
 2 files changed, 2 insertions(+)

diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
index e9bb7de..b60804f 100644
--- a/kexec/kexec-syscall.h
+++ b/kexec/kexec-syscall.h
@@ -120,6 +120,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
 #define KEXEC_PRESERVE_CONTEXT	0x00000002
 #define KEXEC_UPDATE_ELFCOREHDR	0x00000004
 #define KEXEC_CRASH_HOTPLUG_SUPPORT	0x00000008
+#define KEXEC_DEBUG		0x00000010
 #define KEXEC_ARCH_MASK		0xffff0000
 
 /* Flags for kexec file based system call */
diff --git a/kexec/kexec.c b/kexec/kexec.c
index c9e4bcb..f425422 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1518,6 +1518,7 @@ int main(int argc, char *argv[])
 			return 0;
 		case OPT_DEBUG:
 			kexec_debug = 1;
+			kexec_flags |= KEXEC_DEBUG;
 			kexec_file_flags |= KEXEC_FILE_DEBUG;
 			break;
 		case OPT_NOIFDOWN:
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kexec: add kexec flag to support debug printing
  2025-11-04  2:59 [PATCH] kexec: add kexec flag to support debug printing Qiang Ma
@ 2025-11-11 13:49 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2025-11-11 13:49 UTC (permalink / raw)
  To: Qiang Ma; +Cc: kexec, bhe

On Tue, Nov 04, 2025 at 10:59:59AM +0800, Qiang Ma wrote:
> This add KEXEC_DEBUG to kexec_flags so that it can be passed
> to kernel when '-d' is added with kexec_load interface. With that
> flag enabled, kernel can enable the debugging message printing.
> 
> This patch requires support from the kexec_load debugging message
> of the Linux kernel[1].
> 
> [1]: https://lore.kernel.org/kexec/20251103063440.1681657-1-maqianga@uniontech.com/
> 
> Signed-off-by: Qiang Ma <maqianga@uniontech.com>

Thanks, applied.

- kexec: add kexec flag to support debug printing
  https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=71d6fd99af7e


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-11 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04  2:59 [PATCH] kexec: add kexec flag to support debug printing Qiang Ma
2025-11-11 13:49 ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.