has_valid_asid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… has_valid_asid(9) πŸ’…

welcome to the Kernel API Manual, bestie β€” today’s main character is has_valid_asid, and she’s here to answer one very specific question 🫢✨


🌸 NAME 🌸

has_valid_asid β€” Determine if an mm already has an ASID. πŸ’–


✨ SYNOPSIS ✨

int has_valid_asid (const struct mm_struct *mm , unsigned int type );

πŸŽ€ ARGUMENTS πŸŽ€

  • mm β€” Memory map. πŸ—ΊοΈ
  • type β€” R4K_HIT or R4K_INDEX, type of cache op. πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so literally, this function determines whether mm already has an ASID on any of the CPUs which cache ops of type type within an r4k_on_each_cpu call will affect. πŸ‘€πŸ’…

If r4k_on_each_cpu does an SMP call to a single VPE in each core, then the scope of the operation is confined to sibling CPUs; otherwise, all online CPUs will need to be checked. 🧚✨

⚠️ vibe check: it must be called in non-preemptive context. no cap. 😭

🌈 RETURN 🌈

Returns 1 if the CPUs affected by type cache ops have an ASID for mm. 0 otherwise. ⭐


πŸ’œ SEE ALSO πŸ’œ


mwah πŸ’‹ this page lives under ./arch/mips/mm, dated October 2026, and the footer literally says has_valid_asid(9) β€” bye bestie πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from