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