[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080521223842.GE15136@uranus.ravnborg.org>
Date: Thu, 22 May 2008 00:38:42 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Mathieu Desnoyers <compudj@...stal.dyndns.org>
Cc: "H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
Jeremy Fitzhardinge <jeremy@...p.org>,
Ingo Molnar <mingo@...e.hu>,
David Miller <davem@...emloft.net>,
PaulMackerraspaulus@...ba.org
Subject: Re: [PATCH] Fix Immediate Values x86_64 support old gcc (v2)
On Wed, May 21, 2008 at 05:57:56PM -0400, Mathieu Desnoyers wrote:
> * Sam Ravnborg (sam@...nborg.org) wrote:
>
> > Same with USE_IMMEDIATE - as USE_IMMEDIATE is only used in a x86 Makefile.
> > Or did I miss sothing?
> >
>
> Given that I want to change every use of CONFIG_IMMEDIATE into
> USE_IMMEDIATE, both in architecture specific and independant C files and
> also in arch spec. and indep. Makefiles, I will have to define
> USE_IMMEDIATE on other arch too.
>
> Here is the updated patch. It applies on top of the sched-devel.git
> tree.
>
> Fix Immediate Values x86_64 support old gcc
>
> GCC < 4, on x86_64, does not accept symbol+offset operands for "i" constraints
> asm statements. Fallback on generic immediate values if this compiler is
> detected.
>
> Changelog :
> - USE_IMMEDIATE must now be used in lieue of CONFIG_IMMEDIATE in Makefiles and
> in C code.
> - Every architecture implementing immediate values must declare USE_IMMEDIATE
> in their Makefile.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
> CC: Sam Ravnborg <sam@...nborg.org>
> CC: "H. Peter Anvin" <hpa@...or.com>
> CC: Jeremy Fitzhardinge <jeremy@...p.org>
> CC: Ingo Molnar <mingo@...e.hu>
> CC: David Miller <davem@...emloft.net>
> CC: Paul Mackerras paulus@...ba.org
> ---
> Makefile | 5 +++++
> arch/powerpc/Makefile | 2 ++
> arch/powerpc/kernel/Makefile | 2 +-
> arch/x86/Makefile | 5 +++++
> arch/x86/kernel/Makefile | 2 +-
> arch/x86/kernel/traps_32.c | 4 ++--
> include/linux/immediate.h | 2 +-
> include/linux/module.h | 4 ++--
> kernel/Makefile | 2 +-
> kernel/module.c | 8 ++++----
> 10 files changed, 24 insertions(+), 12 deletions(-)
>
> Index: linux-2.6-sched-devel/arch/x86/Makefile
> ===================================================================
> --- linux-2.6-sched-devel.orig/arch/x86/Makefile 2008-05-21 09:04:52.000000000 -0400
> +++ linux-2.6-sched-devel/arch/x86/Makefile 2008-05-21 14:18:16.000000000 -0400
> @@ -43,6 +43,7 @@
>
> # temporary until string.h is fixed
> KBUILD_CFLAGS += -ffreestanding
> + export USE_IMMEDIATE := $(CONFIG_IMMEDIATE)
tabs has a special sematic purpose in makefiles so do not
use tabs for indent.
> else
> BITS := 64
> UTS_MACHINE := x86_64
> @@ -78,6 +79,10 @@
> "$(CC)" -fstack-protector-all )
>
> KBUILD_CFLAGS += $(stackp-y)
> +
> + # x86_64 gcc 3.x has problems with passing symbol+offset in
> + # asm "i" constraint.
> + export USE_IMMEDIATE := $(call cc-ifversion, -ge, 0400, $(CONFIG_IMMEDIATE))
tabs -> spaces again.
Other than that I like this patch much better.
Thanks,
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists