arm_smmu_invs_purge(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… arm_smmu_invs_purge β€” Kernel API Manual ✨

okay so bestie, welcome to the <rainbow>arm_smmu_invs_purge(9)</rainbow> glow-up page β€” it's a kernel API manual entry and honestly it's giving "tiny function, big responsibilities" energy πŸŽ€


🌸 NAME 🌸

arm_smmu_invs_purge β€” bestie, this one literally purges all the trash entries in the @invs πŸ—‘οΈβœ¨ no cap, that's the whole vibe.


✨ SYNOPSIS ✨

VISIBLE_IF_KUNIT struct arm_smmu_invs * arm_smmu_invs_purge (struct arm_smmu_invs *invs );

yep, that's the whole signature. VISIBLE_IF_KUNIT included, we do NOT skip the macro around here πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • invs β€” the base invalidation array. that's it, that's the argument. she's the main character of this function 🫢

πŸ’– RETURN πŸ’–

so like, on success you get a newly allocated array with all the trash entries removed β€” slay, clean, iconic πŸ‘‘

but also, it returns NULL in two very specific situations, and we're not skipping these:

  • if there is no trash entry in the array at all, or
  • if the allocation failed 😭

either way: NULL. don't come for her, she's just being honest.


πŸ”₯ DESCRIPTION πŸ”₯

okay so here's where the ground rules live, and you need these, bestie:

this function must be locked and serialized with arm_smmu_invs_merge and arm_smmu_invs_unref β€” like, all three of them, same lock energy, no cutting corners πŸ”’

but β€” and this is the fun little exception β€” do not lockdep on any lock for KUNIT test. that's the rule, okay? KUNIT gets a pass πŸ™ˆ

and the part everyone forgets: the caller is responsible for freeing the invs and the returned new one. both of them. not one. both. free your stuff, bestie, the kernel is not your mom πŸ’€


🧚 SEE ALSO 🧚

go read those too, iykyk πŸ’œ


okay and finally, the credits because we always give credit πŸŽ€ this page lives under ./drivers/iommu/arm/arm-smmu-v3, dated October 2026, and the manual title is <pink>arm_smmu_invs_purge(9)</pink>. that's the whole footer, folded into a cute little sign-off. periodt. πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from