From: Ingo Molnar <mingo@elte.hu>
To: Roland Dreier <rdreier@cisco.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
Arjan van de Ven <arjan@infradead.org>,
Matt Mackall <mpm@selenic.com>
Subject: Re: [patch 01/2] allow gcc4 to control inlining
Date: Wed, 28 Dec 2005 15:53:38 +0100 [thread overview]
Message-ID: <20051228145338.GA15711@elte.hu> (raw)
In-Reply-To: <adak6dpcml0.fsf@cisco.com>
* Roland Dreier <rdreier@cisco.com> wrote:
> > -#define inline inline __attribute__((always_inline))
> > -#define __inline__ __inline__ __attribute__((always_inline))
> > -#define __inline __inline __attribute__((always_inline))
>
> Why not just delete these lines? This:
>
> > +#define inline inline
> > +#define __inline__ __inline__
> > +#define __inline __inline
>
> seems pointless to me.
indeed. I thought they were redefined to a default if not defined, but
that's only the case for __always_inline. Updated patch below.
Ingo
--------
Subject: allow gcc4 to control inlining
allow gcc4 compilers to decide what to inline and what not - instead
of the kernel forcing gcc to inline all the time.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
----
include/linux/compiler-gcc4.h | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
Index: linux/include/linux/compiler-gcc4.h
===================================================================
--- linux.orig/include/linux/compiler-gcc4.h
+++ linux/include/linux/compiler-gcc4.h
@@ -3,14 +3,12 @@
/* These definitions are for GCC v4.x. */
#include <linux/compiler-gcc.h>
-#define inline inline __attribute__((always_inline))
-#define __inline__ __inline__ __attribute__((always_inline))
-#define __inline __inline __attribute__((always_inline))
#define __deprecated __attribute__((deprecated))
#define __attribute_used__ __attribute__((__used__))
#define __attribute_pure__ __attribute__((pure))
#define __attribute_const__ __attribute__((__const__))
-#define noinline __attribute__((noinline))
+#define noinline __attribute__((noinline))
+#define __always_inline inline __attribute__((always_inline))
#define __must_check __attribute__((warn_unused_result))
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
next prev parent reply other threads:[~2005-12-28 14:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-28 11:46 [patch 01/2] allow gcc4 to control inlining Ingo Molnar
2005-12-28 14:26 ` Matt Mackall
2005-12-28 14:34 ` Ingo Molnar
2005-12-28 14:36 ` Matt Mackall
2005-12-28 14:39 ` Roland Dreier
2005-12-28 14:53 ` Ingo Molnar [this message]
2005-12-28 18:39 ` Al Viro
2005-12-28 19:51 ` Arjan van de Ven
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=20051228145338.GA15711@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=rdreier@cisco.com \
--cc=torvalds@osdl.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