/* * MMU context handling. * * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch> * Copyright (C) 2009 Wind River Systems Inc * Implemented by fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #include <linux/mm.h> #include <asm/cpuinfo.h> #include <asm/mmu_context.h> #include <asm/tlb.h> /* The pids position and mask in context */ #define PID_SHIFT 0 #define PID_BITS (cpuinfo.tlb_pid_num_bits) #define PID_MASK ((1UL << PID_BITS) - 1) /* The versions position and mask in context */ #define VERSION_BITS (32 - PID_BITS) #define VERSION_SHIFT (PID_SHIFT + PID_BITS) #define VERSION_MASK ((1UL << VERSION_BITS) - 1) /* Return the version part of a context */ #define CTX_VERSION(c) (((c) >> VERSION_SHIFT) & VERSION_MASK) /* Return the pid part of a context */ #define CTX_PID(c) (((c) >> PID_SHIFT) & PID_MASK) /* Value of the first context (version 1, pid 0) */ #define FIRST_CTX ((1UL << VERSION_SHIFT) | (0 << PID_SHIFT)) static mm_context_t next_mmu_context; /* * Initialize MMU context management stuff. */
void __init mmu_context_init(void) { /* We need to set this here because the value depends on runtime data * from cpuinfo */ next_mmu_context = FIRST_CTX; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ley Foon Tan | 13 | 100.00% | 1 | 100.00% |
Total | 13 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ley Foon Tan | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ley Foon Tan | 59 | 100.00% | 1 | 100.00% |
Total | 59 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ley Foon Tan | 74 | 100.00% | 1 | 100.00% |
Total | 74 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ley Foon Tan | 35 | 100.00% | 1 | 100.00% |
Total | 35 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ley Foon Tan | 19 | 100.00% | 1 | 100.00% |
Total | 19 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ley Foon Tan | 284 | 100.00% | 1 | 100.00% |
Total | 284 | 100.00% | 1 | 100.00% |