summaryrefslogtreecommitdiff
path: root/arch/mips/mm/maccess.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mm/maccess.c')
-rw-r--r--arch/mips/mm/maccess.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/mm/maccess.c b/arch/mips/mm/maccess.c
new file mode 100644
index 000000000000..58173842c6be
--- /dev/null
+++ b/arch/mips/mm/maccess.c
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <linux/uaccess.h>
+#include <linux/kernel.h>
+
+bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
+{
+ /* highest bit set means kernel space */
+ return (unsigned long)unsafe_src >> (BITS_PER_LONG - 1);
+}