xref: /openbmc/linux/arch/nios2/include/asm/tlb.h (revision c983e92f)
1c983e92fSLey Foon Tan /*
2c983e92fSLey Foon Tan  * Copyright (C) 2010 Tobias Klauser <tklauser@distanz.ch>
3c983e92fSLey Foon Tan  * Copyright (C) 2009 Wind River Systems Inc
4c983e92fSLey Foon Tan  * Copyright (C) 2004 Microtronix Datacom Ltd.
5c983e92fSLey Foon Tan  *
6c983e92fSLey Foon Tan  * This file is subject to the terms and conditions of the GNU General Public
7c983e92fSLey Foon Tan  * License. See the file "COPYING" in the main directory of this archive
8c983e92fSLey Foon Tan  * for more details.
9c983e92fSLey Foon Tan  */
10c983e92fSLey Foon Tan 
11c983e92fSLey Foon Tan #ifndef _ASM_NIOS2_TLB_H
12c983e92fSLey Foon Tan #define _ASM_NIOS2_TLB_H
13c983e92fSLey Foon Tan 
14c983e92fSLey Foon Tan #define tlb_flush(tlb)	flush_tlb_mm((tlb)->mm)
15c983e92fSLey Foon Tan 
16c983e92fSLey Foon Tan extern void set_mmu_pid(unsigned long pid);
17c983e92fSLey Foon Tan 
18c983e92fSLey Foon Tan /*
19c983e92fSLey Foon Tan  * NiosII doesn't need any special per-pte or per-vma handling, except
20c983e92fSLey Foon Tan  * we need to flush cache for the area to be unmapped.
21c983e92fSLey Foon Tan  */
22c983e92fSLey Foon Tan #define tlb_start_vma(tlb, vma)					\
23c983e92fSLey Foon Tan 	do {							\
24c983e92fSLey Foon Tan 		if (!tlb->fullmm)				\
25c983e92fSLey Foon Tan 			flush_cache_range(vma, vma->vm_start, vma->vm_end); \
26c983e92fSLey Foon Tan 	}  while (0)
27c983e92fSLey Foon Tan 
28c983e92fSLey Foon Tan #define tlb_end_vma(tlb, vma)	do { } while (0)
29c983e92fSLey Foon Tan #define __tlb_remove_tlb_entry(tlb, ptep, address)	do { } while (0)
30c983e92fSLey Foon Tan 
31c983e92fSLey Foon Tan #include <linux/pagemap.h>
32c983e92fSLey Foon Tan #include <asm-generic/tlb.h>
33c983e92fSLey Foon Tan 
34c983e92fSLey Foon Tan #endif /* _ASM_NIOS2_TLB_H */
35