linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
       [not found] <1233385816.17794.16.camel@localhost.localdomain>
@ 2009-02-06  8:19 ` KOSAKI Motohiro
  2009-02-06  8:53   ` [PATCH] " Jaswinder Singh Rajput
  2009-02-06 13:42   ` Sam Ravnborg
  0 siblings, 2 replies; 21+ messages in thread
From: KOSAKI Motohiro @ 2009-02-06  8:19 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: kosaki.motohiro, Ingo Molnar, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML, linux-next,
	linux-ia64

> diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
> index 3859558..b6395ad 100644
> --- a/arch/ia64/include/asm/fpu.h
> +++ b/arch/ia64/include/asm/fpu.h
> @@ -6,7 +6,7 @@
>   *	David Mosberger-Tang <davidm@hpl.hp.com>
>   */
>  
> -#include <asm/types.h>
> +#include <linux/types.h>

this change break ia64 build perfectly.
this patch seems don't tested at all.

Ingo, I hope you ask patch author how to test posted patch ;-)

==
Subject: [PATCH] revert headers_check fix: ia64, fpu.h

commit fa9ea6c7abd94482ecd84e130676b6a1b3e61c2c break ia64 build perfectly.
it because ia64 has following include file dependency.

entry.S
 -> asm/processor.h
    -> asm/ptrace.h
       -> asm/fpu.h

Then, above commit introduce below dependency.

entry.S
 -> asm/processor.h
    -> asm/ptrace.h
       -> asm/fpu.h
          -> linux/types.h
             -> linux/posix_types.h
                -> linux/stddef.h

Then, assembler can't intepret following statement in stddef.h

enum {
        false   = 0,
        true    = 1
};


Therefore, >100 line tons error was outputed.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-next <linux-next@vger.kernel.org>
Cc: linux-ia64 <linux-ia64@vger.kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
---
 arch/ia64/include/asm/fpu.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/arch/ia64/include/asm/fpu.h
===================================================================
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,7 +6,7 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <linux/types.h>
+#include <asm/types.h>
 
 /* floating point status register: */
 #define FPSR_TRAP_VD	(1 << 0)	/* invalid op trap disabled */



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  8:19 ` [linux-next][PATCH] revert headers_check fix: ia64, fpu.h KOSAKI Motohiro
@ 2009-02-06  8:53   ` Jaswinder Singh Rajput
  2009-02-06  9:11     ` [linux-next][PATCH] " KOSAKI Motohiro
  2009-02-06 18:53     ` [PATCH] " Luck, Tony
  2009-02-06 13:42   ` Sam Ravnborg
  1 sibling, 2 replies; 21+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06  8:53 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML, linux-next,
	linux-ia64

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

On Fri, Feb 6, 2009 at 1:49 PM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-next <linux-next@vger.kernel.org>
> Cc: linux-ia64 <linux-ia64@vger.kernel.org>
> Cc: Tony Luck <tony.luck@intel.com>
> ---
>  arch/ia64/include/asm/fpu.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/arch/ia64/include/asm/fpu.h
> ===================================================================
> --- a/arch/ia64/include/asm/fpu.h
> +++ b/arch/ia64/include/asm/fpu.h
> @@ -6,7 +6,7 @@
>  *     David Mosberger-Tang <davidm@hpl.hp.com>
>  */
>
> -#include <linux/types.h>
> +#include <asm/types.h>
>

No , we do not even need asm/types.h

Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
for arch/ia64/include/asm/fpu.h

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/ia64/include/asm/fpu.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index b6395ad..0c26157 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,8 +6,6 @@
  *     David Mosberger-Tang <davidm@hpl.hp.com>
  */

-#include <linux/types.h>
-
 /* floating point status register: */
 #define FPSR_TRAP_VD   (1 << 0)        /* invalid op trap disabled */
 #define FPSR_TRAP_DD   (1 << 1)        /* denormal trap disabled */
-- 
1.6.1.1

