mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Tom Rini <trini@kernel.crashing.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	bunk@kernel.org, davem@davemloft.net, mingo@elte.hu,
	tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org,
	suresh.b.siddha@intel.com
Subject: Re: huge gcc 4.1.{0,1} __weak problem
Date: Thu, 1 May 2008 17:34:34 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0805011729540.5994@woody.linux-foundation.org> (raw)
In-Reply-To: <20080501233038.GA20601@linux-os.sc.intel.com>



On Thu, 1 May 2008, Venki Pallipadi wrote:
> 
> __weak function with single return statement, did not get inlined when called
> from say

Is it always about inlining? If so, can't we add a __noinline__ to the 
declaration of __weak?

Something like this oneliner?

		Linus

---
 include/linux/compiler-gcc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 5c8351b..4061fc7 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -41,7 +41,7 @@
 
 #define __deprecated			__attribute__((deprecated))
 #define __packed			__attribute__((packed))
-#define __weak				__attribute__((weak))
+#define __weak				__attribute__((weak)) noinline
 #define __naked				__attribute__((naked))
 #define __noreturn			__attribute__((noreturn))
 

  reply	other threads:[~2008-05-02  0:36 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  1:31 [PATCH] /dev/mem gcc weak function workaround Venki Pallipadi
2008-04-30  4:28 ` David Miller
2008-04-30 12:49   ` Pallipadi, Venkatesh
2008-04-30 20:15     ` Tom Rini
2008-05-01 21:56     ` huge gcc 4.1.{0,1} __weak problem Adrian Bunk
2008-05-01 22:20       ` Andrew Morton
2008-05-01 22:27         ` Linus Torvalds
2008-05-01 22:33           ` Andrew Morton
2008-05-01 23:24             ` Tom Rini
2008-05-01 23:59               ` Andrew Morton
2008-05-02  0:21                 ` Justin Mattock
2008-05-02  7:18                 ` Vegard Nossum
2008-05-02 13:43                   ` Theodore Tso
2008-05-02  8:10                 ` Adrian Bunk
2008-05-02  9:09                 ` Andi Kleen
2008-05-01 22:35           ` Venki Pallipadi
2008-05-01 22:42             ` Andrew Morton
2008-05-01 22:49               ` Jakub Jelinek
2008-05-01 23:21               ` Tom Rini
2008-05-01 23:30                 ` Venki Pallipadi
2008-05-02  0:34                   ` Linus Torvalds [this message]
2008-05-02  0:39                     ` Suresh Siddha
2008-05-02 21:11                       ` Jeremy Fitzhardinge
2008-05-02 22:02                         ` David Miller
2008-05-01 23:23             ` Tom Rini
2008-05-01 22:51           ` David Miller
2008-06-26 10:37           ` [2.6.26 patch] #error for gcc 4.1.{0,1} Adrian Bunk
2008-05-02 21:09       ` huge gcc 4.1.{0,1} __weak problem Jeremy Fitzhardinge
2008-05-02 21:19         ` Adrian Bunk
2008-05-01 23:55 Chris Knadle
2008-05-02  9:19 ` Miquel van Smoorenburg
2008-05-02  9:55 ` Alistair John Strachan
2008-05-02 10:43   ` Sam Ravnborg
2008-05-02 11:48     ` Alistair John Strachan
2008-05-02 13:57       ` Sam Ravnborg
2008-05-02 14:11         ` Jakub Jelinek
2008-05-02 15:26           ` Alistair John Strachan
2008-05-02 14:57         ` Jeremy Fitzhardinge
2008-05-02 12:40   ` Sven-Haegar Koch

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=alpine.LFD.1.10.0805011729540.5994@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@kernel.org \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=trini@kernel.crashing.org \
    --cc=venkatesh.pallipadi@intel.com \
    /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

all inboxes | Powered by JetHome®