diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-01-18 13:42:19 +0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-02-15 21:45:51 +0400 |
commit | f1f3347da9440eedd2350f4f5d13d8860f570b92 (patch) | |
tree | 47d652aeaf9c4455d085578c976c73789620ba8c /arch/arc/mm | |
parent | 5dda4dc570ac41e3bd73ef871c500aeb7005c6b0 (diff) | |
download | linux-f1f3347da9440eedd2350f4f5d13d8860f570b92.tar.xz |
ARC: MMU Context Management
ARC700 MMU provides for tagging TLB entries with a 8-bit ASID to avoid
having to flush the TLB every task switch.
It also allows for a quick way to invalidate all the TLB entries for
task useful for:
* COW sementics during fork()
* task exit()ing
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/mm')
-rw-r--r-- | arch/arc/mm/tlb.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c new file mode 100644 index 000000000000..f1edae2410a7 --- /dev/null +++ b/arch/arc/mm/tlb.c @@ -0,0 +1,23 @@ +/* + * TLB Management (flush/create/diagnostics) for ARC700 + * + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include <linux/module.h> +#include <asm/arcregs.h> +#include <asm/mmu_context.h> +#include <asm/tlb.h> + +/* A copy of the ASID from the PID reg is kept in asid_cache */ +int asid_cache = FIRST_ASID; + +/* ASID to mm struct mapping. We have one extra entry corresponding to + * NO_ASID to save us a compare when clearing the mm entry for old asid + * see get_new_mmu_context (asm-arc/mmu_context.h) + */ +struct mm_struct *asid_mm_map[NUM_ASID + 1]; |