Date: Wed, 22 Apr 2026 21:08:16 +0000 From: Bjoern A. Zeeb <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org> Subject: git: 4533982f8669 - stable/15 - linuxkpi: Add <linux/kmsg_dump.h> Message-ID: <69e938c0.27d32.6a4f59fa@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4533982f86694558c9766b1fd55c98da1b406f0f commit 4533982f86694558c9766b1fd55c98da1b406f0f Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> AuthorDate: 2025-08-12 22:02:18 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2026-04-22 20:56:57 +0000 linuxkpi: Add <linux/kmsg_dump.h> This header declares register/unregister functions to allow a piece of code to tell what function to call in case of a panic. Several panic handlers may be registered. The DRM generic code started to use it in Linux 6.10 as part of the panic handler. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54492 (cherry picked from commit e86e4f161e7232b7ac19af906368c664d6167cdc) --- .../linuxkpi/common/include/linux/kmsg_dump.h | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h new file mode 100644 index 000000000000..25f96b304f59 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h @@ -0,0 +1,51 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron <dumbbell@FreeBSD.org> + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_KMSG_DUMP_H_ +#define _LINUXKPI_LINUX_KMSG_DUMP_H_ + +#include <linux/errno.h> +#include <linux/list.h> + +#include <linux/kernel.h> /* For pr_debug() */ + +enum kmsg_dump_reason { + KMSG_DUMP_UNDEF, + KMSG_DUMP_PANIC, + KMSG_DUMP_OOPS, + KMSG_DUMP_EMERG, + KMSG_DUMP_SHUTDOWN, + KMSG_DUMP_MAX +}; + +struct kmsg_dumper { + struct list_head list; + void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason); + enum kmsg_dump_reason max_reason; + bool registered; +}; + +static inline int +kmsg_dump_register(struct kmsg_dumper *dumper) +{ + pr_debug("TODO"); + + return (-EINVAL); +} + +static inline int +kmsg_dump_unregister(struct kmsg_dumper *dumper) +{ + pr_debug("TODO"); + + return (-EINVAL); +} + +#endifhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e938c0.27d32.6a4f59fa>