[-- Attachment #2: 0001-Neither-asm-types.h-nor-linux-types.h-is-not-require.patch --]
[-- Type: text/x-patch, Size: 868 bytes --]

From 64e19dcc60cf9cd1455af5b0a9aaf45e7f00dde8 Mon Sep 17 00:00:00 2001
From: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Date: Fri, 6 Feb 2009 08:43:29 +0000
Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required for arch/ia64/include/asm/fpu.h

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/ia64/include/asm/fpu.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index b6395ad..0c26157 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,8 +6,6 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <linux/types.h>
-
 /* floating point status register: */
 #define FPSR_TRAP_VD	(1 << 0)	/* invalid op trap disabled */
 #define FPSR_TRAP_DD	(1 << 1)	/* denormal trap disabled */
-- 
1.6.1.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  8:53   ` [PATCH] " Jaswinder Singh Rajput
@ 2009-02-06  9:11     ` KOSAKI Motohiro
  2009-02-06 14:55       ` [PATCH] " Ingo Molnar
  2009-02-06 18:53     ` [PATCH] " Luck, Tony
  1 sibling, 1 reply; 21+ messages in thread
From: KOSAKI Motohiro @ 2009-02-06  9:11 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: kosaki.motohiro, Jaswinder Singh Rajput, Ingo Molnar,
	Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, tony.luck, ralf,
	dhowells, matthew, chris, LKML, linux-next, linux-ia64

> > Index: b/arch/ia64/include/asm/fpu.h
> > ===================================================================
> > --- a/arch/ia64/include/asm/fpu.h
> > +++ b/arch/ia64/include/asm/fpu.h
> > @@ -6,7 +6,7 @@
> >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> >  */
> >
> > -#include <linux/types.h>
> > +#include <asm/types.h>
> >
> 
> No , we do not even need asm/types.h
> 
> Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> for arch/ia64/include/asm/fpu.h
> 
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>

ok. I confirmed.
	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

thanks.


> ---
>  arch/ia64/include/asm/fpu.h |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
> index b6395ad..0c26157 100644
> --- a/arch/ia64/include/asm/fpu.h
> +++ b/arch/ia64/include/asm/fpu.h
> @@ -6,8 +6,6 @@
>   *     David Mosberger-Tang <davidm@hpl.hp.com>
>   */
> 
> -#include <linux/types.h>
> -
>  /* floating point status register: */
>  #define FPSR_TRAP_VD   (1 << 0)        /* invalid op trap disabled */
>  #define FPSR_TRAP_DD   (1 << 1)        /* denormal trap disabled */
> -- 
> 1.6.1.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  8:19 ` [linux-next][PATCH] revert headers_check fix: ia64, fpu.h KOSAKI Motohiro
  2009-02-06  8:53   ` [PATCH] " Jaswinder Singh Rajput
@ 2009-02-06 13:42   ` Sam Ravnborg
  1 sibling, 0 replies; 21+ messages in thread
From: Sam Ravnborg @ 2009-02-06 13:42 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Linus Torvalds,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML, linux-next,
	linux-ia64

On Fri, Feb 06, 2009 at 05:19:00PM +0900, KOSAKI Motohiro wrote:
> > diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
> > index 3859558..b6395ad 100644
> > --- a/arch/ia64/include/asm/fpu.h
> > +++ b/arch/ia64/include/asm/fpu.h
> > @@ -6,7 +6,7 @@
> >   *	David Mosberger-Tang <davidm@hpl.hp.com>
> >   */
> >  
> > -#include <asm/types.h>
> > +#include <linux/types.h>
> 
> this change break ia64 build perfectly.
> this patch seems don't tested at all.
> 
> Ingo, I hope you ask patch author how to test posted patch ;-)

Patch author test the patch by adding it to a git tree that hits -next.
And this catched ths bug - so -next served its purpose.

	Sam

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  9:11     ` [linux-next][PATCH] " KOSAKI Motohiro
@ 2009-02-06 14:55       ` Ingo Molnar
  2009-02-06 15:29         ` [linux-next][PATCH] " Jaswinder Singh Rajput
  0 siblings, 1 reply; 21+ messages in thread
From: Ingo Molnar @ 2009-02-06 14:55 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: Jaswinder Singh Rajput, Jaswinder Singh Rajput, Linus Torvalds,
	Sam Ravnborg, Andrew Morton, Russell King - ARM Linux,
	hskinnemoen, cooloney, tony.luck, ralf, dhowells, matthew, chris,
	LKML, linux-next, linux-ia64


* KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:

> > > Index: b/arch/ia64/include/asm/fpu.h
> > > ===================================================================
> > > --- a/arch/ia64/include/asm/fpu.h
> > > +++ b/arch/ia64/include/asm/fpu.h
> > > @@ -6,7 +6,7 @@
> > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > >  */
> > >
> > > -#include <linux/types.h>
> > > +#include <asm/types.h>
> > >
> > 
> > No , we do not even need asm/types.h
> > 
> > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > for arch/ia64/include/asm/fpu.h
> > 
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> 
> ok. I confirmed.
> 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

Thanks.

Jaswinder, mind adding these tags to the commit and sending a pull request 
with all fixes?

	Ingo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 14:55       ` [PATCH] " Ingo Molnar
@ 2009-02-06 15:29         ` Jaswinder Singh Rajput
  2009-02-06 15:33           ` Russell King - ARM Linux
  0 siblings, 1 reply; 21+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 15:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: KOSAKI Motohiro, Jaswinder Singh Rajput, Linus Torvalds,
	Sam Ravnborg, Andrew Morton, Russell King - ARM Linux,
	hskinnemoen, cooloney, tony.luck, ralf, dhowells, matthew, chris,
	LKML, linux-next, linux-ia64

On Fri, 2009-02-06 at 15:55 +0100, Ingo Molnar wrote:
> * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> 
> > > > Index: b/arch/ia64/include/asm/fpu.h
> > > > ===================================================================
> > > > --- a/arch/ia64/include/asm/fpu.h
> > > > +++ b/arch/ia64/include/asm/fpu.h
> > > > @@ -6,7 +6,7 @@
> > > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > > >  */
> > > >
> > > > -#include <linux/types.h>
> > > > +#include <asm/types.h>
> > > >
> > > 
> > > No , we do not even need asm/types.h
> > > 
> > > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > > for arch/ia64/include/asm/fpu.h
> > > 
> > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > 
> > ok. I confirmed.
> > 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> 
> Thanks.
> 
> Jaswinder, mind adding these tags to the commit and sending a pull request 
> with all fixes?

The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
  Ingo Molnar (1):
        Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes

Jaswinder Singh Rajput (2):
      Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
      make linux/types.h as assembly safe

 arch/ia64/include/asm/fpu.h |    2 --
 include/linux/types.h       |    3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

Complete diff:
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index b6395ad..0c26157 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,8 +6,6 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <linux/types.h>
-
 /* floating point status register: */
 #define FPSR_TRAP_VD	(1 << 0)	/* invalid op trap disabled */
 #define FPSR_TRAP_DD	(1 << 1)	/* denormal trap disabled */
diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..c30973a 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,7 @@
 #ifndef _LINUX_TYPES_H
 #define _LINUX_TYPES_H
 
+#ifndef __ASSEMBLY__
 #ifdef	__KERNEL__
 
 #define DECLARE_BITMAP(name,bits) \
@@ -212,5 +213,5 @@ struct ustat {
 };
 
 #endif	/* __KERNEL__ */
-
+#endif /*  __ASSEMBLY__ */
 #endif /* _LINUX_TYPES_H */



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:29         ` [linux-next][PATCH] " Jaswinder Singh Rajput
@ 2009-02-06 15:33           ` Russell King - ARM Linux
  2009-02-06 15:45             ` [PATCH] " Ingo Molnar
  2009-02-06 15:48             ` Jaswinder Singh Rajput
  0 siblings, 2 replies; 21+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 15:33 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> On Fri, 2009-02-06 at 15:55 +0100, Ingo Molnar wrote:
> > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > 
> > > > > Index: b/arch/ia64/include/asm/fpu.h
> > > > > ===================================================================
> > > > > --- a/arch/ia64/include/asm/fpu.h
> > > > > +++ b/arch/ia64/include/asm/fpu.h
> > > > > @@ -6,7 +6,7 @@
> > > > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > > > >  */
> > > > >
> > > > > -#include <linux/types.h>
> > > > > +#include <asm/types.h>
> > > > >
> > > > 
> > > > No , we do not even need asm/types.h
> > > > 
> > > > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > > > for arch/ia64/include/asm/fpu.h
> > > > 
> > > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > > 
> > > ok. I confirmed.
> > > 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > 
> > Thanks.
> > 
> > Jaswinder, mind adding these tags to the commit and sending a pull request 
> > with all fixes?
> 
> The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
>   Ingo Molnar (1):
>         Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
> 
> Jaswinder Singh Rajput (2):
>       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
>       make linux/types.h as assembly safe

I continue to disagree with the need for the second patch.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:33           ` Russell King - ARM Linux
@ 2009-02-06 15:45             ` Ingo Molnar
  2009-02-06 15:49               ` Russell King - ARM Linux
  2009-02-06 15:48             ` Jaswinder Singh Rajput
  1 sibling, 1 reply; 21+ messages in thread
From: Ingo Molnar @ 2009-02-06 15:45 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > On Fri, 2009-02-06 at 15:55 +0100, Ingo Molnar wrote:
> > > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > > 
> > > > > > Index: b/arch/ia64/include/asm/fpu.h
> > > > > > ===================================================================
> > > > > > --- a/arch/ia64/include/asm/fpu.h
> > > > > > +++ b/arch/ia64/include/asm/fpu.h
> > > > > > @@ -6,7 +6,7 @@
> > > > > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > > > > >  */
> > > > > >
> > > > > > -#include <linux/types.h>
> > > > > > +#include <asm/types.h>
> > > > > >
> > > > > 
> > > > > No , we do not even need asm/types.h
> > > > > 
> > > > > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > > > > for arch/ia64/include/asm/fpu.h
> > > > > 
> > > > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > > > 
> > > > ok. I confirmed.
> > > > 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > > 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > 
> > > Thanks.
> > > 
> > > Jaswinder, mind adding these tags to the commit and sending a pull request 
> > > with all fixes?
> > 
> > The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
> >   Ingo Molnar (1):
> >         Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
> > 
> > Jaswinder Singh Rajput (2):
> >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> >       make linux/types.h as assembly safe
> 
> I continue to disagree with the need for the second patch.

But have not replied to my mail about that so far.

Why is it wrong to make types.h an assembly-invariant? It is positively 
helpful for mixed-mode headers and has no downsides whatsoever.

	Ingo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:33           ` Russell King - ARM Linux
  2009-02-06 15:45             ` [PATCH] " Ingo Molnar
@ 2009-02-06 15:48             ` Jaswinder Singh Rajput
  2009-02-06 15:55               ` [linux-next][PATCH] " Russell King - ARM Linux
  1 sibling, 1 reply; 21+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 15:48 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Ingo Molnar, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, 2009-02-06 at 15:33 +0000, Russell King - ARM Linux wrote:
> On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > On Fri, 2009-02-06 at 15:55 +0100, Ingo Molnar wrote:
> > > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > > 
> > > > > > Index: b/arch/ia64/include/asm/fpu.h
> > > > > > ===================================================================
> > > > > > --- a/arch/ia64/include/asm/fpu.h
> > > > > > +++ b/arch/ia64/include/asm/fpu.h
> > > > > > @@ -6,7 +6,7 @@
> > > > > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > > > > >  */
> > > > > >
> > > > > > -#include <linux/types.h>
> > > > > > +#include <asm/types.h>
> > > > > >
> > > > > 
> > > > > No , we do not even need asm/types.h
> > > > > 
> > > > > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > > > > for arch/ia64/include/asm/fpu.h
> > > > > 
> > > > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > > > 
> > > > ok. I confirmed.
> > > > 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > > 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > 
> > > Thanks.
> > > 
> > > Jaswinder, mind adding these tags to the commit and sending a pull request 
> > > with all fixes?
> > 
> > The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
> >   Ingo Molnar (1):
> >         Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
> > 
> > Jaswinder Singh Rajput (2):
> >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> >       make linux/types.h as assembly safe
> 
> I continue to disagree with the need for the second patch.

Like Ingo suggested:

On Fri, 2009-02-06 at 15:58 +0100, Ingo Molnar wrote:
>  Well types.h easily gets included in other files though, which might be 
> partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
> a types.h include.
> 
> So making this file an invariant in .S files does not sound like a bad idea 
> to me. Is there any downside?
> 

We cannot see any downside of this patch.

But we can see upside of this patch is:
1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
files
2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.

Thanks,

--
JSR

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:45             ` [PATCH] " Ingo Molnar
@ 2009-02-06 15:49               ` Russell King - ARM Linux
  2009-02-06 16:01                 ` Ingo Molnar
  0 siblings, 1 reply; 21+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 15:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 04:45:39PM +0100, Ingo Molnar wrote:
> 
> * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > Jaswinder Singh Rajput (2):
> > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > >       make linux/types.h as assembly safe
> > 
> > I continue to disagree with the need for the second patch.
> 
> But have not replied to my mail about that so far.

Sigh.  No I didn't - because I also got a reply from Jaswinder and
covered all points in _that_ reply.

Would you like me to re-send my reply so that you can appear in the To:
header?

Stop making this discussion stupidly obtuse.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:48             ` Jaswinder Singh Rajput
@ 2009-02-06 15:55               ` Russell King - ARM Linux
  2009-02-06 16:12                 ` Ingo Molnar
  2009-02-06 17:32                 ` Sam Ravnborg
  0 siblings, 2 replies; 21+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 15:55 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 09:18:48PM +0530, Jaswinder Singh Rajput wrote:
> On Fri, 2009-02-06 at 15:33 +0000, Russell King - ARM Linux wrote:
> > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > Jaswinder Singh Rajput (2):
> > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > >       make linux/types.h as assembly safe
> > 
> > I continue to disagree with the need for the second patch.
> 
> Like Ingo suggested:
> 
> On Fri, 2009-02-06 at 15:58 +0100, Ingo Molnar wrote:
> >  Well types.h easily gets included in other files though, which might be 
> > partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
> > a types.h include.
> > 
> > So making this file an invariant in .S files does not sound like a bad idea 
> > to me. Is there any downside?
> > 
> 
> We cannot see any downside of this patch.
> 
> But we can see upside of this patch is:
> 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> files
> 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.

The point is:

1. If the parent include needs to include linux/types.h to get at C
   types _and_ the include file needs to also be included by assembly
   code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
   uses from the assembly code.

   In that case, the linux/types.h include should be contained within
   the #ifndef __ASSEMBLY__ .. #endif block along with all C only
   parts of the header file.

2. if it doesn't need C types from linux/types.h, then that header has
   no business including linux/types.h, and the include should be
   eliminated to save the already dirbolically slow compiler from
   having to read and parse that file, and more importantly allowing
   it to eliminate linux/types.h from the build dependencies.

Yes, you can wrap linux/types.h with that ifndef, and yes it will fix
any problems, but I view it as a hack rather than fixing the real problem
which is lazyness by code writers to get their include dependencies right.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:49               ` Russell King - ARM Linux
@ 2009-02-06 16:01                 ` Ingo Molnar
  0 siblings, 0 replies; 21+ messages in thread
From: Ingo Molnar @ 2009-02-06 16:01 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 04:45:39PM +0100, Ingo Molnar wrote:
> > 
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > 
> > > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > > Jaswinder Singh Rajput (2):
> > > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > > >       make linux/types.h as assembly safe
> > > 
> > > I continue to disagree with the need for the second patch.
> > 
> > But have not replied to my mail about that so far.
> 
> Sigh.  No I didn't - because I also got a reply from Jaswinder and
> covered all points in _that_ reply.
> 
> Would you like me to re-send my reply so that you can appear in the To:
> header?
> 
> Stop making this discussion stupidly obtuse.

I am not making anything stupidly obtuse, your reply to Jaswinder was in a 
different (but related) portion of the thread, that i have not read yet at 
that point. I have read it now and have replied.

	Ingo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:55               ` [linux-next][PATCH] " Russell King - ARM Linux
@ 2009-02-06 16:12                 ` Ingo Molnar
  2009-02-06 16:23                   ` Russell King - ARM Linux
  2009-02-06 17:32                 ` Sam Ravnborg
  1 sibling, 1 reply; 21+ messages in thread
From: Ingo Molnar @ 2009-02-06 16:12 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> > We cannot see any downside of this patch.
> > 
> > But we can see upside of this patch is:
> > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > files
> > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> 
> The point is:
> 
> 1. If the parent include needs to include linux/types.h to get at C
>    types _and_ the include file needs to also be included by assembly
>    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
>    uses from the assembly code.
> 
>    In that case, the linux/types.h include should be contained within
>    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
>    parts of the header file.

That makes the code much less clean: putting #include's in the middle of a 
header is poor style and leads to people failing to consider dependencies. 
We generally put them to the header portion.

Putting an #include line in the middle of a header file is a receipe for a 
dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
etc.), so it's _strongly_ discouraged (at least on arch/x86).

