1 /* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */
3 #include <linux/linkage.h>
4 #include <asm/dwarf2.h>
5 #include <asm/alternative-asm.h>
16 /* Don't use streaming store because it's better when the target
19 /* Could vary the prefetch distance based on SMP/UP */
24 CFI_ADJUST_CFA_OFFSET 3*8
28 CFI_REL_OFFSET r12, 1*8
30 CFI_REL_OFFSET r13, 2*8
32 movl $(4096/64)-5,%ecx
97 CFI_ADJUST_CFA_OFFSET -3*8
103 /* Some CPUs run faster using the string copy instructions.
104 It is also a lot simpler. Use this when possible */
106 #include <asm/cpufeature.h>
108 .section .altinstr_replacement,"ax"
109 1: .byte 0xeb /* jmp <disp8> */
110 .byte (copy_page_c - copy_page) - (2f - 1b) /* offset */
113 .section .altinstructions,"a"
114 altinstruction_entry copy_page, 1b, X86_FEATURE_REP_GOOD, \
115 .Lcopy_page_end-copy_page, 2b-1b