• Will Deacon's avatar
    ARM: mm: use bitmap operations when allocating new ASIDs · bf51bb82
    Will Deacon authored
    When allocating a new ASID, we must take care not to re-assign a
    reserved ASID-value to a new mm. This requires us to check each
    candidate ASID against those currently reserved by other cores before
    assigning a new ASID to the current mm.
    
    This patch improves the ASID allocation algorithm by using a
    bitmap-based approach. Rather than iterating over the reserved ASID
    array for each candidate ASID, we simply find the first zero bit,
    ensuring that those indices corresponding to reserved ASIDs are set
    when flushing during a rollover event.
    Tested-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    bf51bb82
context.c 5.55 KB