arm_smmu_invs_merge(9)
π arm_smmu_invs_merge β bestie's guide to merging invalidation arrays β¨
okay so this is a page from the Kernel API Manual and it's literally about one (1) function, so let's get into it π«Ά
πΈ NAME πΈ
arm_smmu_invs_merge β the icon that takes @to_merge, folds it into @invs, and hands you back a brand new array π
π¦ SYNOPSIS π¦
so this is the whole signature, no cap, copy it exactly bestie:
VISIBLE_IF_KUNIT struct arm_smmu_invs * arm_smmu_invs_merge (struct
arm_smmu_invs *invs , struct arm_smmu_invs *to_merge );
that VISIBLE_IF_KUNIT in front is just there, do not touch it π
π ARGUMENTS π
invsβ the base invalidation array, aka the main character π§to_mergeβ an array of invalidations to merge, aka the plus-one that gets folded in π
β RETURN β
on success you get a newly allocated array back, fr fr π
if it doesn't work out? you get ERR_PTR. sad but true π
π DESCRIPTION π
okay so the vibe check on this one: this function must be locked and serialized with arm_smmu_invs_unref and arm_smmu_invs_purge β do not skip this, it's giving "consequences" π
but bestie, note the exception: do not lockdep on any lock for KUNIT test. that part is non-negotiable, lowkey.
Both invs and to_merge must be sorted β that's how the returned array comes back sorted too, and honestly? the way that works is iconic β¨
the caller is responsible for freeing both invs and the returned new one. yes, both. yes, that's on you π«Ά
and entries marked as trash will be purged in the returned array. trash takes itself out, we love to see it π
π SEE ALSO π
- Kernel file
./drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c arm_smmu_invs_for_each_entry(9)arm_smmu_invs_for_each_cmp(9)arm_smmu_invs_unref(9)arm_smmu_invs_purge(9)
and that's the whole page bestie, go forth and merge responsibly π β¨
source/version: ./drivers/iommu/arm/arm-smmu-v3 Β· dated October 2026 Β· page arm_smmu_invs_merge(9) β mwah, ily, bye πππ¦
π¦ 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