Page MenuHomeFreeBSD

linuxkpi: Add `seq_hex_dump()`
AbandonedPublic

Authored by dumbbell on Mar 15 2025, 11:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 14, 10:50 AM
Unknown Object (File)
Mon, Apr 7, 11:35 AM
Unknown Object (File)
Fri, Apr 4, 5:04 AM
Unknown Object (File)
Fri, Apr 4, 4:49 AM
Unknown Object (File)
Thu, Apr 3, 7:24 PM
Unknown Object (File)
Mon, Mar 31, 8:08 AM
Unknown Object (File)
Fri, Mar 21, 10:02 AM
Unknown Object (File)
Tue, Mar 18, 10:08 PM
Subscribers

Details

Reviewers
bz
Group Reviewers
linuxkpi
Summary

It is a copy of print_hex_dump() but uses a struct sbuf as the destination.

The amdgpu DRM driver started to use it in Linux 6.8.

This is part of the update of DRM drivers to Linux 6.8.

Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Alternatively I quickly hacked this up -- I don't know which one would be preferable: https://reviews.freebsd.org/D49637

sys/compat/linuxkpi/common/src/linux_seq_file.c
317

For all of these printfs with prefix_str you need an extra %s and check (prefix_str != NULL) ? " " : "" to get the extra space after

320

I think the original implementation of print_hex_dump() got switched to #tx on purpose

bz requested changes to this revision.Wed, Apr 2, 6:15 PM
This revision now requires changes to proceed.Wed, Apr 2, 6:15 PM