diff options
author | Richard Weinberger <richard@nod.at> | 2015-05-31 19:50:57 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-05-31 22:05:32 +0200 |
commit | 298e20ba8c197e8d429a6c8671550c41c7919033 (patch) | |
tree | 58010c4512a36344c15defaeb6998d9344714810 /arch/um/include/shared | |
parent | um: Catch unprotected user memory access (diff) | |
download | linux-298e20ba8c197e8d429a6c8671550c41c7919033.tar.xz linux-298e20ba8c197e8d429a6c8671550c41c7919033.zip |
um: Stop abusing __KERNEL__
Currently UML is abusing __KERNEL__ to distinguish between
kernel and host code (os-Linux). It is better to use a custom
define such that existing users of __KERNEL__ don't get confused.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include/shared')
-rw-r--r-- | arch/um/include/shared/init.h | 4 | ||||
-rw-r--r-- | arch/um/include/shared/user.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/um/include/shared/init.h b/arch/um/include/shared/init.h index b3906f860a87..031ad1d111e7 100644 --- a/arch/um/include/shared/init.h +++ b/arch/um/include/shared/init.h @@ -40,7 +40,7 @@ typedef int (*initcall_t)(void); typedef void (*exitcall_t)(void); -#ifndef __KERNEL__ +#ifdef __UM_HOST__ #ifndef __section # define __section(S) __attribute__ ((__section__(#S))) #endif @@ -131,7 +131,7 @@ extern struct uml_param __uml_setup_start, __uml_setup_end; #define __uml_postsetup_call __used __section(.uml.postsetup.init) #define __uml_exit_call __used __section(.uml.exitcall.exit) -#ifndef __KERNEL__ +#ifdef __UM_HOST__ #define __define_initcall(level,fn) \ static initcall_t __initcall_##fn __used \ diff --git a/arch/um/include/shared/user.h b/arch/um/include/shared/user.h index cef068563336..4cff19f6207a 100644 --- a/arch/um/include/shared/user.h +++ b/arch/um/include/shared/user.h @@ -17,7 +17,7 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) /* This is to get size_t */ -#ifdef __KERNEL__ +#ifndef __UM_HOST__ #include <linux/types.h> #else #include <stddef.h> |