> 2. if it doesn't need C types from linux/types.h, then that header has
>    no business including linux/types.h, and the include should be
>    eliminated to save the already dirbolically slow compiler from
>    having to read and parse that file, and more importantly allowing
>    it to eliminate linux/types.h from the build dependencies.
> 
> Yes, you can wrap linux/types.h with that ifndef, and yes it will fix any 
> problems, but I view it as a hack rather than fixing the real problem 
> which is lazyness by code writers to get their include dependencies right.

It is not about include dependencies at all - it is about the existing and 
accepted practice which you did not consider in your argument: the use of 
mixed-mode headers. A linux/types.h include there is perfectly clean and 
should not break the build.

Again, i repeat: there is nothing wrong about making a small number of very 
commonly used C header assembly-invariant. It results in better structured 
header files and cleaner code.

The argument is as simple as that, and up until this email you wrote roughly 
10 replies and it's not even that you disagreed with our point on some 
honest basis that we could argue with - the ting is that you failed to even 
_realize_ this argument of us and you tried to force your partial (and 
trivially flawed) world view on us impatiently. In view of that you need to 
be more careful before calling people 'stupidly obtuse' ;-)

	Ingo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 16:12                 ` Ingo Molnar
@ 2009-02-06 16:23                   ` Russell King - ARM Linux
  2009-02-06 16:33                     ` [PATCH] " Ingo Molnar
  0 siblings, 1 reply; 21+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 16:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> 
> * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > > We cannot see any downside of this patch.
> > > 
> > > But we can see upside of this patch is:
> > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > files
> > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > 
> > The point is:
> > 
> > 1. If the parent include needs to include linux/types.h to get at C
> >    types _and_ the include file needs to also be included by assembly
> >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> >    uses from the assembly code.
> > 
> >    In that case, the linux/types.h include should be contained within
> >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> >    parts of the header file.
> 
> That makes the code much less clean: putting #include's in the middle of a 
> header is poor style and leads to people failing to consider dependencies. 
> We generally put them to the header portion.
> 
> Putting an #include line in the middle of a header file is a receipe for a 
> dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
> etc.), so it's _strongly_ discouraged (at least on arch/x86).

Put them at the top then with an additional ifndef.

> > 2. if it doesn't need C types from linux/types.h, then that header has
> >    no business including linux/types.h, and the include should be
> >    eliminated to save the already dirbolically slow compiler from
> >    having to read and parse that file, and more importantly allowing
> >    it to eliminate linux/types.h from the build dependencies.
> > 
> > Yes, you can wrap linux/types.h with that ifndef, and yes it will fix any 
> > problems, but I view it as a hack rather than fixing the real problem 
> > which is lazyness by code writers to get their include dependencies right.
> 
> It is not about include dependencies at all - it is about the existing and 
> accepted practice which you did not consider in your argument: the use of 
> mixed-mode headers. A linux/types.h include there is perfectly clean and 
> should not break the build.

It _is_ about include dependencies.

> Again, i repeat: there is nothing wrong about making a small number of very 
> commonly used C header assembly-invariant. It results in better structured 
> header files and cleaner code.
> 
> The argument is as simple as that, and up until this email you wrote roughly 
> 10 replies and it's not even that you disagreed with our point on some 
> honest basis that we could argue with - the ting is that you failed to even 
> _realize_ this argument of us and you tried to force your partial (and 
> trivially flawed) world view on us impatiently. In view of that you need to 
> be more careful before calling people 'stupidly obtuse' ;-)

If you think that I'm ignoring your argument, then screw you.

I'm making a counter argument which I believe is _equally_ valid and which
I believe is actually far more important - at least it is _to_ _me_.

I don't wish to see my build times extended any more than they already
have been by sloppy and lazy programming in the kernel.  And if I didn't
make that point earlier, what a shame.  I'm making it NOW.

I've been trying over the last six months to (a) reduce the number of
files included in the ARM sub-tree and (b) reduce the namespace pollution
from ARM headers into the generic kernel both with the aim of trying to
improve build time.  That's something you can verify by looking through
the commits in arch/arm/include/asm if you think I'm making this up,
which clearly you will do.

Oh why bring it up after 11 replies.  I guess I'm just useless at
expressing myself clearly.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 16:23                   ` Russell King - ARM Linux
@ 2009-02-06 16:33                     ` Ingo Molnar
  2009-02-06 16:38                       ` Russell King - ARM Linux
  0 siblings, 1 reply; 21+ messages in thread
