tm_spr_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tm_spr_get(9) β€” like, the Kernel API Manual page, bestie πŸŽ€

Okay so picture this: you're deep in the 9 section of the Kernel API Manual, and the page you've pulled up is tm_spr_get. That's the one. Let's get into it πŸ’–


✨ NAME ✨

tm_spr_get β€” it gets the TM related SPR registers. That's the whole vibe. TM SPRs, retrieved, done 🫢


⭐ SYNOPSIS ⭐

int tm_spr_get (struct task_struct *target , const struct user_regset
*regset , struct membuf to );

That's the signature, no cap. Returns an int, takes three things. Keep scrolling for the tea on each one πŸ‘‘


🌸 ARGUMENTS 🌸

  • target β€” the target task. Like, which task are we doing this for? That one. 🎯
  • regset β€” the user regset structure. It's the structure, she's a regset, she's for users. πŸ’…
  • to β€” destination of copy. Where the stuff lands. The drop-off spot πŸ“¦

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does this function actually do? It gets transactional memory related SPR registers. Literally that. Transactional memory, SPR registers, obtained πŸ”₯

And here's the part you actually need if you're writing the userspace side β€” the userspace interface buffer layout is, and I quote, exactly this:

struct {
    u64    tm_tfhar;
    u64    tm_texasr;
    u64    tm_tfiar;
};

Three u64s. tm_tfhar, tm_texasr, tm_tfiar. That's the whole buffer, that's the layout, memorize it or screenshot it idk πŸ“Έ


🌈 SEE ALSO 🌈

Kernel file ./arch/powerpc/kernel/ptrace/ptrace-tm.c β€” that's where she lives, go say hi 🧚

And the whole friend group, all in section 9:

Like, the entire _active / _get / _set cinematic universe. Watch them all in order, it's giving saga πŸ’€βœ¨


Fr fr though: read the sibling pages before you go poking at this one. They're all listed above, they're all in section 9, and they all live next door in ./arch/powerpc/kernel/ptrace/ptrace-tm.c. Iykyk πŸŽ€

And that's the page!! Sourced from ./arch/powerpc/kernel/ptrace, dated October 2026, filed under tm_spr_get(9) β€” go forth and get those SPRs, bestie πŸ’œπŸ‘‘πŸŒŸ

πŸ“¦ where this page comes from