OSDN Git Service

ARC: [ASID] get_new_mmu_context() to conditionally allocate new ASID
authorVineet Gupta <vgupta@synopsys.com>
Wed, 24 Jul 2013 20:53:45 +0000 (13:53 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Fri, 30 Aug 2013 16:12:18 +0000 (21:42 +0530)
commit3daa48d1d9bc44baa079d65e72ef2e3f1139ac03
tree2e659049c5ee5584c789cc42643aa653cfdb307d
parent5bd87adf9b2ae5fa1bb469c68029b4eec06d6e03
ARC: [ASID] get_new_mmu_context() to conditionally allocate new ASID

ASID allocation changes/1

This patch does 2 things:

(1) get_new_mmu_context() NOW moves mm->ASID to a new value ONLY if it
    was from a prev allocation cycle/generation OR if mm had no ASID
    allocated (vs. before would unconditionally moving to a new ASID)

    Callers desiring unconditional update of ASID, e.g.local_flush_tlb_mm()
    (for parent's address space invalidation at fork) need to first force
    the parent to an unallocated ASID.

(2) get_new_mmu_context() always sets the MMU PID reg with unchanged/new
    ASID value.

The gains are:
- consolidation of all asid alloc logic into get_new_mmu_context()
- avoiding code duplication in switch_mm() for PID reg setting
- Enables future change to fold activate_mm() into switch_mm()

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