linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] - UV fix compile error on IA64 & eliminate compiler warning
@ 2009-01-28 21:21 Jack Steiner
  2009-01-28 23:01 ` Harvey Harrison
  2009-01-29 13:33 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Jack Steiner @ 2009-01-28 21:21 UTC (permalink / raw)
  To: mingo, tglx; +Cc: linux-kernel


The GRU driver is used on both IA64 & x86.
The 2 architectures have different ways of detecting the
platform type, ie. whether the platform is a UV system.
Although it is possible to reconcile the 2 methods,
only one place currently makes the test.

Also eliminate a warning message in uv.h.

Signed-off-by: Jack Steiner <steiner@sgi.com>


---
 arch/x86/include/asm/uv/uv.h   |    1 +
 drivers/misc/sgi-gru/gru.h     |    2 --
 drivers/misc/sgi-gru/grufile.c |    1 +
 3 files changed, 2 insertions(+), 2 deletions(-)

Index: linux/arch/x86/include/asm/uv/uv.h
===================================================================
--- linux.orig/arch/x86/include/asm/uv/uv.h	2009-01-28 12:43:27.000000000 -0600
+++ linux/arch/x86/include/asm/uv/uv.h	2009-01-28 15:13:58.000000000 -0600
@@ -2,6 +2,7 @@
 #define _ASM_X86_UV_UV_H
 
 enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
+struct mm_struct;
 
 #ifdef CONFIG_X86_UV
 
Index: linux/drivers/misc/sgi-gru/gru.h
===================================================================
--- linux.orig/drivers/misc/sgi-gru/gru.h	2009-01-28 12:43:28.000000000 -0600
+++ linux/drivers/misc/sgi-gru/gru.h	2009-01-28 14:53:52.000000000 -0600
@@ -19,8 +19,6 @@
 #ifndef __GRU_H__
 #define __GRU_H__
 
-#include <asm/uv/uv.h>
-
 /*
  * GRU architectural definitions
  */
Index: linux/drivers/misc/sgi-gru/grufile.c
===================================================================
--- linux.orig/drivers/misc/sgi-gru/grufile.c	2009-01-28 13:04:08.000000000 -0600
+++ linux/drivers/misc/sgi-gru/grufile.c	2009-01-28 15:12:04.000000000 -0600
@@ -46,6 +46,7 @@
 #if defined CONFIG_X86_64
 #include <asm/genapic.h>
 #include <asm/irq.h>
+#include <asm/uv/uv.h>
 #define IS_UV()		is_uv_system()
 #elif defined CONFIG_IA64
 #include <asm/system.h>

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

* Re: [PATCH] - UV fix compile error on IA64 & eliminate compiler warning
  2009-01-28 21:21 [PATCH] - UV fix compile error on IA64 & eliminate compiler warning Jack Steiner
@ 2009-01-28 23:01 ` Harvey Harrison
  2009-01-29 13:33 ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Harvey Harrison @ 2009-01-28 23:01 UTC (permalink / raw)
  To: Jack Steiner; +Cc: mingo, tglx, linux-kernel

On Wed, 2009-01-28 at 15:21 -0600, Jack Steiner wrote:
> Also eliminate a warning message in uv.h.

Which was....?

Harvey


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

