ddw_read_ext(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ddw_read_ext(9) β€” your fave Kernel API Manual page, now with ✨vibes✨

okay so bestie, welcome to ddw_read_ext(9) β€” yes that's the manual name, yes it's a mouthful, no we're not changing it. this is the little kernel helper that goes and fetches you the value of an DDW extension. it's giving "small function, big plot" honestly πŸŽ€


🌸 NAME 🌸

ddw_read_ext β€” Get the value of an DDW extension.

like literally that's the whole job. iconic.


✨ SYNOPSIS ✨

int ddw_read_ext (const struct device_node *np , int extnum , u32 *value
);

three arguments, one int coming back at you, no cap. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • np β€” the device node from which the extension value is to be read. this is the friend you're asking for the tea. 🫢
  • extnum β€” index number of the extension. basically which slot in the list you're peeking at, bestie. πŸ”
  • value β€” pointer to return value, modified when extension is available. so it doesn't just hold the value, it gets updated when that extension is actually there. πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so here's the lore: it checks if "ibm,ddw-extensions" exists for this node, and gets the value on index 'extnum'. that's it, that's the whole function, and honestly it ate. πŸ“

and listen β€” the way it's also useful just for checking whether a property exists at all? you do that by passing value == NULL. literally a vibe check for properties, iykyk. ⭐


πŸ”₯ RETURN πŸ”₯

  • 0 β€” if extension successfully read. slay, everything worked. πŸ’š
  • -EINVAL β€” returned if the "ibm,ddw-extensions" does not exist. it's not there, bestie. πŸ’€
  • -ENODATA β€” returned if "ibm,ddw-extensions" does not have a value. exists but empty, the worst kind of situation. 😭
  • -EOVERFLOW β€” returned if "ibm,ddw-extensions" does not contain this extension. you asked for a slot that isn't in the list. πŸ™ˆ
fr fr check these return codes, don't just assume it worked. that's the main character move here. πŸ’…

🌈 SEE ALSO 🌈

  • Kernel file ./arch/powerpc/platforms/pseries/iommu.c β€” go read it, that's where the whole situation lives. πŸ‘‘

🧚 and that's the page!! brought to you by the fine folks over at ./arch/powerpc/platforms/pseries, dated October 2026, in the Kernel API Manual. mwah, go read some kernel source, ily, bye bestie πŸ’œβœ¨

πŸ“¦ where this page comes from