|
@@ -26,11 +26,24 @@ _GLOBAL(__copy_tofrom_user)
|
|
andi. r6,r6,7
|
|
andi. r6,r6,7
|
|
PPC_MTOCRF 0x01,r5
|
|
PPC_MTOCRF 0x01,r5
|
|
blt cr1,.Lshort_copy
|
|
blt cr1,.Lshort_copy
|
|
|
|
+/* Below we want to nop out the bne if we're on a CPU that has the
|
|
|
|
+ * CPU_FTR_UNALIGNED_LD_STD bit set and the CPU_FTR_CP_USE_DCBTZ bit
|
|
|
|
+ * cleared.
|
|
|
|
+ * At the time of writing the only CPU that has this combination of bits
|
|
|
|
+ * set is Power6.
|
|
|
|
+ */
|
|
|
|
+BEGIN_FTR_SECTION
|
|
|
|
+ nop
|
|
|
|
+FTR_SECTION_ELSE
|
|
bne .Ldst_unaligned
|
|
bne .Ldst_unaligned
|
|
|
|
+ALT_FTR_SECTION_END(CPU_FTR_UNALIGNED_LD_STD | CPU_FTR_CP_USE_DCBTZ, \
|
|
|
|
+ CPU_FTR_UNALIGNED_LD_STD)
|
|
.Ldst_aligned:
|
|
.Ldst_aligned:
|
|
- andi. r0,r4,7
|
|
|
|
addi r3,r3,-16
|
|
addi r3,r3,-16
|
|
|
|
+BEGIN_FTR_SECTION
|
|
|
|
+ andi. r0,r4,7
|
|
bne .Lsrc_unaligned
|
|
bne .Lsrc_unaligned
|
|
|
|
+END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
|
|
srdi r7,r5,4
|
|
srdi r7,r5,4
|
|
20: ld r9,0(r4)
|
|
20: ld r9,0(r4)
|
|
addi r4,r4,-8
|
|
addi r4,r4,-8
|
|
@@ -138,7 +151,7 @@ _GLOBAL(__copy_tofrom_user)
|
|
PPC_MTOCRF 0x01,r6 /* put #bytes to 8B bdry into cr7 */
|
|
PPC_MTOCRF 0x01,r6 /* put #bytes to 8B bdry into cr7 */
|
|
subf r5,r6,r5
|
|
subf r5,r6,r5
|
|
li r7,0
|
|
li r7,0
|
|
- cmpldi r1,r5,16
|
|
|
|
|
|
+ cmpldi cr1,r5,16
|
|
bf cr7*4+3,1f
|
|
bf cr7*4+3,1f
|
|
35: lbz r0,0(r4)
|
|
35: lbz r0,0(r4)
|
|
81: stb r0,0(r3)
|
|
81: stb r0,0(r3)
|