public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ia64: minor Makefile simplification through use of cc-ifversion
@ 2009-07-23 18:56 Frans Pop
  2009-07-23 21:28 ` [PATCH] ia64: minor Makefile simplification through use of Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Frans Pop @ 2009-07-23 18:56 UTC (permalink / raw)
  To: linux-ia64; +Cc: linux-kbuild, linux-kernel

Signed-off-by: Frans Pop <elendil@planet.nl>
---

Change was suggested by Sam Ravnborg; see http://lkml.org/lkml/2009/7/18/15.
Untested.

diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 58a7e46..2bf6107 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -41,10 +41,8 @@ $(error Sorry, you need a newer version of the assember, one that is built from
 		ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
 endif
 
-ifeq ($(call cc-version),0304)
-	cflags-$(CONFIG_ITANIUM)	+= -mtune=merced
-	cflags-$(CONFIG_MCKINLEY)	+= -mtune=mckinley
-endif
+cflags-$(CONFIG_ITANIUM)  += $(call cc-ifversion, -eq, 0304, -mtune=merced)
+cflags-$(CONFIG_MCKINLEY) += $(call cc-ifversion, -eq, 0304, -mtune=mckinley)
 
 KBUILD_CFLAGS += $(cflags-y)
 head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o

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

* Re: [PATCH] ia64: minor Makefile simplification through use of
  2009-07-23 18:56 [PATCH] ia64: minor Makefile simplification through use of cc-ifversion Frans Pop
@ 2009-07-23 21:28 ` Sam Ravnborg
  2009-07-24  1:39   ` [PATCH] ia64: minor Makefile simplification through use of cc-ifversion Peter Chubb
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2009-07-23 21:28 UTC (permalink / raw)
  To: Frans Pop; +Cc: linux-ia64, linux-kbuild, linux-kernel

On Thu, Jul 23, 2009 at 08:56:50PM +0200, Frans Pop wrote:
> Signed-off-by: Frans Pop <elendil@planet.nl>
> ---
> 
> Change was suggested by Sam Ravnborg; see http://lkml.org/lkml/2009/7/18/15.
> Untested.
> 
> diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
> index 58a7e46..2bf6107 100644
> --- a/arch/ia64/Makefile
> +++ b/arch/ia64/Makefile
> @@ -41,10 +41,8 @@ $(error Sorry, you need a newer version of the assember, one that is built from
>  		ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
>  endif
>  
> -ifeq ($(call cc-version),0304)
> -	cflags-$(CONFIG_ITANIUM)	+= -mtune=merced
> -	cflags-$(CONFIG_MCKINLEY)	+= -mtune=mckinley
> -endif
> +cflags-$(CONFIG_ITANIUM)  += $(call cc-ifversion, -eq, 0304, -mtune=merced)
> +cflags-$(CONFIG_MCKINLEY) += $(call cc-ifversion, -eq, 0304, -mtune=mckinley)

The above change is correct.
But I really wonder if the original code was correct?
Do we really only want to use the -mtune options for this specific gcc version?
If this is indeed the case this deserves a comment explaning this.

So the patch has my:

Acked-by: Sam Ravnborg <sam@ravnborg.org>

But the code that this patch highligt (but does not chage) looks questionable.

	Sam

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

* Re: [PATCH] ia64: minor Makefile simplification through use of cc-ifversion
  2009-07-23 21:28 ` [PATCH] ia64: minor Makefile simplification through use of Sam Ravnborg
@ 2009-07-24  1:39   ` Peter Chubb
  2009-07-24 18:23     ` Frans Pop
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Chubb @ 2009-07-24  1:39 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Frans Pop, linux-ia64, linux-kbuild, linux-kernel

>>>>> "Sam" = Sam Ravnborg <sam@ravnborg.org> writes:

Sam> On Thu, Jul 23, 2009 at 08:56:50PM +0200, Frans Pop wrote:

Sam> The above change is correct.  But I really wonder if the original
Sam> code was correct?  Do we really only want to use the -mtune
Sam> options for this specific gcc version?  If this is indeed the
Sam> case this deserves a comment explaning this.

I suspect it should be all compilers after this one.  -mtune=mckinley didn't
work very well in the early gcc 3 compilers and didn't exist in
version 2.
--
Dr Peter Chubb     http://www.gelato.unsw.edu.au  peterc@gelato.unsw.edu.au
http://www.ertos.nicta.com.au           ERTOS within National ICT Australia


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

* Re: [PATCH] ia64: minor Makefile simplification through use of cc-ifversion
  2009-07-24  1:39   ` [PATCH] ia64: minor Makefile simplification through use of cc-ifversion Peter Chubb
@ 2009-07-24 18:23     ` Frans Pop
  2009-07-24 23:15       ` Fenghua Yu
  0 siblings, 1 reply; 6+ messages in thread
From: Frans Pop @ 2009-07-24 18:23 UTC (permalink / raw)
  To: Peter Chubb; +Cc: Sam Ravnborg, linux-ia64, linux-kbuild, linux-kernel

On Friday 24 July 2009, Peter Chubb wrote:
> >>>>> "Sam" = Sam Ravnborg <sam@ravnborg.org> writes:
> Sam> The above change is correct.  But I really wonder if the original
> Sam> code was correct?  Do we really only want to use the -mtune
> Sam> options for this specific gcc version?  If this is indeed the
> Sam> case this deserves a comment explaning this.
>
> I suspect it should be all compilers after this one.  -mtune=mckinley
> didn't work very well in the early gcc 3 compilers and didn't exist in
> version 2.

How would you like to handle that? As it is essentially a separate issue, 
my suggestion would be: apply my patch as is and then (if needed) commit 
a separate patch to fix the incorrect comparisons on top.

Cheers,
FJP

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

* Re: [PATCH] ia64: minor Makefile simplification through use of cc-ifversion
  2009-07-24 18:23     ` Frans Pop
