X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fblackfin%2Fkernel%2Ffixed_code.S;h=4b03ba025488edd4ec55d0f2cc9c92d3d9c2313b;hb=3787aa112c653b34b6f901b2eaae2b62f9582569;hp=d8b1ebc7099684d1dd46fea05cf4d94186fcd7df;hpb=0d090b6819e3559dabb05773c4a6dacc4fa94d0e;p=linux-2.6-omap-h63xx.git diff --git a/arch/blackfin/kernel/fixed_code.S b/arch/blackfin/kernel/fixed_code.S index d8b1ebc7099..4b03ba02548 100644 --- a/arch/blackfin/kernel/fixed_code.S +++ b/arch/blackfin/kernel/fixed_code.S @@ -1,6 +1,6 @@ /* * This file contains sequences of code that will be copied to a - * fixed location, defined in . The interrupt + * fixed location, defined in . The interrupt * handlers ensure that these sequences appear to be atomic when * executed from userspace. * These are aligned to 16 bytes, so that we have some space to replace @@ -101,9 +101,9 @@ ENDPROC (_atomic_ior32) .align 16 /* - * Atomic ior, 32 bit. + * Atomic and, 32 bit. * Inputs: P0: memory address to use - * R0: value to ior + * R0: value to and * Outputs: R0: new contents of the memory address. * R1: previous contents of the memory address. */ @@ -112,13 +112,13 @@ ENTRY(_atomic_and32) R0 = R1 & R0; [P0] = R0; rts; -ENDPROC (_atomic_ior32) +ENDPROC (_atomic_and32) .align 16 /* - * Atomic ior, 32 bit. + * Atomic xor, 32 bit. * Inputs: P0: memory address to use - * R0: value to ior + * R0: value to xor * Outputs: R0: new contents of the memory address. * R1: previous contents of the memory address. */ @@ -127,6 +127,20 @@ ENTRY(_atomic_xor32) R0 = R1 ^ R0; [P0] = R0; rts; -ENDPROC (_atomic_ior32) +ENDPROC (_atomic_xor32) + +.align 16 + /* + * safe_user_instruction + * Four NOPS are enough to allow the pipeline to speculativily load + * execute anything it wants. After that, things have gone bad, and + * we are stuck - so panic. Since we might be in user space, we can't + * call panic, so just cause a unhandled exception, this should cause + * a dump of the trace buffer so we can tell were we are, and a reboot + */ +ENTRY(_safe_user_instruction) + NOP; NOP; NOP; NOP; + EXCPT 0x4; +ENDPROC(_safe_user_instruction) ENTRY(_fixed_code_end)