]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: [ASID] Track ASID allocation cycles/generations
authorVineet Gupta <vgupta@synopsys.com>
Thu, 25 Jul 2013 22:45:50 +0000 (15:45 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Fri, 30 Aug 2013 16:12:19 +0000 (21:42 +0530)
commitd65f59c0a4b5d996f35398e923e992985358a385
tree549bdf5c9cdd5a9d4aa320bf4fbdf88b499f1f4b
parentb69aba20578d76dfc993b9d1886009282c672a3a
ARC: [ASID] Track ASID allocation cycles/generations

This helps remove asid-to-mm reverse map

While mm->context.id contains the ASID assigned to a process, our ASID
allocator also used asid_mm_map[] reverse map. In a new allocation
cycle (mm->ASID >= @asid_cache), the Round Robin ASID allocator used this
to check if new @asid_cache belonged to some mm2 (from prev cycle).
If so, it could locate that mm using the ASID reverse map, and mark that
mm as unallocated ASID, to force it to refresh at the time of switch_mm()

However, for SMP, the reverse map has to be maintained per CPU, so
becomes 2 dimensional, hence got rid of it.

With reverse map gone, it is NOT possible to reach out to current
assignee. So we track the ASID allocation generation/cycle and
on every switch_mm(), check if the current generation of CPU ASID is
same as mm's ASID; If not it is refreshed.

(Based loosely on arch/sh implementation)

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/mmu.h
arch/arc/include/asm/mmu_context.h
arch/arc/mm/tlb.c
arch/arc/mm/tlbex.S