public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [patch] inlining: do not allow gcc below version 4 to optimize inlining
Date: Wed, 30 Apr 2008 22:03:07 +0300	[thread overview]
Message-ID: <20080430190307.GC29330@cs181133002.pp.htv.fi> (raw)
In-Reply-To: <20080429221530.GA11398@elte.hu>

On Wed, Apr 30, 2008 at 12:15:31AM +0200, Ingo Molnar wrote:
> 
> fix the condition to match intention: always use the old inlining 
> behavior on all gcc versions below 4.
> 
> this should solve the UML build problem.

You reported this problem.

Does it fix the problem you reported or not?

> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  include/linux/compiler-gcc.h |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> Index: linux-x86.q/include/linux/compiler-gcc.h
> ===================================================================
> --- linux-x86.q.orig/include/linux/compiler-gcc.h
> +++ linux-x86.q/include/linux/compiler-gcc.h
> @@ -29,10 +29,11 @@
>    BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
>  
>  /*
> - * Force always-inline if the user requests it so via the .config:
> + * Force always-inline if the user requests it so via the .config,
> + * or if gcc is too old:
>   */
>  #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
> -    !defined(CONFIG_OPTIMIZE_INLINING) && (__GNUC__ >= 4)

One moment.

Let me try to understand what we currently have in the tree.

This *always* enables the so called "optimized inlining" for the older 
compilers we did *not* wanted to have this for.

Even with CONFIG_OPTIMIZE_INLINING=n .

How was this reviewed and tested?

> +    !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
>  # define inline		inline		__attribute__((always_inline))
>  # define __inline__	__inline__	__attribute__((always_inline))
>  # define __inline	__inline	__attribute__((always_inline))

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2008-04-30 19:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29 22:15 [patch] inlining: do not allow gcc below version 4 to optimize inlining Ingo Molnar
2008-04-30 19:03 ` Adrian Bunk [this message]
2008-04-30 19:58   ` Sam Ravnborg
2008-04-30 20:38   ` Adrian Bunk

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=20080430190307.GC29330@cs181133002.pp.htv.fi \
    --to=bunk@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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