All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: benh@kernel.crashing.org
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
	linux-m32r@ml.linux-m32r.org,
	Luke Browning <LukeBrowning@us.ibm.com>,
	takata@linux-m32r.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs
Date: Wed, 21 May 2008 11:41:47 -0700	[thread overview]
Message-ID: <20080521114147.59ca3551.akpm@linux-foundation.org> (raw)
In-Reply-To: <1211392585.8297.218.camel@pasglop>

On Wed, 21 May 2008 13:56:25 -0400 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> 
> On Fri, 2008-04-18 at 16:44 +1000, Benjamin Herrenschmidt wrote:
> > > > so what
> > > > about the patch below ?
> > > 
> > > I like it, but the compiler won't ;)
> > > 
> > > > If you're ok, I'll re-send with appropriate sob
> > > > & adapted powerpc part.
> > > 
> > > Sure.
> > > 
> > > > +void __init __attribute__((weak) thread_info_cache_init(void)
> > >
> 
> Back to this old subject...
> 
> I'm having reports that this is not working...
> 
> gcc is seeing the empty weak function and is optimizing it out
> before it gets a chance to link to the arch provided one.
> 
> This would affect that and the other one next to it..
> 
> That seems pretty bad... it causes nasty crashes as we end up having no
> idea what the compiler decided to generate... I suppose we could keep
> the weak stubs out of the file where they are called but that sucks.
> 
> ie. This is some form of gcc 4.1.1
> 
> Is that a known problem ? A gcc issue ? Not sure what is expected from
> those weak functions.

yup, gcc bug.  Discussed recently on lkml, "Subject: Re: huge gcc
4.1.{0,1} __weak problem".  I don't think anything ended up happening
about it though.

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: benh@kernel.crashing.org
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
	linux-m32r@ml.linux-m32r.org, takata@linux-m32r.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	Paul Mackerras <paulus@samba.org>,
	Luke Browning <LukeBrowning@us.ibm.com>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs
Date: Wed, 21 May 2008 11:41:47 -0700	[thread overview]
Message-ID: <20080521114147.59ca3551.akpm@linux-foundation.org> (raw)
Message-ID: <20080521184147.pV1r7Xek63nZhCPSKh3qbmGaQ5BlycrS21jFkNaC5R8@z> (raw)
In-Reply-To: <1211392585.8297.218.camel@pasglop>

On Wed, 21 May 2008 13:56:25 -0400 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> 
> On Fri, 2008-04-18 at 16:44 +1000, Benjamin Herrenschmidt wrote:
> > > > so what
> > > > about the patch below ?
> > > 
> > > I like it, but the compiler won't ;)
> > > 
> > > > If you're ok, I'll re-send with appropriate sob
> > > > & adapted powerpc part.
> > > 
> > > Sure.
> > > 
> > > > +void __init __attribute__((weak) thread_info_cache_init(void)
> > >
> 
> Back to this old subject...
> 
> I'm having reports that this is not working...
> 
> gcc is seeing the empty weak function and is optimizing it out
> before it gets a chance to link to the arch provided one.
> 
> This would affect that and the other one next to it..
> 
> That seems pretty bad... it causes nasty crashes as we end up having no
> idea what the compiler decided to generate... I suppose we could keep
> the weak stubs out of the file where they are called but that sucks.
> 
> ie. This is some form of gcc 4.1.1
> 
> Is that a known problem ? A gcc issue ? Not sure what is expected from
> those weak functions.

yup, gcc bug.  Discussed recently on lkml, "Subject: Re: huge gcc
4.1.{0,1} __weak problem".  I don't think anything ended up happening
about it though.


  reply	other threads:[~2008-05-21 18:41 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10  3:22 [PATCH 1/2] Add thread_info_cache_init() to all archs Benjamin Herrenschmidt
2008-04-10  3:22 ` Benjamin Herrenschmidt
2008-04-10  3:22 ` Benjamin Herrenschmidt
2008-04-10  3:22 ` Benjamin Herrenschmidt
     [not found] ` <20080410032354.90CB1DDF0F-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
2008-04-10 21:46   ` Benjamin Herrenschmidt
2008-04-10 21:46     ` Benjamin Herrenschmidt
2008-04-14  0:19   ` Andrew Morton
2008-04-14  0:19     ` Andrew Morton
2008-04-14  0:19     ` Andrew Morton
2008-04-14  0:19     ` Andrew Morton
2008-04-14  0:38     ` Benjamin Herrenschmidt
2008-04-14  0:38       ` Benjamin Herrenschmidt
2008-04-14  2:13       ` Andrew Morton
2008-04-14  2:13         ` Andrew Morton
2008-04-14  2:13         ` Andrew Morton
     [not found]         ` <20080413191338.9776ebd0.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-04-18  3:58           ` Benjamin Herrenschmidt
2008-04-18  3:58             ` Benjamin Herrenschmidt
2008-04-18  3:58             ` Benjamin Herrenschmidt
2008-04-18  4:19             ` Andrew Morton
2008-04-18  4:19               ` Andrew Morton
2008-04-18  4:19               ` Andrew Morton
     [not found]               ` <20080417211905.8ff769fa.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-04-18  4:38                 ` Michael Ellerman
2008-04-18  4:38                   ` Michael Ellerman
2008-04-18  6:44                 ` Benjamin Herrenschmidt
2008-04-18  6:44                   ` Benjamin Herrenschmidt
2008-04-18  6:44                   ` Benjamin Herrenschmidt
2008-05-21 17:56                   ` Benjamin Herrenschmidt
2008-05-21 17:56                     ` Benjamin Herrenschmidt
2008-05-21 18:41                     ` Andrew Morton [this message]
2008-05-21 18:41                       ` Andrew Morton
2008-05-21 19:06                       ` Sam Ravnborg
2008-05-21 19:06                         ` Sam Ravnborg
2008-05-21 20:38                         ` Benjamin Herrenschmidt
2008-05-21 20:38                           ` Benjamin Herrenschmidt
2008-05-21 19:44                       ` Benjamin Herrenschmidt
2008-05-21 19:44                         ` Benjamin Herrenschmidt
2008-05-21 20:52                         ` Andrew Morton
2008-05-21 20:52                           ` Andrew Morton
2008-04-18  4:21             ` Kyle McMartin
2008-04-18  4:21               ` Kyle McMartin
  -- strict thread matches above, loose matches on Subject: below --
2008-04-10 23:36 Benjamin Herrenschmidt
2008-04-10 23:36 ` Benjamin Herrenschmidt
2008-04-10 23:36 ` Benjamin Herrenschmidt
2008-04-10 23:36 ` Benjamin Herrenschmidt

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=20080521114147.59ca3551.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=LukeBrowning@us.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m32r@ml.linux-m32r.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=takata@linux-m32r.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.