1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #include <linux/linkage.h>
3 #include <asm/export.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.
16 SYM_FUNC_START(clear_page_rep)
21 SYM_FUNC_END(clear_page_rep)
22 EXPORT_SYMBOL_GPL(clear_page_rep)
24 SYM_FUNC_START(clear_page_orig)
30 #define PUT(x) movq %rax,x*8(%rdi)
43 SYM_FUNC_END(clear_page_orig)
44 EXPORT_SYMBOL_GPL(clear_page_orig)
46 SYM_FUNC_START(clear_page_erms)
51 SYM_FUNC_END(clear_page_erms)
52 EXPORT_SYMBOL_GPL(clear_page_erms)