summaryrefslogtreecommitdiff
path: root/arch/um/include
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2015-05-31 20:50:57 +0300
committerRichard Weinberger <richard@nod.at>2015-05-31 23:05:32 +0300
commit298e20ba8c197e8d429a6c8671550c41c7919033 (patch)
tree58010c4512a36344c15defaeb6998d9344714810 /arch/um/include
parentd2313084e2c3488e254796617fcda45d69731b21 (diff)
downloadlinux-298e20ba8c197e8d429a6c8671550c41c7919033.tar.xz
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')
-rw-r--r--arch/um/include/shared/init.h4
-rw-r--r--arch/um/include/shared/user.h2
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>