Path: blob/master/arch/um/include/asm/mmu_context.h
10820 views
/*1* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)2* Licensed under the GPL3*/45#ifndef __UM_MMU_CONTEXT_H6#define __UM_MMU_CONTEXT_H78#include "linux/sched.h"9#include "um_mmu.h"1011extern void arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm);12extern void arch_exit_mmap(struct mm_struct *mm);1314#define get_mmu_context(task) do ; while(0)15#define activate_context(tsk) do ; while(0)1617#define deactivate_mm(tsk,mm) do { } while (0)1819extern void force_flush_all(void);2021static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)22{23/*24* This is called by fs/exec.c and sys_unshare()25* when the new ->mm is used for the first time.26*/27__switch_mm(&new->context.id);28arch_dup_mmap(old, new);29}3031static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,32struct task_struct *tsk)33{34unsigned cpu = smp_processor_id();3536if(prev != next){37cpumask_clear_cpu(cpu, mm_cpumask(prev));38cpumask_set_cpu(cpu, mm_cpumask(next));39if(next != &init_mm)40__switch_mm(&next->context.id);41}42}4344static inline void enter_lazy_tlb(struct mm_struct *mm,45struct task_struct *tsk)46{47}4849extern int init_new_context(struct task_struct *task, struct mm_struct *mm);5051extern void destroy_context(struct mm_struct *mm);5253#endif545556