[kernel] add more missing configuration symbols
[openwrt.git] / target / linux / coldfire / patches / 074-mcfv4e_except_vector_fix.patch
1 From 09895934aaddf4f08345798068b41344068c7b56 Mon Sep 17 00:00:00 2001
2 From: Kurt Mahan <kmahan@freescale.com>
3 Date: Tue, 8 Jul 2008 00:59:38 -0600
4 Subject: [PATCH] Fix exception handling to properly get vector.
5
6 LTIBName: mcfv4e-except-vector-fix
7 Signed-off-by: Kurt Mahan <kmahan@freescale.com>
8 ---
9 arch/m68k/coldfire/traps.c | 11 ++++++-----
10 1 files changed, 6 insertions(+), 5 deletions(-)
11
12 --- a/arch/m68k/coldfire/traps.c
13 +++ b/arch/m68k/coldfire/traps.c
14 @@ -7,6 +7,7 @@
15 * 68040 fixes by Martin Apel
16 * 68060 fixes by Roman Hodek
17 * 68060 fixes by Jesper Skov
18 + * Coldfire fixes by Kurt Mahan
19 *
20 * This file is subject to the terms and conditions of the GNU General Public
21 * License. See the file COPYING in the main directory of this archive
22 @@ -288,13 +289,13 @@ void show_stack(struct task_struct *task
23 void bad_super_trap(struct frame *fp)
24 {
25 console_verbose();
26 - if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0]))
27 + if (fp->ptregs.vector < sizeof(vec_names)/sizeof(vec_names[0]))
28 printk(KERN_WARNING "*** %s *** FORMAT=%X\n",
29 - vec_names[(fp->ptregs.vector) >> 2],
30 + vec_names[fp->ptregs.vector],
31 fp->ptregs.format);
32 else
33 printk(KERN_WARNING "*** Exception %d *** FORMAT=%X\n",
34 - (fp->ptregs.vector) >> 2,
35 + fp->ptregs.vector,
36 fp->ptregs.format);
37 printk(KERN_WARNING "Current process id is %d\n", current->pid);
38 die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0);
39 @@ -306,7 +307,7 @@ asmlinkage void trap_c(struct frame *fp)
40 siginfo_t info;
41
42 if (fp->ptregs.sr & PS_S) {
43 - if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
44 + if (fp->ptregs.vector == VEC_TRACE) {
45 /* traced a trapping instruction */
46 current->ptrace |= PT_DTRACE;
47 } else
48 @@ -315,7 +316,7 @@ asmlinkage void trap_c(struct frame *fp)
49 }
50
51 /* send the appropriate signal to the user program */
52 - switch ((fp->ptregs.vector) >> 2) {
53 + switch (fp->ptregs.vector) {
54 case VEC_ADDRERR:
55 info.si_code = BUS_ADRALN;
56 sig = SIGBUS;
This page took 0.040275 seconds and 5 git commands to generate.