* Re: [PATCH] - UV fix compile error on IA64 & eliminate compiler warning
  2009-01-28 21:21 [PATCH] - UV fix compile error on IA64 & eliminate compiler warning Jack Steiner
  2009-01-28 23:01 ` Harvey Harrison
@ 2009-01-29 13:33 ` Ingo Molnar
  2009-01-29 14:25   ` Jack Steiner
  1 sibling, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2009-01-29 13:33 UTC (permalink / raw)
  To: Jack Steiner; +Cc: tglx, linux-kernel, H. Peter Anvin


* Jack Steiner <steiner@sgi.com> wrote:

> 
> The GRU driver is used on both IA64 & x86.
> The 2 architectures have different ways of detecting the
> platform type, ie. whether the platform is a UV system.
> Although it is possible to reconcile the 2 methods,
> only one place currently makes the test.
> 
> Also eliminate a warning message in uv.h.
> 
> Signed-off-by: Jack Steiner <steiner@sgi.com>
> 
> 
> ---
>  arch/x86/include/asm/uv/uv.h   |    1 +
>  drivers/misc/sgi-gru/gru.h     |    2 --
>  drivers/misc/sgi-gru/grufile.c |    1 +
>  3 files changed, 2 insertions(+), 2 deletions(-)
> 
> Index: linux/arch/x86/include/asm/uv/uv.h
> ===================================================================
> --- linux.orig/arch/x86/include/asm/uv/uv.h	2009-01-28 12:43:27.000000000 -0600
> +++ linux/arch/x86/include/asm/uv/uv.h	2009-01-28 15:13:58.000000000 -0600
> @@ -2,6 +2,7 @@
>  #define _ASM_X86_UV_UV_H
>  
>  enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
> +struct mm_struct;

hm, why is this needed?

>  #define IS_UV()		is_uv_system()

btw., why is there an ugly IS_UV() macro. All code should be using 
is_uv_system() and IS_UV() should be removed.

	Ingo

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

* Re: [PATCH] - UV fix compile error on IA64 & eliminate compiler warning
  2009-01-29 13:33 ` Ingo Molnar
@ 2009-01-29 14:25   ` Jack Steiner
  0 siblings, 0 replies; 4+ messages in thread
From: Jack Steiner @ 2009-01-29 14:25 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: tglx, linux-kernel, H. Peter Anvin

On Thu, Jan 29, 2009 at 02:33:08PM +0100, Ingo Molnar wrote:
> 
> * Jack Steiner <steiner@sgi.com> wrote:
> 
> > 
> > The GRU driver is used on both IA64 & x86.
> > The 2 architectures have different ways of detecting the
> > platform type, ie. whether the platform is a UV system.
> > Although it is possible to reconcile the 2 methods,
> > only one place currently makes the test.
> > 
> > Also eliminate a warning message in uv.h.
> > 
> > Signed-off-by: Jack Steiner <steiner@sgi.com>
> > 
> > 
> > ---
> >  arch/x86/include/asm/uv/uv.h   |    1 +
> >  drivers/misc/sgi-gru/gru.h     |    2 --
> >  drivers/misc/sgi-gru/grufile.c |    1 +
> >  3 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > Index: linux/arch/x86/include/asm/uv/uv.h
> > ===================================================================
> > --- linux.orig/arch/x86/include/asm/uv/uv.h	2009-01-28 12:43:27.000000000 -0600
> > +++ linux/arch/x86/include/asm/uv/uv.h	2009-01-28 15:13:58.000000000 -0600
> > @@ -2,6 +2,7 @@
> >  #define _ASM_X86_UV_UV_H
> >  
> >  enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
> > +struct mm_struct;
> 
> hm, why is this needed?

I don't see the error in your tip tree, but I saw the following earlier this week when
compiling in the linux-next tree:

	arch/x86/include/asm/uv/uv.h:16: warning: struct mm_struct declared inside parameter list
	include/asm/uv/uv.h:16: warning: its scope is only this definition or declaration,
						which is probably not what you want

Unfortunately my log does not capture the file that produced this error.
I believe it was from a non-UV file that indirectly included uv.h. It is
possible that subsequent changes have removed the indirect reference.


> 
> >  #define IS_UV()		is_uv_system()
> 
> btw., why is there an ugly IS_UV() macro. All code should be using 
> is_uv_system() and IS_UV() should be removed.

Agree & I plan to do that. I need to add a arch/ia64/include/asm/uv/uv.h
file and hide the uglyness there. IA64 does not used the same method
of determining the platform type. IA64 historically uses:

	ia64_platform_is("uv")

The GRU driver must be supported on both IA64 & x86. I've tried to hide the
platform differences but some are difficult (especially regarding irqs &
vectors).


--- jack

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

end of thread, other threads:[~2009-01-29 14:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-28 21:21 [PATCH] - UV fix compile error on IA64 & eliminate compiler warning Jack Steiner
2009-01-28 23:01 ` Harvey Harrison
2009-01-29 13:33 ` Ingo Molnar
2009-01-29 14:25   ` Jack Steiner

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).