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
This commit is contained in:
Jean-Sébastien Pédron
2026-03-03 00:50:55 +01:00
parent 5625130425
commit f2ad06a080
@@ -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