aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2026-03-02 23:50:55 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2026-04-06 19:28:08 +0000
commitf2ad06a0801aaa987a40b8374b6baa8f510cb77a (patch)
treeea0b4854c1c6e8ae294c655a2c640a44597efccc
parent56251304258a50fe31bac5cd7da74a4d25497606 (diff)
linuxkpi: Add mising functions in <linux/kmsg_dump.h>
The DRM generic code started to use `kmsg_dump_get_buffer()` and `kmsg_dump_rewind()` in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55732
-rw-r--r--sys/compat/linuxkpi/common/include/linux/kmsg_dump.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
index 25f96b304f59..539981c54d1b 100644
--- a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
+++ b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
@@ -25,6 +25,11 @@ enum kmsg_dump_reason {
KMSG_DUMP_MAX
};
+struct kmsg_dump_iter {
+ uint64_t cur_seq;
+ uint64_t next_seq;
+};
+
struct kmsg_dumper {
struct list_head list;
void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason);
@@ -32,6 +37,36 @@ struct kmsg_dumper {
bool registered;
};
+static inline void
+kmsg_dump(enum kmsg_dump_reason reason)
+{
+ pr_debug("TODO");
+}
+
+static inline bool
+kmsg_dump_get_line(struct kmsg_dump_iter *iter, bool syslog,
+ const char *line, size_t size, size_t *len)
+{
+ pr_debug("TODO");
+
+ return (false);
+}
+
+static inline bool
+kmsg_dump_get_buffer(struct kmsg_dump_iter *iter, bool syslog,
+ char *buf, size_t size, size_t *len)
+{
+ pr_debug("TODO");
+
+ return (false);
+}
+
+static inline void
+kmsg_dump_rewind(struct kmsg_dump_iter *iter)
+{
+ pr_debug("TODO");
+}
+
static inline int
kmsg_dump_register(struct kmsg_dumper *dumper)
{
@@ -48,4 +83,11 @@ kmsg_dump_unregister(struct kmsg_dumper *dumper)
return (-EINVAL);
}
+static inline const char *
+kmsg_dump_reason_str(enum kmsg_dump_reason reason)
+{
+ pr_debug("TODO");
+
+ return ("Unknown");
+}
#endif