mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* What's the difference between clear_page and clear_page_c?
@ 2008-11-18 11:35 jidong xiao
  0 siblings, 0 replies; only message in thread
From: jidong xiao @ 2008-11-18 11:35 UTC (permalink / raw)
  To: linux-kernel

Hi, All,

I saw there are clear_page and clear_page_c defined in
arch/x86/lib/clear_page_64.S, but what's the difference between these
two function? In addition, look at below lines copied from
linux-2.6.27-rc2, particularly line 16, is it a typo? I feel it should
be ENDPROC(clear_page_c) other than ENDPROC(clear_page), isn't it??

      4 /*
      5  * Zero a page.
      6  * rdi  page
      7  */
      8         ALIGN
      9 clear_page_c:
     10         CFI_STARTPROC
     11         movl $4096/8,%ecx
     12         xorl %eax,%eax
     13         rep stosq
     14         ret
     15         CFI_ENDPROC
     16 ENDPROC(clear_page)
     17
     18 ENTRY(clear_page)
     19         CFI_STARTPROC
     20         xorl   %eax,%eax
     21         movl   $4096/64,%ecx
     22         .p2align 4
     23 .Lloop:
     24         decl    %ecx
     25 #define PUT(x) movq %rax,x*8(%rdi)
     26         movq %rax,(%rdi)
     27         PUT(1)
     28         PUT(2)
     29         PUT(3)
     30         PUT(4)
     31         PUT(5)
     32         PUT(6)
     33         PUT(7)
     34         leaq    64(%rdi),%rdi
     35         jnz     .Lloop
     36         nop
     37         ret
     38         CFI_ENDPROC
     39 .Lclear_page_end:
     40 ENDPROC(clear_page)

Regards
Jason

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-18 11:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-18 11:35 What's the difference between clear_page and clear_page_c? jidong xiao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®