lkml.org 
[lkml]   [2009]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH -tip RESEND] x86: asm/unistd.h common for kernel and user space
From
Date
On Sun, 2009-06-21 at 02:15 +0530, Jaswinder Singh Rajput wrote:
> Make asm/unistd.h common for kernel and user space.
>
> Also defined _ASM_X86_UNISTD_H
>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> ---
> arch/x86/include/asm/unistd.h | 15 ++++++---------
> 1 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h
> index 2a58ed3..0de8cb3 100644
> --- a/arch/x86/include/asm/unistd.h
> +++ b/arch/x86/include/asm/unistd.h
> @@ -1,13 +1,10 @@
> -#ifdef __KERNEL__
> -# ifdef CONFIG_X86_32
> +#ifndef _ASM_X86_UNISTD_H
> +#define _ASM_X86_UNISTD_H
> +
> +# if defined(CONFIG_X86_32) || defined(__i386__)
> # include "unistd_32.h"
> # else
> # include "unistd_64.h"
> # endif
> -#else
> -# ifdef __i386__
> -# include "unistd_32.h"
> -# else
> -# include "unistd_64.h"
> -# endif
> -#endif
> +
> +#endif /* _ASM_X86_UNISTD_H */

Can we use this :

[PATCH -tip] x86: asm/unistd.h common for kernel and user space

Make asm/unistd.h common for kernel and user space.

Also defined _ASM_X86_UNISTD_H

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
arch/x86/include/asm/unistd.h | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h
index 2a58ed3..3e8182e 100644
--- a/arch/x86/include/asm/unistd.h
+++ b/arch/x86/include/asm/unistd.h
@@ -1,13 +1,10 @@
-#ifdef __KERNEL__
-# ifdef CONFIG_X86_32
-# include "unistd_32.h"
-# else
-# include "unistd_64.h"
-# endif
+#ifndef _ASM_X86_UNISTD_H
+#define _ASM_X86_UNISTD_H
+
+#ifdef __x86_64__
+# include "unistd_64.h"
#else
-# ifdef __i386__
-# include "unistd_32.h"
-# else
-# include "unistd_64.h"
-# endif
+# include "unistd_32.h"
#endif
+
+#endif /* _ASM_X86_UNISTD_H */
--
1.6.0.6




\
 
 \ /
  Last update: 2009-06-20 23:17    [W:0.075 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site