debugfs_print_regs32(9)
π debugfs_print_regs32 β NAME β¨
ok so bestie, debugfs_print_regs32 is literally the function that uses seq_print to describe a set of registers π. that's the whole vibe. it prints out a whole text block describing what's currently sitting in your 32-bit hardware registers, no cap.
πΈ SYNOPSIS πΈ
void debugfs_print_regs32 (struct seq_file *s , const struct
debugfs_reg32 *regs , int nregs , void __iomem *base , char *prefix );
that's the whole signature, copy it exactly, don't @ me π
π¦ ARGUMENTS π¦
sβ theseq_filestructure that's being used to generate the output. it's the main character of the printing process, honestly πregsβ an array ifstruct debugfs_reg32structures. yes, the original says "an array if" and i'm not gonna fix it, that's just how it is π (it's an array of those structs, iykyk)nregsβ the length of the above array. so like, how many of those bad boys you're passing in π₯baseβ the base address that gets used when reading the registers. the starting point, the origin story, the home base πprefixβ a string that gets prefixed to every single output line. every. line. π
β¨ DESCRIPTION β¨
okay so here's the tea π: this function outputs a text block describing the current values of some 32-bit hardware registers.
it's meant to be used inside debugfs files that are based on seq_file, specifically the ones that need to show registers β and it can be intermixed with other information too, so you're not locked into registers-only content, you can sprinkle them in like little facts β¨
now the prefix argument, bestie, this one's lowkey important π«Ά: it may be used to specify a leading string. why? because some peripherals have several blocks of identical registers β like, for example, the configuration of dma channels π. so without a prefix you'd have no idea which identical-looking block you're actually looking at, and that's giving chaos π. prefix saves you. prefix is the icon.
π SEE ALSO π
okay the full reference list, and yes i'm listing every single one because we don't skip entries in this house π
Kernel file ./fs/debugfs/file.c and also:
debugfs_file_get(9)debugfs_file_put(9)debugfs_enter_cancellation(9)debugfs_leave_cancellation(9)debugfs_create_u8(9)debugfs_create_u16(9)debugfs_create_u32(9)debugfs_create_u64(9)debugfs_create_ulong(9)debugfs_create_x8(9)debugfs_create_x16(9)debugfs_create_x32(9)debugfs_create_x64(9)debugfs_create_size_t(9)debugfs_create_atomic_t(9)debugfs_create_bool(9)debugfs_create_str(9)debugfs_create_blob(9)debugfs_create_u32_array(9)debugfs_create_regset32(9)debugfs_create_devm_seqfile(9)
like, that's the whole friend group right there π
this page lives in the Kernel API Manual β that's the manual name, folding it in here so you have it π«Ά
and that's the page, bestie!! πΈ this very manual came from the source ./fs/debugfs, and it's dated October 2026 β so yeah, it's from the future, we stan a forward-thinking manpage π§π periodt β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms