1 #include <linux/linkage.h>
2 #include <asm/cpufeature.h>
3 #include <asm/alternative-asm.h>
6 * Most CPUs support enhanced REP MOVSB/STOSB instructions. It is
7 * recommended to use this when possible and we do use them by default.
8 * If enhanced REP MOVSB/STOSB is not available, try to use fast string.
9 * Otherwise, use original.
18 ALTERNATIVE_2 "jmp clear_page_orig", "", X86_FEATURE_REP_GOOD, \
19 "jmp clear_page_c_e", X86_FEATURE_ERMS
27 ENTRY(clear_page_orig)
34 #define PUT(x) movq %rax,x*8(%rdi)
47 ENDPROC(clear_page_orig)
54 ENDPROC(clear_page_c_e)