From: Ingo Molnar @ 2009-02-06 16:33 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> > 
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > 
> > > > We cannot see any downside of this patch.
> > > > 
> > > > But we can see upside of this patch is:
> > > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > > files
> > > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > > 
> > > The point is:
> > > 
> > > 1. If the parent include needs to include linux/types.h to get at C
> > >    types _and_ the include file needs to also be included by assembly
> > >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> > >    uses from the assembly code.
> > > 
> > >    In that case, the linux/types.h include should be contained within
> > >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> > >    parts of the header file.
> > 
> > That makes the code much less clean: putting #include's in the middle of a 
> > header is poor style and leads to people failing to consider dependencies. 
> > We generally put them to the header portion.
> > 
> > Putting an #include line in the middle of a header file is a receipe for a 
> > dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
> > etc.), so it's _strongly_ discouraged (at least on arch/x86).
> 
> Put them at the top then with an additional ifndef.

So you advocate 40 stupid pairs of #ifdefs spread out, instead of a 
_single_, obvious #ifdef in a commonly used header?

Case closed.

	Ingo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 16:33                     ` [PATCH] " Ingo Molnar
@ 2009-02-06 16:38                       ` Russell King - ARM Linux
  2009-02-06 17:14                         ` [linux-next][PATCH] " Ingo Molnar
  0 siblings, 1 reply; 21+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 16:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 05:33:14PM +0100, Ingo Molnar wrote:
> 
> * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> > > 
> > > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > > 
> > > > > We cannot see any downside of this patch.
> > > > > 
> > > > > But we can see upside of this patch is:
> > > > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > > > files
> > > > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > > > 
> > > > The point is:
> > > > 
> > > > 1. If the parent include needs to include linux/types.h to get at C
> > > >    types _and_ the include file needs to also be included by assembly
> > > >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> > > >    uses from the assembly code.
> > > > 
> > > >    In that case, the linux/types.h include should be contained within
> > > >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> > > >    parts of the header file.
> > > 
> > > That makes the code much less clean: putting #include's in the middle of a 
> > > header is poor style and leads to people failing to consider dependencies. 
> > > We generally put them to the header portion.
> > > 
> > > Putting an #include line in the middle of a header file is a receipe for a 
> > > dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
> > > etc.), so it's _strongly_ discouraged (at least on arch/x86).
> > 
> > Put them at the top then with an additional ifndef.
> 
> So you advocate 40 stupid pairs of #ifdefs spread out, instead of a 
> _single_, obvious #ifdef in a commonly used header?

As I see it, if you want all your style points to be adhered to, then yes.
And I do believe it to be a valid solution.

Personally, I'd put them nearer the C code.

That's precisely what I do with the ARM include files.  Never been a
problem.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 16:38                       ` Russell King - ARM Linux
@ 2009-02-06 17:14                         ` Ingo Molnar
  2009-02-06 17:22                           ` Russell King - ARM Linux
  0 siblings, 1 reply; 21+ messages in thread
