4 * Linux architectural port borrowing liberally from similar works of
5 * others. All original copyrights apply as per the original source
8 * OpenRISC implementation:
9 * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
10 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
19 #ifndef __ASM_OPENRISC_TLBFLUSH_H
20 #define __ASM_OPENRISC_TLBFLUSH_H
23 #include <asm/processor.h>
24 #include <asm/pgtable.h>
25 #include <asm/pgalloc.h>
26 #include <asm/current.h>
27 #include <linux/sched.h>
30 * - flush_tlb() flushes the current mm struct TLBs
31 * - flush_tlb_all() flushes all processes TLBs
32 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
33 * - flush_tlb_page(vma, vmaddr) flushes one page
34 * - flush_tlb_range(mm, start, end) flushes a range of pages
37 void flush_tlb_all(void);
38 void flush_tlb_mm(struct mm_struct
*mm
);
39 void flush_tlb_page(struct vm_area_struct
*vma
, unsigned long addr
);
40 void flush_tlb_range(struct vm_area_struct
*vma
,
44 static inline void flush_tlb(void)
46 flush_tlb_mm(current
->mm
);
49 static inline void flush_tlb_kernel_range(unsigned long start
,
52 flush_tlb_range(NULL
, start
, end
);
55 #endif /* __ASM_OPENRISC_TLBFLUSH_H */