diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-07 07:58:21 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-10-04 10:27:02 -0700 |
commit | 3c57fa13f6bf3906643034c57736c778ce63fa55 (patch) | |
tree | 04270a878e3787dc1f8c206203263c595dc9a708 | |
parent | 2d2d255467d4ea927fbf606c8b584512edee0f7b (diff) |
asm-generic: make the set_fs implementation optional
Put all the set_fs related code under CONFIG_SET_FS so that
asm-generic/uaccess.h can be used for set_fs-less builds.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
-rw-r--r-- | include/asm-generic/uaccess.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index b367f339be1a..45f9872fd747 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h @@ -94,6 +94,7 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n) #define INLINE_COPY_TO_USER #endif /* CONFIG_UACCESS_MEMCPY */ +#ifdef CONFIG_SET_FS #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) #ifndef KERNEL_DS @@ -116,6 +117,7 @@ static inline void set_fs(mm_segment_t fs) #ifndef uaccess_kernel #define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg) #endif +#endif /* CONFIG_SET_FS */ #define access_ok(addr, size) __access_ok((unsigned long)(addr),(size)) |