Message ID | 20220406091311.3354723-2-tongtiangen@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | arm64: add machine check safe support | expand |
在 2022/4/6 17:22, Borislav Petkov 写道: > On Wed, Apr 06, 2022 at 09:13:05AM +0000, Tong Tiangen wrote: >> The follow patch > > There's no concept of "follow patch" in git - you need to explain this > differently. > >> will add copy_mc_to_user to include/linux/uaccess.h, X86 >> must declare Implemented to avoid compile error. > > I don't know what that means. Try again pls. > This description is not good, will redescribe it in next version. Here I describe the reasons for this: Patch 3/7 in patchset[1] introduce copy_mc_to_user() in include/linux/uaccess.h and the prototype is: static inline unsigned long __must_check copy_mc_to_user(void *dst, const void *src, size_t cnt) The prototype in x86 is: unsigned long __must_check copy_mc_to_user(void *to, const void *from, unsigned len); This two are a little different, so I added the follow code to x86 to avoid prototype conflict compile error. #define copy_mc_to_user copy_mc_to_user In addition, I think this #define should be added here. [1]https://patchwork.kernel.org/project/linux-mm/cover/20220406091311.3354723-1-tongtiangen@huawei.com/ Thanks. Tong.
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index f78e2b3501a1..e18c5f098025 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h @@ -415,6 +415,7 @@ copy_mc_to_kernel(void *to, const void *from, unsigned len); unsigned long __must_check copy_mc_to_user(void *to, const void *from, unsigned len); +#define copy_mc_to_user copy_mc_to_user #endif /*
The follow patch will add copy_mc_to_user to include/linux/uaccess.h, X86 must declare Implemented to avoid compile error. Signed-off-by: Tong Tiangen <tongtiangen@huawei.com> --- arch/x86/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+)