2 * From code in arch/x86/lib/usercopy_64.c, copied to keep tools/ copy
3 * of the kernel's arch/x86/lib/memcpy_64.s used in 'perf bench mem memcpy'
6 #include <linux/types.h>
8 unsigned long __memcpy_mcsafe(void *dst
, const void *src
, size_t cnt
);
9 unsigned long mcsafe_handle_tail(char *to
, char *from
, unsigned len
);
11 unsigned long mcsafe_handle_tail(char *to
, char *from
, unsigned len
)
13 for (; len
; --len
, to
++, from
++) {
15 * Call the assembly routine back directly since
16 * memcpy_mcsafe() may silently fallback to memcpy.
18 unsigned long rem
= __memcpy_mcsafe(to
, from
, 1);