diff options
author | Dan Williams <dan.j.williams@intel.com> | 2018-05-23 02:17:03 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-05-23 02:17:03 -0400 |
commit | 522239b445a2de988edb81672963708a6aaf9046 (patch) | |
tree | aa51da520dcd8261517c8252bc8a7c68d7cfdb7b | |
parent | 8780356ef630aa577fd4daa49e49b79674711fae (diff) |
uio, lib: Fix CONFIG_ARCH_HAS_UACCESS_MCSAFE compilation
Add a common Kconfig CONFIG_ARCH_HAS_UACCESS_MCSAFE that archs can
optionally select, and fixup the declaration of _copy_to_iter_mcsafe().
Fixes: 8780356ef630 ("x86/asm/memcpy_mcsafe: Define copy_to_iter_mcsafe()")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | include/linux/uio.h | 2 | ||||
-rw-r--r-- | lib/Kconfig | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index f5766e853a77..409c845d4cd3 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -155,7 +155,7 @@ size_t _copy_from_iter_flushcache(void *addr, size_t bytes, struct iov_iter *i); | |||
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | #ifdef CONFIG_ARCH_HAS_UACCESS_MCSAFE | 157 | #ifdef CONFIG_ARCH_HAS_UACCESS_MCSAFE |
158 | size_t _copy_to_iter_mcsafe(void *addr, size_t bytes, struct iov_iter *i); | 158 | size_t _copy_to_iter_mcsafe(const void *addr, size_t bytes, struct iov_iter *i); |
159 | #else | 159 | #else |
160 | #define _copy_to_iter_mcsafe _copy_to_iter | 160 | #define _copy_to_iter_mcsafe _copy_to_iter |
161 | #endif | 161 | #endif |
diff --git a/lib/Kconfig b/lib/Kconfig index 5fe577673b98..907f6e4f1cf2 100644 --- a/lib/Kconfig +++ b/lib/Kconfig | |||
@@ -586,6 +586,9 @@ config ARCH_HAS_PMEM_API | |||
586 | config ARCH_HAS_UACCESS_FLUSHCACHE | 586 | config ARCH_HAS_UACCESS_FLUSHCACHE |
587 | bool | 587 | bool |
588 | 588 | ||
589 | config ARCH_HAS_UACCESS_MCSAFE | ||
590 | bool | ||
591 | |||
589 | config STACKDEPOT | 592 | config STACKDEPOT |
590 | bool | 593 | bool |
591 | select STACKTRACE | 594 | select STACKTRACE |