public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: x86 maintainers <x86@kernel.org>, Sam Ravnborg <sam@ravnborg.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH -tip RESEND] x86: asm/unistd.h common for kernel and user space
Date: Sun, 21 Jun 2009 02:45:25 +0530	[thread overview]
Message-ID: <1245532525.2459.6.camel@ht.satnam> (raw)
In-Reply-To: <1245530719.2459.2.camel@ht.satnam>

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




  reply	other threads:[~2009-06-20 21:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18  8:39 [GIT-PULL -tip][PATCH 0/5 -tip] x86: headers fixes Jaswinder Singh Rajput
2009-06-18  8:40 ` [PATCH 1/5 -tip] x86: asm/posix_types.h common for kernel and user space Jaswinder Singh Rajput
2009-06-18  8:41   ` [PATCH 2/5 -tip] x86: move common typedefs to asm/posix_types.h Jaswinder Singh Rajput
2009-06-18  8:41     ` [PATCH 3/5 -tip] x86: asm/unistd.h common for kernel and user space Jaswinder Singh Rajput
2009-06-18  8:42       ` [PATCH 4/5 -tip] x86: asm/termios.h remove irrelevant comment for userspace Jaswinder Singh Rajput
2009-06-18  8:43         ` [PATCH 5/5 -tip] x86: asm/types.h " Jaswinder Singh Rajput
2009-06-18 11:51     ` [PATCH 2/5 -tip] x86: move common typedefs to asm/posix_types.h Christoph Hellwig
2009-06-18 13:10       ` Arnd Bergmann
2009-06-18 13:47         ` Jaswinder Singh Rajput
2009-06-18 17:43 ` [GIT-PULL -tip V2][PATCH 0/4 -tip] x86: headers fixes Jaswinder Singh Rajput
2009-06-18 17:44   ` [PATCH 1/4 -tip V2] x86: unification of posix_types.h Jaswinder Singh Rajput
2009-06-18 17:45     ` [PATCH 2/4 -tip V2] x86: asm/unistd.h common for kernel and user space Jaswinder Singh Rajput
2009-06-18 17:45       ` [PATCH 3/4 -tip V2] x86: asm/termios.h remove irrelevant comment for userspace Jaswinder Singh Rajput
2009-06-18 17:46         ` [PATCH 4/4 -tip V2] x86: asm/types.h " Jaswinder Singh Rajput
2009-06-20 20:46           ` [PATCH -tip RESEND] " Jaswinder Singh Rajput
2009-06-20 20:46         ` [PATCH -tip RESEND] x86: asm/termios.h " Jaswinder Singh Rajput
2009-06-20 20:49           ` Arnd Bergmann
2009-06-20 20:45       ` [PATCH -tip RESEND] x86: asm/unistd.h common for kernel and user space Jaswinder Singh Rajput
2009-06-20 21:15         ` Jaswinder Singh Rajput [this message]
2009-06-20 20:44     ` [PATCH -tip RESEND] x86: unification of posix_types.h Jaswinder Singh Rajput

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245532525.2459.6.camel@ht.satnam \
    --to=jaswinder@kernel.org \
    --cc=arnd@arndb.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sam@ravnborg.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox