404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.17.65.101: ~ $
/* 
 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
 * Licensed under the GPL
 */

#ifndef __UM_MMU_CONTEXT_H
#define __UM_MMU_CONTEXT_H

#include <linux/sched.h>
#include <linux/mm_types.h>

#include <asm/mmu.h>

extern void uml_setup_stubs(struct mm_struct *mm);
/*
 * Needed since we do not use the asm-generic/mm_hooks.h:
 */
static inline int arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
{
	uml_setup_stubs(mm);
	return 0;
}
extern void arch_exit_mmap(struct mm_struct *mm);
static inline void arch_unmap(struct mm_struct *mm,
			struct vm_area_struct *vma,
			unsigned long start, unsigned long end)
{
}
static inline void arch_bprm_mm_init(struct mm_struct *mm,
				     struct vm_area_struct *vma)
{
}

static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
		bool write, bool execute, bool foreign)
{
	/* by default, allow everything */
	return true;
}

/*
 * end asm-generic/mm_hooks.h functions
 */

#define deactivate_mm(tsk,mm)	do { } while (0)

extern void force_flush_all(void);

static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
{
	/*
	 * This is called by fs/exec.c and sys_unshare()
	 * when the new ->mm is used for the first time.
	 */
	__switch_mm(&new->context.id);
	down_write_nested(&new->mmap_sem, 1);
	uml_setup_stubs(new);
	up_write(&new->mmap_sem);
}

static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 
			     struct task_struct *tsk)
{
	unsigned cpu = smp_processor_id();

	if(prev != next){
		cpumask_clear_cpu(cpu, mm_cpumask(prev));
		cpumask_set_cpu(cpu, mm_cpumask(next));
		if(next != &init_mm)
			__switch_mm(&next->context.id);
	}
}

static inline void enter_lazy_tlb(struct mm_struct *mm, 
				  struct task_struct *tsk)
{
}

extern int init_new_context(struct task_struct *task, struct mm_struct *mm);

extern void destroy_context(struct mm_struct *mm);

#endif

Filemanager

Name Type Size Permission Actions
Kbuild File 702 B 0644
a.out-core.h File 695 B 0644
bugs.h File 111 B 0644
cache.h File 483 B 0644
common.lds.S File 1.76 KB 0644
dma.h File 180 B 0644
fixmap.h File 1.63 KB 0644
hardirq.h File 558 B 0644
io.h File 339 B 0644
irq.h File 493 B 0644
irqflags.h File 865 B 0644
kmap_types.h File 219 B 0644
kvm_para.h File 34 B 0644
mmu.h File 558 B 0644
mmu_context.h File 1.87 KB 0644
page.h File 3.15 KB 0644
pgalloc.h File 1.46 KB 0644
pgtable-2level.h File 1.32 KB 0644
pgtable-3level.h File 2.88 KB 0644
pgtable.h File 9.88 KB 0644
processor-generic.h File 1.87 KB 0644
ptrace-generic.h File 1.13 KB 0644
sections.h File 219 B 0644
setup.h File 273 B 0644
smp.h File 121 B 0644
stacktrace.h File 1.06 KB 0644
syscall-generic.h File 2.67 KB 0644
sysrq.h File 182 B 0644
thread_info.h File 2.15 KB 0644
timex.h File 151 B 0644
tlb.h File 4.23 KB 0644
tlbflush.h File 978 B 0644
uaccess.h File 1.65 KB 0644
unwind.h File 213 B 0644