From: Ingo Molnar @ 2009-02-06 17:14 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 05:33:14PM +0100, Ingo Molnar wrote:
> > 
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > 
> > > On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> > > > 
> > > > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > > > 
> > > > > > We cannot see any downside of this patch.
> > > > > > 
> > > > > > But we can see upside of this patch is:
> > > > > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > > > > files
> > > > > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > > > > 
> > > > > The point is:
> > > > > 
> > > > > 1. If the parent include needs to include linux/types.h to get at C
> > > > >    types _and_ the include file needs to also be included by assembly
> > > > >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> > > > >    uses from the assembly code.
> > > > > 
> > > > >    In that case, the linux/types.h include should be contained within
> > > > >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> > > > >    parts of the header file.
> > > > 
> > > > That makes the code much less clean: putting #include's in the middle of a 
> > > > header is poor style and leads to people failing to consider dependencies. 
> > > > We generally put them to the header portion.
> > > > 
> > > > Putting an #include line in the middle of a header file is a receipe for a 
> > > > dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
> > > > etc.), so it's _strongly_ discouraged (at least on arch/x86).
> > > 
> > > Put them at the top then with an additional ifndef.
> > 
> > So you advocate 40 stupid pairs of #ifdefs spread out, instead of a 
> > _single_, obvious #ifdef in a commonly used header?
> 
> As I see it, if you want all your style points to be adhered to, then yes.
> And I do believe it to be a valid solution.
> 
> Personally, I'd put them nearer the C code.
> 
> That's precisely what I do with the ARM include files.  Never been a
> problem.

