diff options
| author | Richard Weinberger <richard@nod.at> | 2015-05-31 13:50:57 -0400 |
|---|---|---|
| committer | Richard Weinberger <richard@nod.at> | 2015-05-31 16:05:32 -0400 |
| commit | 298e20ba8c197e8d429a6c8671550c41c7919033 (patch) | |
| tree | 58010c4512a36344c15defaeb6998d9344714810 /arch/um/include | |
| parent | d2313084e2c3488e254796617fcda45d69731b21 (diff) | |
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.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 @@ | |||
| 40 | typedef int (*initcall_t)(void); | 40 | typedef int (*initcall_t)(void); |
| 41 | typedef void (*exitcall_t)(void); | 41 | typedef void (*exitcall_t)(void); |
| 42 | 42 | ||
| 43 | #ifndef __KERNEL__ | 43 | #ifdef __UM_HOST__ |
| 44 | #ifndef __section | 44 | #ifndef __section |
| 45 | # define __section(S) __attribute__ ((__section__(#S))) | 45 | # define __section(S) __attribute__ ((__section__(#S))) |
| 46 | #endif | 46 | #endif |
| @@ -131,7 +131,7 @@ extern struct uml_param __uml_setup_start, __uml_setup_end; | |||
| 131 | #define __uml_postsetup_call __used __section(.uml.postsetup.init) | 131 | #define __uml_postsetup_call __used __section(.uml.postsetup.init) |
| 132 | #define __uml_exit_call __used __section(.uml.exitcall.exit) | 132 | #define __uml_exit_call __used __section(.uml.exitcall.exit) |
| 133 | 133 | ||
| 134 | #ifndef __KERNEL__ | 134 | #ifdef __UM_HOST__ |
| 135 | 135 | ||
| 136 | #define __define_initcall(level,fn) \ | 136 | #define __define_initcall(level,fn) \ |
| 137 | static initcall_t __initcall_##fn __used \ | 137 | 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 @@ | |||
| 17 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 17 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
| 18 | 18 | ||
| 19 | /* This is to get size_t */ | 19 | /* This is to get size_t */ |
| 20 | #ifdef __KERNEL__ | 20 | #ifndef __UM_HOST__ |
| 21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
| 22 | #else | 22 | #else |
| 23 | #include <stddef.h> | 23 | #include <stddef.h> |
