<br><br><div class="gmail_quote">2012/5/18 HWSW Development <span dir="ltr">&lt;<a href="mailto:hwsw.development@googlemail.com" target="_blank">hwsw.development@googlemail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The macro is defined in arch/x86/include/asm/calling.h<br><br>Regards,<br>Rooney<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">2012/5/18 Bill Traynor <span dir="ltr">&lt;<a href="mailto:wmat@alphatroop.com" target="_blank">wmat@alphatroop.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div><div>On Thu, May 17, 2012 at 10:37 PM, ÍõÕÜ <span dir="ltr">&lt;<a href="mailto:wangzhe5004@gmail.com" target="_blank">wangzhe5004@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br><br><div class="gmail_quote"><div><div>2012/5/17 Javier Martinez Canillas <span dir="ltr">&lt;<a href="mailto:martinez.javier@gmail.com" target="_blank">martinez.javier@gmail.com</a>&gt;</span><br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">




<div><div>On Thu, May 17, 2012 at 3:59 PM, ÍõÕÜ &lt;<a href="mailto:wangzhe5004@gmail.com" target="_blank">wangzhe5004@gmail.com</a>&gt; wrote:<br>
&gt; Hi all:<br>
&gt; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; i am a kernelnewbies.during studying the linux system call,and<br>
&gt; analysis the following code (linux kernel 2.6.38)<br>
&gt;<br>
&gt; 529ENTRY(system_call)<br>
&gt; 530 RING0_INT_FRAME # can&#39;t unwind into user space anyway<br>
&gt; 531 pushl %eax # save orig_eax<br>
&gt; 532 CFI_ADJUST_CFA_OFFSET 4<br>
&gt; 533 SAVE_ALL<br>
&gt; 534 GET_THREAD_INFO(%ebp)<br>
&gt; 535 # system call tracing in operation / emulation<br>
&gt; 536 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)<br>
&gt; 537 jnz syscall_trace_entry<br>
&gt; 538 cmpl $(nr_syscalls), %eax<br>
&gt; 539 jae syscall_badsys<br>
&gt; 540syscall_call:<br>
&gt; 541 call *sys_call_table(,%eax,4)<br>
&gt; 542 movl %eax,PT_EAX(%esp) # store the return value<br>
&gt;<br>
&gt; Question:<br>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i want to see what the SAVE_ALL have done.and can&#39;t find the<br>
&gt; Macro SAVE_ALL<br>
&gt; if anyone knows please help&nbsp;</div></div></blockquote></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>



<div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div><div>
&gt;<br>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Kernelnewbies mailing list<br>
&gt; <a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
&gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
&gt;<br>
<br>
<a href="http://lxr.free-electrons.com/ident?i=SAVE_ALL" target="_blank">http://lxr.free-electrons.com/ident?i=SAVE_ALL</a><br>
<br></blockquote></div></div><div>&nbsp;&nbsp; Thank you &nbsp;Javier Martinez Canillas for reply!</div><div>&nbsp;&nbsp; but the rearch result :</div><div>&nbsp;&nbsp; Defined as a preprocessor macro in:</div><ul><li><a href="http://lxr.free-electrons.com/source/arch/cris/include/arch-v32/arch/irq.h#L32" target="_blank">arch/cris/include/arch-v32/arch/irq.h, line 32</a></li>



<li>
<a href="http://lxr.free-electrons.com/source/arch/cris/include/arch-v10/arch/irq.h#L85" target="_blank">arch/cris/include/arch-v10/arch/irq.h, line 85</a></li><li><a href="http://lxr.free-electrons.com/source/arch/sparc/include/asm/asmmacro.h#L27" target="_blank">arch/sparc/include/asm/asmmacro.h, line 27</a></li>




</ul><p>&nbsp;&nbsp;&nbsp; is not in x86 Architecture.&nbsp;&nbsp;</p></div></blockquote><div><br></div></div></div><div>Couldn&#39;t you find it by doing something like this? &nbsp;In your kernel source tree:</div><div><br></div><div>$cd arch/x86</div>

<div>$grep -ircl &quot;.macro SAVE_ALL&quot; *</div>

<div><br></div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote"><div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">




Best regards,<br>
<span><font color="#888888"><br>
--<br>
Javier Mart¨ªnez Canillas<br>
<a href="tel:%28%2B34%29%20682%2039%2081%2069" value="+34682398169" target="_blank">(+34) 682 39 81 69</a><br>
Barcelona, Spain<br>
</font></span></blockquote></div></div><br>
<br></div><div>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></div></blockquote></div><br>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div>&nbsp;&nbsp;&nbsp;&nbsp; Thanks for all. <br></div></div></blockquote><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; I have sloved the problem. this macro is written with assembly £¬not c .<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No wonder that i don&#39;t search it out in the <a href="http://lxr.linux.no">lxr.linux.no</a><br>
&nbsp;<br>&nbsp; arch/x86/kernel/entry_32.s<br>&nbsp;&nbsp; <br>&nbsp;192 .macro SAVE_ALL<br>&nbsp;193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cld<br>&nbsp;194&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PUSH_GS<br>&nbsp;195&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %fs<br>&nbsp;196&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*CFI_REL_OFFSET fs, 0;*/<br>&nbsp;197&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %es<br>&nbsp;198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*CFI_REL_OFFSET es, 0;*/<br>
&nbsp;199&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %ds<br>&nbsp;200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*CFI_REL_OFFSET ds, 0;*/<br>&nbsp;201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %eax<br>&nbsp;202&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFI_REL_OFFSET eax, 0<br>&nbsp;203&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %ebp<br>&nbsp;204&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFI_REL_OFFSET ebp, 0<br>&nbsp;205&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %edi<br>
&nbsp;206&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFI_REL_OFFSET edi, 0<br>&nbsp;207&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %esi<br>&nbsp;208&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFI_REL_OFFSET esi, 0<br>&nbsp;209&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %edx<br>&nbsp;210&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFI_REL_OFFSET edx, 0<br>&nbsp;211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %ecx<br>&nbsp;212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFI_REL_OFFSET ecx, 0<br>
&nbsp;213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushl_cfi %ebx<br>&nbsp;214&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFI_REL_OFFSET ebx, 0<br>&nbsp;215&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl $(__USER_DS), %edx<br>&nbsp;216&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl %edx, %ds<br>&nbsp;217&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl %edx, %es<br>&nbsp;218&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl $(__KERNEL_PERCPU), %edx<br>&nbsp;219&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; movl %edx, %fs<br>
&nbsp;220&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET_KERNEL_GS %edx<br>&nbsp;221 .endm<br>&nbsp;<br></div></div><br><br clear="all"><br>-- <br><div>----------------------------------------------------------------------------------------------</div><div>WangZhe&nbsp;&nbsp;Xi&#39;an Shanxi CHINA</div>
<div>qq&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 785924174</div><div>blog&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://blog.163.com/zhe_wang_2009" target="_blank">blog.163.com/zhe_wang_2009</a></div><div>----------------------------------------------------------------------------------------------</div>
<br>