blob: bcd1a4afb842af26ee54c1dd873af4e75d05db36 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __TLB_H__
7#define __TLB_H__
8
9#include "um_mmu.h"
10
11struct host_vm_op {
Jeff Dikec5600492005-09-03 15:57:36 -070012 enum { NONE, MMAP, MUNMAP, MPROTECT } type;
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 union {
14 struct {
15 unsigned long addr;
16 unsigned long len;
Jeff Dike16dd07b2007-05-06 14:51:48 -070017 unsigned int prot;
Linus Torvalds1da177e2005-04-16 15:20:36 -070018 int fd;
19 __u64 offset;
20 } mmap;
21 struct {
22 unsigned long addr;
23 unsigned long len;
24 } munmap;
25 struct {
26 unsigned long addr;
27 unsigned long len;
Jeff Dike16dd07b2007-05-06 14:51:48 -070028 unsigned int prot;
Linus Torvalds1da177e2005-04-16 15:20:36 -070029 } mprotect;
30 } u;
31};
32
Linus Torvalds1da177e2005-04-16 15:20:36 -070033extern void force_flush_all(void);
34extern void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
Jeff Diked67b5692005-07-07 17:56:49 -070035 unsigned long end_addr, int force,
Bodo Stroesser07bf7312005-09-03 15:57:50 -070036 int (*do_ops)(union mm_context *,
37 struct host_vm_op *, int, int,
38 void **));
Linus Torvalds1da177e2005-04-16 15:20:36 -070039extern int flush_tlb_kernel_range_common(unsigned long start,
40 unsigned long end);
41
Linus Torvalds1da177e2005-04-16 15:20:36 -070042#endif