aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/mm/tlb.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-07-28 10:03:36 -0400
committerDave Kleikamp <shaggy@austin.ibm.com>2005-07-28 10:03:36 -0400
commitda28c12089dfcfb8695b6b555cdb8e03dda2b690 (patch)
treeb3ff509f21352ef053cb3d490cb13528090d32ac /arch/cris/mm/tlb.c
parent6de7dc2c4c713d037c19aa1e310d240f16973414 (diff)
parent577a4f8102d54b504cb22eb021b89e957e8df18f (diff)
Merge with /home/shaggy/git/linus-clean/
/home/shaggy/git/linus-clean/ /home/shaggy/git/linus-clean/ Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'arch/cris/mm/tlb.c')
-rw-r--r--arch/cris/mm/tlb.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/arch/cris/mm/tlb.c b/arch/cris/mm/tlb.c
index 23eca5ad7389..0df390a656cd 100644
--- a/arch/cris/mm/tlb.c
+++ b/arch/cris/mm/tlb.c
@@ -29,18 +29,6 @@
29struct mm_struct *page_id_map[NUM_PAGEID]; 29struct mm_struct *page_id_map[NUM_PAGEID];
30static int map_replace_ptr = 1; /* which page_id_map entry to replace next */ 30static int map_replace_ptr = 1; /* which page_id_map entry to replace next */
31 31
32/*
33 * Initialize the context related info for a new mm_struct
34 * instance.
35 */
36
37int
38init_new_context(struct task_struct *tsk, struct mm_struct *mm)
39{
40 mm->context = NO_CONTEXT;
41 return 0;
42}
43
44/* the following functions are similar to those used in the PPC port */ 32/* the following functions are similar to those used in the PPC port */
45 33
46static inline void 34static inline void
@@ -60,12 +48,12 @@ alloc_context(struct mm_struct *mm)
60 */ 48 */
61 flush_tlb_mm(old_mm); 49 flush_tlb_mm(old_mm);
62 50
63 old_mm->context = NO_CONTEXT; 51 old_mm->context.page_id = NO_CONTEXT;
64 } 52 }
65 53
66 /* insert it into the page_id_map */ 54 /* insert it into the page_id_map */
67 55
68 mm->context = map_replace_ptr; 56 mm->context.page_id = map_replace_ptr;
69 page_id_map[map_replace_ptr] = mm; 57 page_id_map[map_replace_ptr] = mm;
70 58
71 map_replace_ptr++; 59 map_replace_ptr++;
@@ -81,7 +69,7 @@ alloc_context(struct mm_struct *mm)
81void 69void
82get_mmu_context(struct mm_struct *mm) 70get_mmu_context(struct mm_struct *mm)
83{ 71{
84 if(mm->context == NO_CONTEXT) 72 if(mm->context.page_id == NO_CONTEXT)
85 alloc_context(mm); 73 alloc_context(mm);
86} 74}
87 75
@@ -96,11 +84,10 @@ get_mmu_context(struct mm_struct *mm)
96void 84void
97destroy_context(struct mm_struct *mm) 85destroy_context(struct mm_struct *mm)
98{ 86{
99 if(mm->context != NO_CONTEXT) { 87 if(mm->context.page_id != NO_CONTEXT) {
100 D(printk("destroy_context %d (%p)\n", mm->context, mm)); 88 D(printk("destroy_context %d (%p)\n", mm->context.page_id, mm));
101 flush_tlb_mm(mm); /* TODO this might be redundant ? */ 89 flush_tlb_mm(mm); /* TODO this might be redundant ? */
102 page_id_map[mm->context] = NULL; 90 page_id_map[mm->context.page_id] = NULL;
103 /* mm->context = NO_CONTEXT; redundant.. mm will be freed */
104 } 91 }
105} 92}
106 93