ddw_read_ext(9)
π 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
- 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