I take this that you kind of agree that that removing ugly #ifdefs spread 
out is an upside. You failed to point out any downsides - you just seem to 
claim that you can live without the upsides. That is fine.

	Ingo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 17:14                         ` [linux-next][PATCH] " Ingo Molnar
@ 2009-02-06 17:22                           ` Russell King - ARM Linux
  0 siblings, 0 replies; 21+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 17:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 06:14:00PM +0100, Ingo Molnar wrote:
> I take this that you kind of agree that that removing ugly #ifdefs spread 
> out is an upside. You failed to point out any downsides - you just seem to 
> claim that you can live without the upsides. That is fine.

I'm sorry, I thought I pointed them out in my previous emails.  Clearly
you didn't read those emails in spite of replying to them.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:55               ` [linux-next][PATCH] " Russell King - ARM Linux
  2009-02-06 16:12                 ` Ingo Molnar
@ 2009-02-06 17:32                 ` Sam Ravnborg
  2009-02-06 17:41                   ` Ingo Molnar
  1 sibling, 1 reply; 21+ messages in thread
From: Sam Ravnborg @ 2009-02-06 17:32 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, Ingo Molnar, KOSAKI Motohiro,
	Jaswinder Singh Rajput, Linus Torvalds, Andrew Morton,
	hskinnemoen, cooloney, tony.luck, ralf, dhowells, matthew, chris,
	LKML, linux-next, linux-ia64

On Fri, Feb 06, 2009 at 03:55:12PM +0000, Russell King - ARM Linux wrote:
> On Fri, Feb 06, 2009 at 09:18:48PM +0530, Jaswinder Singh Rajput wrote:
> > On Fri, 2009-02-06 at 15:33 +0000, Russell King - ARM Linux wrote:
> > > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > > Jaswinder Singh Rajput (2):
> > > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > > >       make linux/types.h as assembly safe
> > > 
> > > I continue to disagree with the need for the second patch.
> > 
> > Like Ingo suggested:
> > 
> > On Fri, 2009-02-06 at 15:58 +0100, Ingo Molnar wrote:
> > >  Well types.h easily gets included in other files though, which might be 
> > > partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
> > > a types.h include.
> > > 
> > > So making this file an invariant in .S files does not sound like a bad idea 
> > > to me. Is there any downside?
> > > 
> > 
> > We cannot see any downside of this patch.
> > 
> > But we can see upside of this patch is:
> > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > files
> > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> 
> The point is:
> 
> 1. If the parent include needs to include linux/types.h to get at C
>    types _and_ the include file needs to also be included by assembly
>    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
>    uses from the assembly code.
> 
>    In that case, the linux/types.h include should be contained within
>    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
>    parts of the header file.
> 
> 2. if it doesn't need C types from linux/types.h, then that header has
>    no business including linux/types.h, and the include should be
>    eliminated to save the already dirbolically slow compiler from
>    having to read and parse that file, and more importantly allowing
>    it to eliminate linux/types.h from the build dependencies.
> 
> Yes, you can wrap linux/types.h with that ifndef, and yes it will fix
> any problems, but I view it as a hack rather than fixing the real problem
> which is lazyness by code writers to get their include dependencies right.

You guys are getting this wrong.
The patch from Jaswinder needs to be fixed so we unconditionally
include <asm/types.h> from linux/types.h.
And then ll users can safely include linux/types.h and when we one
day realize we can move some stuff used in .S files from
asm/types.h to linux/types.h then we are all safe and no breakage.

the rule of thum is to include the linux/* variant if the same
file exist in both linus/ and asm/ and types.h is in no way different
here

And trying to make it different just becasue it is used in userspace
intensively is just stupid and will be a cause of misunderstandings.

	Sam

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 17:32                 ` Sam Ravnborg
@ 2009-02-06 17:41                   ` Ingo Molnar
  0 siblings, 0 replies; 21+ messages in thread
From: Ingo Molnar @ 2009-02-06 17:41 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Russell King - ARM Linux, Jaswinder Singh Rajput, KOSAKI Motohiro,
	Jaswinder Singh Rajput, Linus Torvalds, Andrew Morton,
	hskinnemoen, cooloney, tony.luck, ralf, dhowells, matthew, chris,
	LKML, linux-next, linux-ia64


* Sam Ravnborg <sam@ravnborg.org> wrote:

> On Fri, Feb 06, 2009 at 03:55:12PM +0000, Russell King - ARM Linux wrote:
> > On Fri, Feb 06, 2009 at 09:18:48PM +0530, Jaswinder Singh Rajput wrote:
> > > On Fri, 2009-02-06 at 15:33 +0000, Russell King - ARM Linux wrote:
> > > > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > > > Jaswinder Singh Rajput (2):
> > > > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > > > >       make linux/types.h as assembly safe
> > > > 
> > > > I continue to disagree with the need for the second patch.
> > > 
> > > Like Ingo suggested:
> > > 
> > > On Fri, 2009-02-06 at 15:58 +0100, Ingo Molnar wrote:
> > > >  Well types.h easily gets included in other files though, which might be 
> > > > partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
> > > > a types.h include.
> > > > 
> > > > So making this file an invariant in .S files does not sound like a bad idea 
> > > > to me. Is there any downside?
> > > > 
> > > 
> > > We cannot see any downside of this patch.
> > > 
> > > But we can see upside of this patch is:
> > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > files
> > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > 
> > The point is:
> > 
> > 1. If the parent include needs to include linux/types.h to get at C
> >    types _and_ the include file needs to also be included by assembly
> >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> >    uses from the assembly code.
> > 
> >    In that case, the linux/types.h include should be contained within
> >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> >    parts of the header file.
> > 
> > 2. if it doesn't need C types from linux/types.h, then that header has
> >    no business including linux/types.h, and the include should be
> >    eliminated to save the already dirbolically slow compiler from
> >    having to read and parse that file, and more importantly allowing
> >    it to eliminate linux/types.h from the build dependencies.
> > 
> > Yes, you can wrap linux/types.h with that ifndef, and yes it will fix
> > any problems, but I view it as a hack rather than fixing the real problem
> > which is lazyness by code writers to get their include dependencies right.
> 
> You guys are getting this wrong.
> The patch from Jaswinder needs to be fixed so we unconditionally
> include <asm/types.h> from linux/types.h.

Yeah, that's true.

> And then ll users can safely include linux/types.h and when we one
> day realize we can move some stuff used in .S files from
> asm/types.h to linux/types.h then we are all safe and no breakage.

Yeah.

	Ingo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* RE: [PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  8:53   ` [PATCH] " Jaswinder Singh Rajput
  2009-02-06  9:11     ` [linux-next][PATCH] " KOSAKI Motohiro
@ 2009-02-06 18:53     ` Luck, Tony
  1 sibling, 0 replies; 21+ messages in thread
