Hi Sumedh,<br><br>You may check the context in which your CPU in running the C code from interrupt context (ie stack pointer (r1), kernel locks disabling rescheduling etc..) and double check the IRQ originator (the decrementer) is acknowlegded somewhere your handler before enabling back interrupts, else your handler gets fired.<br>
<br>--<br>sj<br><br><div class="gmail_quote">2009/2/23 sumedh tirodkar <span dir="ltr">&lt;<a href="mailto:sumedhtirodkar@gmail.com">sumedhtirodkar@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Alright...I am trying to develop a system of my own..<br>
Consider that i am not using any linux kernel...I m writing some<br>
program right from scratch.........<br>
The major steps that i have taken are...<br>
<br>
1. Started with a assembly file...<br>
2. Have relocated the interrupt handlers to there respective<br>
positions...The interrupt handlers are written in assembly language...<br>
3. Initialised Decrementer register to get an interrupt after some interval...<br>
4. Jump to some function using<br>
<br>
 &nbsp; &nbsp;bl &lt;function_name_main&gt;<br>
<br>
 &nbsp; &nbsp;function_name_main which will have a infinite while loop..<br>
This works fine i.e. the interrupts(decrementer interrupt to be more<br>
specific) work fine...I have initialised serial port to get the<br>
output...<br>
<br>
Now, the problem that i am facing....<br>
<br>
If in interrupt handler of the decrementer, i make a call to some C<br>
function in some other C file...using the follwing statement...<br>
<br>
Dec_handler: &nbsp;/* I have relocated this to interrupt vector address of<br>
decrementer interrupt*/<br>
 &nbsp; &nbsp; /*code to print using serial port*/<br>
 &nbsp; &nbsp; bla &lt;function_name_handler&gt; /*code to call some function in C file*/<br>
 &nbsp; &nbsp; /*code to print using serial port---but i m never able to see this output*/<br>
 &nbsp; &nbsp; RFI<br>
<br>
This starts creating a problem...somehow we dont return to this code<br>
after the end of the function_name_handler...<br>
Consider the following code for the function_name_handler:<br>
void function_name_handler(void)<br>
{<br>
 &nbsp; /*Some action*/<br>
}<br>
<br>
So, if its possible for anyone to help me with this...please reply...<br>
<br>
Regards,<br>
<font color="#888888">Sumedh<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
On Mon, Feb 23, 2009 at 8:18 PM, Matt Gessner &lt;<a href="mailto:mgessner@gmail.com">mgessner@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Feb 23, 2009 at 8:03 AM, sumedh tirodkar &lt;<a href="mailto:sumedhtirodkar@gmail.com">sumedhtirodkar@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I am using PowerPC 7447A...I am trying to port SA-RTL on PowerPC...<br>
&gt;<br>
&gt; What I said earlier was: You need to tell people what cpu you&#39;re using, what<br>
&gt; linux kernel, etc etc etc.<br>
&gt;<br>
&gt; Fine, we know the CPU. &nbsp;What kernel are you using? &nbsp;Is it ancient?<br>
&gt;<br>
&gt; I doubt the information below is going to be useful...<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; I am using<br>
&gt;&gt;<br>
&gt;&gt; bla &lt;function_name&gt;<br>
&gt;&gt;<br>
&gt;&gt; from the assembly code to call the function in C file...This i am<br>
&gt;&gt; doing from interrupt handler of the decrementer...<br>
&gt;&gt; If any more details are required, please let me know...<br>
&gt;<br>
&gt;<br>
</div></div><div><div></div><div class="Wj3C7c">_______________________________________________<br>
Linuxppc-dev mailing list<br>
<a href="mailto:Linuxppc-dev@ozlabs.org">Linuxppc-dev@ozlabs.org</a><br>
<a href="https://ozlabs.org/mailman/listinfo/linuxppc-dev" target="_blank">https://ozlabs.org/mailman/listinfo/linuxppc-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>------------------<br>Sylvain JOYEAU<br>Freelance Engineer<br>Software RT-OS R&amp;D<br><a href="mailto:sylvain.joyeau@gmail.com">sylvain.joyeau@gmail.com</a><br>
Tél: +33-(0)667 477 052<br>&quot;A good idea is one side of the coin. The other side is the practical usefulness&quot;. J. Liedke.<br>