linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Sam Ravnborg <sam@ravnborg.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>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs
Date: Wed, 21 May 2008 16:38:20 -0400	[thread overview]
Message-ID: <1211402300.8297.240.camel@pasglop> (raw)
In-Reply-To: <20080521190659.GB12638@uranus.ravnborg.org>


On Wed, 2008-05-21 at 21:06 +0200, Sam Ravnborg wrote:
> It was discussed to add some run-time checks for this issue.
> But the examples given were a bit fluffy so I never integrated
> anything
> i kbuild to detect this.
> 
> As this is only a bug for const weak functions they could be made
> non-const
> if they are seldomly used?

With the asm("") trick ?

I suppose, but I'm also happy to just reject the bad gcc...

It shouldn't be too hard to do a test case made of 2 files.

test_foo.c

int foo(void)
{
	printf("good\n");
}

test_bar.c

int foo(void) __weak
{
}

int main(void)
{
	foo();
	return 0;
}

And check for "good" in the output of said program..

Can somebody test that ? Luke, you have a broken compiler, can you make
up some test that could be integrated in the kernel build system
easily ?

(I'm travelling right now, no time to play much with it myself).

Cheers,
Ben.

  reply	other threads:[~2008-05-21 20:38 UTC|newest]

Thread overview: 17+ 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 21:46 ` Benjamin Herrenschmidt
2008-04-14  0:19 ` Andrew Morton
2008-04-14  0:38   ` Benjamin Herrenschmidt
2008-04-14  2:13     ` Andrew Morton
2008-04-18  3:58       ` Benjamin Herrenschmidt
2008-04-18  4:19         ` Andrew Morton
2008-04-18  4:38           ` Michael Ellerman
2008-04-18  6:44           ` Benjamin Herrenschmidt
2008-05-21 17:56             ` Benjamin Herrenschmidt
2008-05-21 18:41               ` Andrew Morton
2008-05-21 19:06                 ` Sam Ravnborg
2008-05-21 20:38                   ` Benjamin Herrenschmidt [this message]
2008-05-21 19:44                 ` Benjamin Herrenschmidt
2008-05-21 20:52                   ` Andrew Morton
2008-04-18  4:21         ` Kyle McMartin
  -- strict thread matches above, loose matches on Subject: below --
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=1211402300.8297.240.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=LukeBrowning@us.ibm.com \
    --cc=akpm@linux-foundation.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=sam@ravnborg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).