aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/trap_kern.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c
index 9ae2eff0d8f3..1de22d8a313a 100644
--- a/arch/um/kernel/trap_kern.c
+++ b/arch/um/kernel/trap_kern.c
@@ -107,33 +107,6 @@ out_of_memory:
107 goto out; 107 goto out;
108} 108}
109 109
110LIST_HEAD(physmem_remappers);
111
112void register_remapper(struct remapper *info)
113{
114 list_add(&info->list, &physmem_remappers);
115}
116
117static int check_remapped_addr(unsigned long address, int is_write)
118{
119 struct remapper *remapper;
120 struct list_head *ele;
121 __u64 offset;
122 int fd;
123
124 fd = phys_mapping(__pa(address), &offset);
125 if(fd == -1)
126 return(0);
127
128 list_for_each(ele, &physmem_remappers){
129 remapper = list_entry(ele, struct remapper, list);
130 if((*remapper->proc)(fd, address, is_write, offset))
131 return(1);
132 }
133
134 return(0);
135}
136
137/* 110/*
138 * We give a *copy* of the faultinfo in the regs to segv. 111 * We give a *copy* of the faultinfo in the regs to segv.
139 * This must be done, since nesting SEGVs could overwrite 112 * This must be done, since nesting SEGVs could overwrite
@@ -152,8 +125,6 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc)
152 flush_tlb_kernel_vm(); 125 flush_tlb_kernel_vm();
153 return(0); 126 return(0);
154 } 127 }
155 else if(check_remapped_addr(address & PAGE_MASK, is_write))
156 return(0);
157 else if(current->mm == NULL) 128 else if(current->mm == NULL)
158 panic("Segfault with no mm"); 129 panic("Segfault with no mm");
159 err = handle_page_fault(address, ip, is_write, is_user, &si.si_code); 130 err = handle_page_fault(address, ip, is_write, is_user, &si.si_code);