From: Luck, Tony @ 2009-02-06 18:53 UTC (permalink / raw)
  To: Jaswinder Singh Rajput, KOSAKI Motohiro
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen@atmel.com,
	cooloney@kernel.org, ralf@linux-mips.org, dhowells@redhat.com,
	matthew@wil.cx, chris@zankel.net, LKML, linux-next, linux-ia64

> > -#include <linux/types.h>
> > +#include <asm/types.h>
> >
>
> No , we do not even need asm/types.h

...

> -#include <linux/types.h>
> -

This works.

Acked-by: Tony Luck <tony.luck@intel.com>

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-02-06 18:54 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1233385816.17794.16.camel@localhost.localdomain>
2009-02-06  8:19 ` [linux-next][PATCH] revert headers_check fix: ia64, fpu.h KOSAKI Motohiro
2009-02-06  8:53   ` [PATCH] " Jaswinder Singh Rajput
2009-02-06  9:11     ` [linux-next][PATCH] " KOSAKI Motohiro
2009-02-06 14:55       ` [PATCH] " Ingo Molnar
2009-02-06 15:29         ` [linux-next][PATCH] " Jaswinder Singh Rajput
2009-02-06 15:33           ` Russell King - ARM Linux
2009-02-06 15:45             ` [PATCH] " Ingo Molnar
2009-02-06 15:49               ` Russell King - ARM Linux
2009-02-06 16:01                 ` Ingo Molnar
2009-02-06 15:48             ` Jaswinder Singh Rajput
2009-02-06 15:55               ` [linux-next][PATCH] " Russell King - ARM Linux
2009-02-06 16:12                 ` Ingo Molnar
2009-02-06 16:23                   ` Russell King - ARM Linux
2009-02-06 16:33                     ` [PATCH] " Ingo Molnar
2009-02-06 16:38                       ` Russell King - ARM Linux
2009-02-06 17:14                         ` [linux-next][PATCH] " Ingo Molnar
2009-02-06 17:22                           ` Russell King - ARM Linux
2009-02-06 17:32                 ` Sam Ravnborg
2009-02-06 17:41                   ` Ingo Molnar
2009-02-06 18:53     ` [PATCH] " Luck, Tony
2009-02-06 13:42   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).