blob: e78c28c1f350e4bf045feca53c6c6d5fc1aff6b7 [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 __UM_TLBFLUSH_H
7#define __UM_TLBFLUSH_H
8
9#include <linux/mm.h>
Jeff Dike16dd07b2007-05-06 14:51:48 -070010#include "choose-mode.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
12/*
13 * TLB flushing:
14 *
15 * - flush_tlb() flushes the current mm struct TLBs
16 * - flush_tlb_all() flushes all processes TLBs
17 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
18 * - flush_tlb_page(vma, vmaddr) flushes one page
19 * - flush_tlb_kernel_vm() flushes the kernel vm area
20 * - flush_tlb_range(vma, start, end) flushes a range of pages
21 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
22 */
23
24extern void flush_tlb_all(void);
25extern void flush_tlb_mm(struct mm_struct *mm);
26extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
27 unsigned long end);
Jeff Dike16dd07b2007-05-06 14:51:48 -070028extern void flush_tlb_page_skas(struct vm_area_struct *vma,
29 unsigned long address);
30
31static inline void flush_tlb_page(struct vm_area_struct *vma,
32 unsigned long address)
33{
34 address &= PAGE_MASK;
35
36 CHOOSE_MODE(flush_tlb_range(vma, address, address + PAGE_SIZE),
37 flush_tlb_page_skas(vma, address));
38}
39
Linus Torvalds1da177e2005-04-16 15:20:36 -070040extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
41extern void flush_tlb_kernel_vm(void);
42extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
43extern void __flush_tlb_one(unsigned long addr);
44
45static inline void flush_tlb_pgtables(struct mm_struct *mm,
46 unsigned long start, unsigned long end)
47{
48}
49
50#endif