diff options
author | Michal Simek <monstr@monstr.eu> | 2009-05-26 10:30:18 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-05-26 10:45:19 -0400 |
commit | 45be7d46a9928c6b8ed747e020748500da7e66f1 (patch) | |
tree | 1c29f18097bc2eb979a60f77b50fe6527882c32a /arch/microblaze | |
parent | 5233806dfe6f88fb1a01db3729eeda78f65bcbd1 (diff) |
microblaze_mmu_v2: Update tlb.h and tlbflush.h
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/include/asm/tlb.h | 8 | ||||
-rw-r--r-- | arch/microblaze/include/asm/tlbflush.h | 48 |
2 files changed, 56 insertions, 0 deletions
diff --git a/arch/microblaze/include/asm/tlb.h b/arch/microblaze/include/asm/tlb.h index d1dfe3791127..c472d2801132 100644 --- a/arch/microblaze/include/asm/tlb.h +++ b/arch/microblaze/include/asm/tlb.h | |||
@@ -1,4 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> | ||
3 | * Copyright (C) 2008-2009 PetaLogix | ||
2 | * Copyright (C) 2006 Atmark Techno, Inc. | 4 | * Copyright (C) 2006 Atmark Techno, Inc. |
3 | * | 5 | * |
4 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
@@ -13,4 +15,10 @@ | |||
13 | 15 | ||
14 | #include <asm-generic/tlb.h> | 16 | #include <asm-generic/tlb.h> |
15 | 17 | ||
18 | #ifdef CONFIG_MMU | ||
19 | #define tlb_start_vma(tlb, vma) do { } while (0) | ||
20 | #define tlb_end_vma(tlb, vma) do { } while (0) | ||
21 | #define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0) | ||
22 | #endif | ||
23 | |||
16 | #endif /* _ASM_MICROBLAZE_TLB_H */ | 24 | #endif /* _ASM_MICROBLAZE_TLB_H */ |
diff --git a/arch/microblaze/include/asm/tlbflush.h b/arch/microblaze/include/asm/tlbflush.h index d7fe7629001b..eb31a0e8a772 100644 --- a/arch/microblaze/include/asm/tlbflush.h +++ b/arch/microblaze/include/asm/tlbflush.h | |||
@@ -1,4 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> | ||
3 | * Copyright (C) 2008-2009 PetaLogix | ||
2 | * Copyright (C) 2006 Atmark Techno, Inc. | 4 | * Copyright (C) 2006 Atmark Techno, Inc. |
3 | * | 5 | * |
4 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
@@ -9,6 +11,50 @@ | |||
9 | #ifndef _ASM_MICROBLAZE_TLBFLUSH_H | 11 | #ifndef _ASM_MICROBLAZE_TLBFLUSH_H |
10 | #define _ASM_MICROBLAZE_TLBFLUSH_H | 12 | #define _ASM_MICROBLAZE_TLBFLUSH_H |
11 | 13 | ||
14 | #ifdef CONFIG_MMU | ||
15 | |||
16 | #include <linux/sched.h> | ||
17 | #include <linux/threads.h> | ||
18 | #include <asm/processor.h> /* For TASK_SIZE */ | ||
19 | #include <asm/mmu.h> | ||
20 | #include <asm/page.h> | ||
21 | #include <asm/pgalloc.h> | ||
22 | |||
23 | extern void _tlbie(unsigned long address); | ||
24 | extern void _tlbia(void); | ||
25 | |||
26 | #define __tlbia() _tlbia() | ||
27 | |||
28 | static inline void local_flush_tlb_all(void) | ||
29 | { __tlbia(); } | ||
30 | static inline void local_flush_tlb_mm(struct mm_struct *mm) | ||
31 | { __tlbia(); } | ||
32 | static inline void local_flush_tlb_page(struct vm_area_struct *vma, | ||
33 | unsigned long vmaddr) | ||
34 | { _tlbie(vmaddr); } | ||
35 | static inline void local_flush_tlb_range(struct vm_area_struct *vma, | ||
36 | unsigned long start, unsigned long end) | ||
37 | { __tlbia(); } | ||
38 | |||
39 | #define flush_tlb_kernel_range(start, end) do { } while (0) | ||
40 | |||
41 | #define update_mmu_cache(vma, addr, pte) do { } while (0) | ||
42 | |||
43 | #define flush_tlb_all local_flush_tlb_all | ||
44 | #define flush_tlb_mm local_flush_tlb_mm | ||
45 | #define flush_tlb_page local_flush_tlb_page | ||
46 | #define flush_tlb_range local_flush_tlb_range | ||
47 | |||
48 | /* | ||
49 | * This is called in munmap when we have freed up some page-table | ||
50 | * pages. We don't need to do anything here, there's nothing special | ||
51 | * about our page-table pages. -- paulus | ||
52 | */ | ||
53 | static inline void flush_tlb_pgtables(struct mm_struct *mm, | ||
54 | unsigned long start, unsigned long end) { } | ||
55 | |||
56 | #else /* CONFIG_MMU */ | ||
57 | |||
12 | #define flush_tlb() BUG() | 58 | #define flush_tlb() BUG() |
13 | #define flush_tlb_all() BUG() | 59 | #define flush_tlb_all() BUG() |
14 | #define flush_tlb_mm(mm) BUG() | 60 | #define flush_tlb_mm(mm) BUG() |
@@ -17,4 +63,6 @@ | |||
17 | #define flush_tlb_pgtables(mm, start, end) BUG() | 63 | #define flush_tlb_pgtables(mm, start, end) BUG() |
18 | #define flush_tlb_kernel_range(start, end) BUG() | 64 | #define flush_tlb_kernel_range(start, end) BUG() |
19 | 65 | ||
66 | #endif /* CONFIG_MMU */ | ||
67 | |||
20 | #endif /* _ASM_MICROBLAZE_TLBFLUSH_H */ | 68 | #endif /* _ASM_MICROBLAZE_TLBFLUSH_H */ |