scummvm random work
[patches.git] / hwtracebuffer.patch
1 Index: arch/blackfin/mach-common/entry.S
2 ===================================================================
3 RCS file: /usr/local/src/blackfin/rsync/uclinux533/uClinux-dist/linux-2.6.x/arch/blackfin/mach-common/entry.S,v
4 retrieving revision 1.43
5 diff -u -p -r1.43 entry.S
6 --- arch/blackfin/mach-common/entry.S 31 Aug 2006 06:22:41 -0000 1.43
7 +++ arch/blackfin/mach-common/entry.S 2 Sep 2006 01:22:06 -0000
8 @@ -57,6 +57,29 @@
9 #include <asm/thread_info.h> /* TIF_NEED_RESCHED */
10 #include <asm/asm-offsets.h>
11
12 +#ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
13 + /*
14 + * TODO: this should be proper save/restore, but for now
15 + * we'll just cheat and use 0x1/0x13
16 + */
17 +# define DEBUG_START_HWTRACE \
18 + P0.l = LO(TBUFCTL); \
19 + P0.h = HI(TBUFCTL); \
20 + R0 = [SP++]; \
21 + [P0] = R0;
22 +# define DEBUG_STOP_HWTRACE \
23 + P0.l = LO(TBUFCTL); \
24 + P0.h = HI(TBUFCTL); \
25 + R0 = [P0]; \
26 + R1 = ~TBUFEN; \
27 + [SP--] = R0; \
28 + R2 = R0 & R1; \
29 + [P0] = R2;
30 +#else
31 +# define DEBUG_START_HWTRACE
32 +# define DEBUG_STOP_HWTRACE
33 +#endif
34 +
35 .data
36 ALIGN
37 _extable:
38 @@ -149,7 +172,9 @@ ENTRY(_ex_icplb)
39 (R7:6,P5:4) = [sp++];
40 ASTAT = [sp++];
41 SAVE_ALL_SYS
42 + DEBUG_STOP_HWTRACE
43 call __cplb_hdr;
44 + DEBUG_START_HWTRACE
45 RESTORE_ALL_SYS
46 SP = RETN;
47 rtx;