devm_cpm_muram_alloc_fixed(9)
π devm_cpm_muram_alloc_fixed(9)
okay so bestie, welcome to the Kernel API Manual β this is the page for devm_cpm_muram_alloc_fixed, and honestly? it's giving "quietly iconic helper function" energy. let's get into it π
β¨ NAME β¨
devm_cpm_muram_alloc_fixed β the resource-managed version of cpm_muram_alloc_fixed, and yes the "devm" prefix is the whole personality here π«Ά
πΈ SYNOPSIS πΈ
s32 devm_cpm_muram_alloc_fixed (struct device *dev , unsigned long
offset , unsigned long size );
literally just three args, no cap. look at it, so clean β¨
π¦ ARGUMENTS π¦
devβ the device you're allocating memory for. it's the main character here, fr fr πoffsetβ the offset of the allocation start address. like, where the vibe begins πsizeβ number of bytes to allocate. pick your number, bestie π’
π DESCRIPTION π
so here's the tea β β this function returns a non-negative offset into the muram area, or a negative errno on failure, exactly like cpm_muram_alloc_fixed does. then you use cpm_muram_addr to get the virtual address of the area. iykyk π
now compare it against cpm_muram_alloc_fixed (the non-managed one, the one without the glow-up): the memory allocated by this resource-managed version is automatically freed on driver detach. so likeβ¦ the cleanup is handled for you, no extra steps, she's self-sufficient π§
β οΈ and because of that: cpm_muram_free must not be called to release the allocated memory. do NOT double-free, bestie, that's not the vibe π the devm machinery already ate that task
β SEE ALSO β
kernel file ./drivers/soc/fsl/qe/qe_common.c
go read those too, bestie, they're all connected π
that's the whole page! π this little beauty lives in ./drivers/soc/fsl/qe and the manual itself is dated October 2026 β noted, archived, slayed. mwah πβ¨
π¦ 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