From 6778948f9de86c3cfaf36725a7c87dcff9ba247f Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 11 Dec 2023 08:20:59 +0000 Subject: [PATCH] kernel_5.10 no rt --- kernel/arch/um/kernel/kmsg_dump.c | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/kernel/arch/um/kernel/kmsg_dump.c b/kernel/arch/um/kernel/kmsg_dump.c index 1739994..e4abac6 100644 --- a/kernel/arch/um/kernel/kmsg_dump.c +++ b/kernel/arch/um/kernel/kmsg_dump.c @@ -1,19 +1,15 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/kmsg_dump.h> -#include <linux/spinlock.h> #include <linux/console.h> #include <shared/init.h> #include <shared/kern.h> #include <os.h> static void kmsg_dumper_stdout(struct kmsg_dumper *dumper, - enum kmsg_dump_reason reason, - struct kmsg_dumper_iter *iter) + enum kmsg_dump_reason reason) { - static DEFINE_SPINLOCK(lock); static char line[1024]; struct console *con; - unsigned long flags; size_t len = 0; /* only dump kmsg when no console is available */ @@ -28,16 +24,11 @@ if (con) return; - if (!spin_trylock_irqsave(&lock, flags)) - return; - printf("kmsg_dump:\n"); - while (kmsg_dump_get_line(iter, true, line, sizeof(line), &len)) { + while (kmsg_dump_get_line(dumper, true, line, sizeof(line), &len)) { line[len] = '\0'; printf("%s", line); } - - spin_unlock_irqrestore(&lock, flags); } static struct kmsg_dumper kmsg_dumper = { -- Gitblit v1.6.2