To generate Software Interrupt to ARM920T processor
I am trying to generate SWI - SoftWare Interrupt - to ARM920T processor.I am using linux2.6.14 and arm tool chain for compilation.
Uptil now I have tried following things to implement above-mentioned thing.
- I have one unsigned long variable "swi_no" and this variable contains swi number, which is generated dynamically. So through this swi number, I can generate swi interrupt.
I have used following asm statements to implement this thing.
__asm__ __volatile("MOVS r0,%0" : :"r"(swi_no));
__asm__ __volatile("SWI r0");
I have also tried following one
__asm__ __volatile("SWI %0" : :"r"(swi_no) );
BUT BOTH GIVES SAME ERROR AS
ERROR:can't rellocate swi
Here ,i think some other assemblly statement can also be possible, but i dont know wht is tht...
SO ANYBODY CAN PLEASE SUGGEST
1) SOME WAY OUT OF MY ERROR
2) SOME OTHER ASSEMBLY STATEMENT TO IMPLEMENT ABOVE MENTIONED THING.