@ 2009-07-24 23:15       ` Fenghua Yu
  2009-07-24 23:25         ` Frans Pop
  0 siblings, 1 reply; 6+ messages in thread
From: Fenghua Yu @ 2009-07-24 23:15 UTC (permalink / raw)
  To: Frans Pop
  Cc: Peter Chubb, Sam Ravnborg, linux-ia64@vger.kernel.org,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org

On Fri, Jul 24, 2009 at 11:23:11AM -0700, Frans Pop wrote:
> On Friday 24 July 2009, Peter Chubb wrote:
> > >>>>> "Sam" = Sam Ravnborg <sam@ravnborg.org> writes:
> > Sam> The above change is correct.  But I really wonder if the original
> > Sam> code was correct?  Do we really only want to use the -mtune
> > Sam> options for this specific gcc version?  If this is indeed the
> > Sam> case this deserves a comment explaning this.
> >
> > I suspect it should be all compilers after this one.  -mtune=mckinley
> > didn't work very well in the early gcc 3 compilers and didn't exist in
> > version 2.
> 
> How would you like to handle that? As it is essentially a separate issue,
> my suggestion would be: apply my patch as is and then (if needed) commit
> a separate patch to fix the incorrect comparisons on top.

Between GCC version 3.4.0 and 4.3.3 (including 3.4.0 and 4.3.3), -mtune=merced is
implemented in GCC. Starting from 4.4.0, -mtune=merced is deprecated.

Even implemented in versions between 3.4.0 and 4.3.3, the -mtune=merced
feature has been broken in some of the versions. For example, GCC 4.1.2 reports
interanl tuning function errors during kernel building with -mtune=merced. Or GCC
Bugzilla 16130 reports another -mtune=merced issue on GCC 3.4.1.

So I would remove the -mtune=merced from IA64 kernel build. Without this option,
kernel on Merced will remain the same except losing an unstable and out-of-date
performance tunning feature.

Since GCC version 3.4.0, -mtune=mckinley has been implemented. The
-mtune=mckinley option functions the same as mtune=itanium2. And mtune=itanium2
is the default option. So we don't need to add mtune=mckinley either since its
been the default option in any GCC version which implements this option.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>

---
 arch/ia64/Makefile |    5 -----
 1 files changed, 5 deletions(-)

diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 58a7e46..e7cbaa0 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -41,11 +41,6 @@ $(error Sorry, you need a newer version of the assember, one that is built from
 		ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
 endif
 
-ifeq ($(call cc-version),0304)
-	cflags-$(CONFIG_ITANIUM)	+= -mtune=merced
-	cflags-$(CONFIG_MCKINLEY)	+= -mtune=mckinley
-endif
-
 KBUILD_CFLAGS += $(cflags-y)
 head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
 

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

* Re: [PATCH] ia64: minor Makefile simplification through use of cc-ifversion
  2009-07-24 23:15       ` Fenghua Yu
@ 2009-07-24 23:25         ` Frans Pop
  0 siblings, 0 replies; 6+ messages in thread
From: Frans Pop @ 2009-07-24 23:25 UTC (permalink / raw)
  To: Fenghua Yu
  Cc: Peter Chubb, Sam Ravnborg, linux-ia64@vger.kernel.org,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org

On Saturday 25 July 2009, Fenghua Yu wrote:
> Between GCC version 3.4.0 and 4.3.3 (including 3.4.0 and 4.3.3),
> -mtune=merced is implemented in GCC. Starting from 4.4.0, -mtune=merced
> is deprecated.
>
> Even implemented in versions between 3.4.0 and 4.3.3, the -mtune=merced
> feature has been broken in some of the versions. For example, GCC 4.1.2
> reports interanl tuning function errors during kernel building with
> -mtune=merced. Or GCC Bugzilla 16130 reports another -mtune=merced
> issue on GCC 3.4.1.
>
> So I would remove the -mtune=merced from IA64 kernel build. Without
> this option, kernel on Merced will remain the same except losing an
> unstable and out-of-date performance tunning feature.
>
> Since GCC version 3.4.0, -mtune=mckinley has been implemented. The
> -mtune=mckinley option functions the same as mtune=itanium2. And
> mtune=itanium2 is the default option. So we don't need to add
> mtune=mckinley either since its been the default option in any GCC
> version which implements this option.
>
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>

Fine by me, but you'll probably want to give the commit a different 
subject :-)

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

end of thread, other threads:[~2009-07-24 23:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-23 18:56 [PATCH] ia64: minor Makefile simplification through use of cc-ifversion Frans Pop
2009-07-23 21:28 ` [PATCH] ia64: minor Makefile simplification through use of Sam Ravnborg
2009-07-24  1:39   ` [PATCH] ia64: minor Makefile simplification through use of cc-ifversion Peter Chubb
2009-07-24 18:23     ` Frans Pop
2009-07-24 23:15       ` Fenghua Yu
2009-07-24 23:25         ` Frans Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox