]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/nslu2-kernel/2.6/thumb-swi.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / nslu2-kernel / 2.6 / thumb-swi.patch
1 # This patch changes the thumb swi handling for any thumb swi with
2 # an immediate value != 0, those swis are mapped into the arm
3 # specific swis.  This implements a thumb breakpoint swi.
4 --- linux-2.6.12.2/arch/arm/kernel/entry-common.S.orig  2005-09-19 12:48:42.323365573 -0700
5 +++ linux-2.6.12.2/arch/arm/kernel/entry-common.S       2005-09-19 13:31:19.004247358 -0700
6 @@ -137,8 +137,11 @@
7          */
8  #ifdef CONFIG_ARM_THUMB
9         tst     r8, #PSR_T_BIT                  @ this is SPSR from save_user_regs
10 -       addne   scno, r7, #__NR_SYSCALL_BASE    @ put OS number in
11 -       ldreq   scno, [lr, #-4]
12 +       ldrneh  ip, [lr, #-2]                   @ thumb swi instruction
13 +       ldreq   scno, [lr, #-4]                 @ arm swi instruction
14 +       addne   scno, r7, #__NR_SYSCALL_BASE    @ put OS number in to thumb r7 value
15 +       bicnes  ip, ip, #0xff00                 @ clear thumb swi bits
16 +       addne   scno, ip, #__ARM_NR_BASE        @ thumb swi0->r7, swi!0->arm swi
17  #else
18         ldr     scno, [lr, #-4]                 @ get SWI instruction
19  #endif