/*1* Copyright (C) 2010 Tobias Klauser <[email protected]>2* Copyright (C) 1996, 1997, 1998, 1999 by Ralf Baechle3* Copyright (C) 1999 Silicon Graphics, Inc.4*5* based on MIPS asm/mmu_context.h6*7* This file is subject to the terms and conditions of the GNU General Public8* License. See the file "COPYING" in the main directory of this archive9* for more details.10*/1112#ifndef _ASM_NIOS2_MMU_CONTEXT_H13#define _ASM_NIOS2_MMU_CONTEXT_H1415#include <linux/mm_types.h>1617#include <asm-generic/mm_hooks.h>1819extern void mmu_context_init(void);20extern unsigned long get_pid_from_context(mm_context_t *ctx);2122/*23* For the fast tlb miss handlers, we keep a pointer to the current pgd.24* processor.25*/26extern pgd_t *pgd_current;2728/*29* Initialize the context related info for a new mm_struct instance.30*31* Set all new contexts to 0, that way the generation will never match32* the currently running generation when this context is switched in.33*/34#define init_new_context init_new_context35static inline int init_new_context(struct task_struct *tsk,36struct mm_struct *mm)37{38mm->context = 0;39return 0;40}4142void switch_mm(struct mm_struct *prev, struct mm_struct *next,43struct task_struct *tsk);4445/*46* After we have set current->mm to a new value, this activates47* the context for the new mm so we see the new mappings.48*/49#define activate_mm activate_mm50void activate_mm(struct mm_struct *prev, struct mm_struct *next);5152#include <asm-generic/mmu_context.h>5354#endif /* _ASM_NIOS2_MMU_CONTEXT_H */555657