summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/uaccess.h
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-09-27 20:06:00 +0300
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-10-05 18:17:05 +0300
commitc7368ddba2ffcc5d200122c5bb122c3825ecb976 (patch)
treefbf5020ddfd96c80d20c92aeadaadcb88df13743 /arch/arm/include/asm/uaccess.h
parent24d3ba0a7b44c1617c27f5045eecc4f34752ab03 (diff)
downloadlinux-c7368ddba2ffcc5d200122c5bb122c3825ecb976.tar.xz
ARM: 9326/1: make <linux/uaccess.h> self-contained for ARM
When I compiled the following code for ARM, I encountered numerous errors. [Test Code] #include <linux/compiler.h> #include <linux/uaccess.h> int foo(int *x, int __user *ptr) { return get_user(*x, ptr); } To fix the errors, make some asm headers self-contained: 1. In arch/arm/include/asm/domain.h, include <linux/thread_info.h> for current_thread_info(). 2. In arch/arm/include/asm/traps.h, remove unneeded __init, and include <linux/linkage.h> for asmlinkage. 3. In arch/arm/include/asm/uaccess.h, include <linux/kernel.h> for might_fault(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/uaccess.h')
-rw-r--r--arch/arm/include/asm/uaccess.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index c28f5ec21e41..9556d04387f7 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -8,6 +8,7 @@
/*
* User space memory access functions
*/
+#include <linux/kernel.h>
#include <linux/string.h>
#include <asm/page.h>
#include <asm/domain.h>