diff options
Diffstat (limited to 'arch/m68knommu/kernel/traps.c')
-rw-r--r-- | arch/m68knommu/kernel/traps.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c index 3739c8f657d7..a768008dfd06 100644 --- a/arch/m68knommu/kernel/traps.c +++ b/arch/m68knommu/kernel/traps.c | |||
@@ -179,14 +179,16 @@ static void __show_stack(struct task_struct *task, unsigned long *stack) | |||
179 | 179 | ||
180 | void bad_super_trap(struct frame *fp) | 180 | void bad_super_trap(struct frame *fp) |
181 | { | 181 | { |
182 | int vector = (fp->ptregs.vector >> 2) & 0xff; | ||
183 | |||
182 | console_verbose(); | 184 | console_verbose(); |
183 | if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names)) | 185 | if (vector < ARRAY_SIZE(vec_names)) |
184 | printk (KERN_WARNING "*** %s *** FORMAT=%X\n", | 186 | printk (KERN_WARNING "*** %s *** FORMAT=%X\n", |
185 | vec_names[(fp->ptregs.vector) >> 2], | 187 | vec_names[vector], |
186 | fp->ptregs.format); | 188 | fp->ptregs.format); |
187 | else | 189 | else |
188 | printk (KERN_WARNING "*** Exception %d *** FORMAT=%X\n", | 190 | printk (KERN_WARNING "*** Exception %d *** FORMAT=%X\n", |
189 | (fp->ptregs.vector) >> 2, | 191 | vector, |
190 | fp->ptregs.format); | 192 | fp->ptregs.format); |
191 | printk (KERN_WARNING "Current process id is %d\n", current->pid); | 193 | printk (KERN_WARNING "Current process id is %d\n", current->pid); |
192 | die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0); | 194 | die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0); |
@@ -195,10 +197,11 @@ void bad_super_trap(struct frame *fp) | |||
195 | asmlinkage void trap_c(struct frame *fp) | 197 | asmlinkage void trap_c(struct frame *fp) |
196 | { | 198 | { |
197 | int sig; | 199 | int sig; |
200 | int vector = (fp->ptregs.vector >> 2) & 0xff; | ||
198 | siginfo_t info; | 201 | siginfo_t info; |
199 | 202 | ||
200 | if (fp->ptregs.sr & PS_S) { | 203 | if (fp->ptregs.sr & PS_S) { |
201 | if ((fp->ptregs.vector >> 2) == VEC_TRACE) { | 204 | if (vector == VEC_TRACE) { |
202 | /* traced a trapping instruction */ | 205 | /* traced a trapping instruction */ |
203 | } else | 206 | } else |
204 | bad_super_trap(fp); | 207 | bad_super_trap(fp); |
@@ -206,7 +209,7 @@ asmlinkage void trap_c(struct frame *fp) | |||
206 | } | 209 | } |
207 | 210 | ||
208 | /* send the appropriate signal to the user program */ | 211 | /* send the appropriate signal to the user program */ |
209 | switch ((fp->ptregs.vector) >> 2) { | 212 | switch (vector) { |
210 | case VEC_ADDRERR: | 213 | case VEC_ADDRERR: |
211 | info.si_code = BUS_ADRALN; | 214 | info.si_code = BUS_ADRALN; |
212 | sig = SIGBUS; | 215 | sig = SIGBUS; |
@@ -360,16 +363,3 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
360 | else | 363 | else |
361 | __show_stack(task, stack); | 364 | __show_stack(task, stack); |
362 | } | 365 | } |
363 | |||
364 | #ifdef CONFIG_M68KFPU_EMU | ||
365 | asmlinkage void fpemu_signal(int signal, int code, void *addr) | ||
366 | { | ||
367 | siginfo_t info; | ||
368 | |||
369 | info.si_signo = signal; | ||
370 | info.si_errno = 0; | ||
371 | info.si_code = code; | ||
372 | info.si_addr = addr; | ||
373 | force_sig_info(signal, &info, current); | ||
374 | } | ||
375 | #endif | ||