提交 0bcd0a2b 编写于 作者: C Christoph Hellwig 提交者: Arnd Bergmann

asm-generic: mark __{get,put}_user_fn as __always_inline

Without the explicit __always_inline, some RISC-V configs place the
functions out of line, triggering the BUILD_BUG_ON checks in the
function.

Fixes: 11129e8e ("riscv: use memcpy based uaccess for nommu again")
Reported-by: Nkernel test robot <lkp@intel.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 3650b228
......@@ -12,7 +12,8 @@
#ifdef CONFIG_UACCESS_MEMCPY
#include <asm/unaligned.h>
static inline int __get_user_fn(size_t size, const void __user *from, void *to)
static __always_inline int
__get_user_fn(size_t size, const void __user *from, void *to)
{
BUILD_BUG_ON(!__builtin_constant_p(size));
......@@ -37,7 +38,8 @@ static inline int __get_user_fn(size_t size, const void __user *from, void *to)
}
#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
static inline int __put_user_fn(size_t size, void __user *to, void *from)
static __always_inline int
__put_user_fn(size_t size, void __user *to, void *from)
{
BUILD_BUG_ON(!__builtin_constant_p(size));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册