devm_cpm_muram_alloc_fixed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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