|
@@ -116,7 +116,8 @@ int strcmp(const char *cs, const char *ct);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#define __HAVE_ARCH_MEMCPY_MCSAFE 1
|
|
#define __HAVE_ARCH_MEMCPY_MCSAFE 1
|
|
-__must_check int __memcpy_mcsafe(void *dst, const void *src, size_t cnt);
|
|
|
|
|
|
+__must_check unsigned long __memcpy_mcsafe(void *dst, const void *src,
|
|
|
|
+ size_t cnt);
|
|
DECLARE_STATIC_KEY_FALSE(mcsafe_key);
|
|
DECLARE_STATIC_KEY_FALSE(mcsafe_key);
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -131,9 +132,10 @@ DECLARE_STATIC_KEY_FALSE(mcsafe_key);
|
|
* actually do machine check recovery. Everyone else can just
|
|
* actually do machine check recovery. Everyone else can just
|
|
* use memcpy().
|
|
* use memcpy().
|
|
*
|
|
*
|
|
- * Return 0 for success, -EFAULT for fail
|
|
|
|
|
|
+ * Return 0 for success, or number of bytes not copied if there was an
|
|
|
|
+ * exception.
|
|
*/
|
|
*/
|
|
-static __always_inline __must_check int
|
|
|
|
|
|
+static __always_inline __must_check unsigned long
|
|
memcpy_mcsafe(void *dst, const void *src, size_t cnt)
|
|
memcpy_mcsafe(void *dst, const void *src, size_t cnt)
|
|
{
|
|
{
|
|
#ifdef CONFIG_X86_MCE
|
|
#ifdef CONFIG_X86_MCE
|