tm_spr_get(9)
π 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:
tm_cgpr_active(9)tm_cgpr_get(9)tm_cfpr_active(9)tm_cfpr_get(9)tm_cfpr_set(9)tm_cvmx_active(9)tm_cvmx_get(9)tm_cvmx_set(9)tm_cvsx_active(9)tm_cvsx_get(9)tm_cvsx_set(9)tm_spr_active(9)tm_spr_set(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
- 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