summaryrefslogtreecommitdiff
path: root/arch/m68k/Kconfig
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@linux-m68k.org>2020-09-09 11:27:27 +1000
committerGreg Ungerer <gerg@linux-m68k.org>2020-10-05 21:51:31 +1000
commita27bc11f4b7c54a95a977a8e8b15c84dac804bd4 (patch)
tree5f33c52bfe54812bd1bcad330135b2311ccb3ac6 /arch/m68k/Kconfig
parent549738f15da0e5a00275977623be199fbbf7df50 (diff)
m68knommu: switch to using asm-generic/uaccess.h
Switch to using the asm-generic/uaccess functions for non-MMU builds. Remove all the m68knommu local specific uaccess defines and macros. There is nothing so special about the m68knommu targets that they cannot use all of the asm-generic uaccess support. Using the asm-generic uaccess definitions also resolves some of the existing problems with missing __user annotations in the m68knommu specific functions. The elimination of all of the contents of uaccess_no.h means we can fold the uaccess_mm.h back into uaccess.h - and just have the single file now. The resulting generated code ends up being slightly smaller (by a few hundred bytes) due to the compilers ability to better optimize load and stores without forcing its hand with asm statements. Specifically trivial cases like this contrived example: get_user(x, ptr); x++; put_user(x, ptr); end up now being optimized to a single instruction on m68k. More generally the compiler can avoid using a temporary register in many cases as well. Reported-by: kernel test robot <lkp@intel.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Diffstat (limited to 'arch/m68k/Kconfig')
-rw-r--r--arch/m68k/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 6f2f38d05772..aefffebc0afa 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -24,6 +24,7 @@ config M68K
select GENERIC_IOMAP
select GENERIC_STRNCPY_FROM_USER if MMU
select GENERIC_STRNLEN_USER if MMU
+ select UACCESS_MEMCPY if !MMU
select ARCH_WANT_IPC_PARSE_VERSION
select HAVE_FUTEX_CMPXCHG if MMU && FUTEX
select HAVE_MOD_ARCH_SPECIFIC