]> git.wh0rd.org - patches.git/blob - bfin-scrub-old-spinlock-exception.patch
initial import
[patches.git] / bfin-scrub-old-spinlock-exception.patch
1 Index: arch/blackfin/kernel/traps.c
2 ===================================================================
3 --- arch/blackfin/kernel/traps.c (revision 3345)
4 +++ arch/blackfin/kernel/traps.c (working copy)
5 @@ -186,15 +186,14 @@ asmlinkage void trap_c(struct pt_regs *f
6 #else
7 /* 0x02 - User Defined, Caught by default */
8 #endif
9 - /* 0x03 - Atomic test and set */
10 + /* 0x03 - User Defined, userspace stack overflow */
11 case VEC_EXCPT03:
12 info.si_code = SEGV_STACKFLOW;
13 sig = SIGSEGV;
14 printk(KERN_EMERG EXC_0x03);
15 CHK_DEBUGGER_TRAP();
16 break;
17 - /* 0x04 - spinlock - handled by _ex_spinlock,
18 - getting here is an error */
19 + /* 0x04 - User Defined, Caught by default */
20 /* 0x05 - User Defined, Caught by default */
21 /* 0x06 - User Defined, Caught by default */
22 /* 0x07 - User Defined, Caught by default */
23 Index: arch/blackfin/mach-common/entry.S
24 ===================================================================
25 --- arch/blackfin/mach-common/entry.S (revision 3345)
26 +++ arch/blackfin/mach-common/entry.S (working copy)
27 @@ -97,17 +97,6 @@ ENTRY(_ex_icplb)
28 rtx;
29 ENDPROC(_ex_icplb)
30
31 -ENTRY(_ex_spinlock)
32 - /* Transform this into a syscall - twiddle the syscall vector. */
33 - p5.l = lo(EVT15);
34 - p5.h = hi(EVT15);
35 - r7.l = _spinlock_bh;
36 - r7.h = _spinlock_bh;
37 - [p5] = r7;
38 - csync;
39 - /* Fall through. */
40 -ENDPROC(_ex_spinlock)
41 -
42 ENTRY(_ex_syscall)
43 DEBUG_START_HWTRACE(p5, r7)
44 (R7:6,P5:4) = [sp++];
45 @@ -117,26 +106,6 @@ ENTRY(_ex_syscall)
46 rtx
47 ENDPROC(_ex_syscall)
48
49 -ENTRY(_spinlock_bh)
50 - SAVE_ALL_SYS
51 - /* To end up here, vector 15 was changed - so we have to change it
52 - * back.
53 - */
54 - p0.l = lo(EVT15);
55 - p0.h = hi(EVT15);
56 - p1.l = _evt_system_call;
57 - p1.h = _evt_system_call;
58 - [p0] = p1;
59 - csync;
60 - r0 = [sp + PT_R0];
61 - sp += -12;
62 - call _sys_bfin_spinlock;
63 - sp += 12;
64 - [SP + PT_R0] = R0;
65 - RESTORE_ALL_SYS
66 - rti;
67 -ENDPROC(_spinlock_bh)
68 -
69 ENTRY(_ex_soft_bp)
70 r7 = retx;
71 r7 += -2;
72 @@ -775,14 +744,14 @@ ENDPROC(_init_exception_buff)
73 ALIGN
74 _extable:
75 /* entry for each EXCAUSE[5:0]
76 - * This table bmust be in sync with the table in ./kernel/traps.c
77 + * This table must be in sync with the table in ./kernel/traps.c
78 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
79 */
80 .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */
81 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
82 .long _ex_trap_c /* 0x02 - User Defined */
83 - .long _ex_trap_c /* 0x03 - User Defined - Atomic test and set service */
84 - .long _ex_spinlock /* 0x04 - User Defined */
85 + .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */
86 + .long _ex_trap_c /* 0x04 - User Defined */
87 .long _ex_trap_c /* 0x05 - User Defined */
88 .long _ex_trap_c /* 0x06 - User Defined */
89 .long _ex_trap_c /* 0x07 - User Defined */