mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race
[linux/fpc-iii.git] / arch / arc / include / asm / tlbflush.h
blobf0d42f1e83f5a26d91b1a3ced885b43fc30e7596
1 /*
2 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #ifndef __ASM_ARC_TLBFLUSH__
10 #define __ASM_ARC_TLBFLUSH__
12 #include <linux/mm.h>
14 void local_flush_tlb_all(void);
15 void local_flush_tlb_mm(struct mm_struct *mm);
16 void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
17 void local_flush_tlb_kernel_range(unsigned long start, unsigned long end);
18 void local_flush_tlb_range(struct vm_area_struct *vma,
19 unsigned long start, unsigned long end);
20 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
21 void local_flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
22 unsigned long end);
23 #endif
25 #ifndef CONFIG_SMP
26 #define flush_tlb_range(vma, s, e) local_flush_tlb_range(vma, s, e)
27 #define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page)
28 #define flush_tlb_kernel_range(s, e) local_flush_tlb_kernel_range(s, e)
29 #define flush_tlb_all() local_flush_tlb_all()
30 #define flush_tlb_mm(mm) local_flush_tlb_mm(mm)
31 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
32 #define flush_pmd_tlb_range(vma, s, e) local_flush_pmd_tlb_range(vma, s, e)
33 #endif
34 #else
35 extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
36 unsigned long end);
37 extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
38 extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
39 extern void flush_tlb_all(void);
40 extern void flush_tlb_mm(struct mm_struct *mm);
41 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
42 extern void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
43 #endif
44 #endif /* CONFIG_SMP */
45 #endif