]> Pileus Git - ~andy/linux/blobdiff - arch/sh/mm/clear_page.S
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
[~andy/linux] / arch / sh / mm / clear_page.S
index 7b96425ae270ec932b324465001f0d42eb15ff25..7a7c81ee3f01659b14f24d818c02cb4e5f525f07 100644 (file)
@@ -1,12 +1,12 @@
-/* $Id: clear_page.S,v 1.13 2003/08/25 17:03:10 lethal Exp $
- *
+/*
  * __clear_user_page, __clear_user, clear_page implementation of SuperH
  *
  * Copyright (C) 2001  Kaz Kojima
  * Copyright (C) 2001, 2002  Niibe Yutaka
- *
+ * Copyright (C) 2006  Paul Mundt
  */
 #include <linux/linkage.h>
+#include <asm/page.h>
 
 /*
  * clear_page_slow
 /*
  * r0 --- scratch
  * r4 --- to
- * r5 --- to + 4096
+ * r5 --- to + PAGE_SIZE
  */
 ENTRY(clear_page_slow)
        mov     r4,r5
-       mov.w   .Llimit,r0
+       mov.l   .Llimit,r0
        add     r0,r5
        mov     #0,r0
        !
@@ -50,7 +50,7 @@ ENTRY(clear_page_slow)
        !
        rts
         nop
-.Llimit:       .word   (4096-28)
+.Llimit:       .long   (PAGE_SIZE-28)
 
 ENTRY(__clear_user)
        !
@@ -150,48 +150,3 @@ ENTRY(__clear_user)
        .long   8b, .Lbad_clear_user
        .long   9b, .Lbad_clear_user
 .previous
-
-#if defined(CONFIG_CPU_SH4)
-/*
- * __clear_user_page
- * @to: P3 address (with same color)
- * @orig_to: P1 address
- *
- * void __clear_user_page(void *to, void *orig_to)
- */
-
-/*
- * r0 --- scratch 
- * r4 --- to
- * r5 --- orig_to
- * r6 --- to + 4096
- */
-ENTRY(__clear_user_page)
-       mov.w   .L4096,r0
-       mov     r4,r6
-       add     r0,r6
-       mov     #0,r0
-       !
-1:     ocbi    @r5
-       add     #32,r5
-       movca.l r0,@r4
-       mov     r4,r1
-       add     #32,r4
-       mov.l   r0,@-r4
-       mov.l   r0,@-r4
-       mov.l   r0,@-r4
-       mov.l   r0,@-r4
-       mov.l   r0,@-r4
-       mov.l   r0,@-r4
-       mov.l   r0,@-r4
-       add     #28,r4
-       cmp/eq  r6,r4
-       bf/s    1b
-        ocbwb  @r1
-       !
-       rts
-        nop
-.L4096:        .word   4096
-
-#endif
-