patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / ppc / kernel / misc.S
index 7a0b48b..bd006ca 100644 (file)
@@ -780,9 +780,18 @@ _GLOBAL(clear_pages)
 _GLOBAL(copy_page)
        addi    r3,r3,-4
        addi    r4,r4,-4
+
+#ifdef CONFIG_8xx
+       /* don't use prefetch on 8xx */
+       li      r0,4096/L1_CACHE_LINE_SIZE
+       mtctr   r0
+1:     COPY_16_BYTES
+       bdnz    1b
+       blr
+
+#else  /* not 8xx, we can prefetch */
        li      r5,4
 
-#ifndef CONFIG_8xx
 #if MAX_COPY_PREFETCH > 1
        li      r0,MAX_COPY_PREFETCH
        li      r11,4
@@ -790,19 +799,17 @@ _GLOBAL(copy_page)
 11:    dcbt    r11,r4
        addi    r11,r11,L1_CACHE_LINE_SIZE
        bdnz    11b
-#else /* MAX_L1_COPY_PREFETCH == 1 */
+#else /* MAX_COPY_PREFETCH == 1 */
        dcbt    r5,r4
        li      r11,L1_CACHE_LINE_SIZE+4
-#endif /* MAX_L1_COPY_PREFETCH */
-#endif /* CONFIG_8xx */
-
-       li      r0,4096/L1_CACHE_LINE_SIZE
+#endif /* MAX_COPY_PREFETCH */
+       li      r0,4096/L1_CACHE_LINE_SIZE - MAX_COPY_PREFETCH
+       crclr   4*cr0+eq
+2:
        mtctr   r0
 1:
-#ifndef CONFIG_8xx
        dcbt    r11,r4
        dcbz    r5,r3
-#endif
        COPY_16_BYTES
 #if L1_CACHE_LINE_SIZE >= 32
        COPY_16_BYTES
@@ -818,7 +825,12 @@ _GLOBAL(copy_page)
 #endif
 #endif
        bdnz    1b
-       blr
+       beqlr
+       crnot   4*cr0+eq,4*cr0+eq
+       li      r0,MAX_COPY_PREFETCH
+       li      r11,4
+       b       2b
+#endif /* CONFIG_8xx */
 
 /*
  * void atomic_clear_mask(atomic_t mask, atomic_t *addr)
@@ -1385,3 +1397,4 @@ _GLOBAL(sys_call_table)
        .long sys_mq_timedreceive       /* 265 */
        .long sys_mq_notify
        .long sys_mq_getsetattr
+       .long sys_ni_syscall            /* 268 reserved for sys_kexec_load */