linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Gabriel Paubert <paubert@iram.es>
Cc: Wrobel Heinz-R39252 <r39252@freescale.com>,
	Michael Ellerman <michael@ellerman.id.au>,
	Steffen Rumler <steffen.rumler.ext@nsn.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: kernel panic during kernel module load (powerpc specific part)
Date: Wed, 06 Jun 2012 08:47:02 +1000	[thread overview]
Message-ID: <1338936422.7150.139.camel@pasglop> (raw)
In-Reply-To: <20120605104449.GA32032@visitor2.iram.es>

On Tue, 2012-06-05 at 12:44 +0200, Gabriel Paubert wrote:
> On Tue, Jun 05, 2012 at 08:00:42AM +1000, Benjamin Herrenschmidt wrote:
> > On Mon, 2012-06-04 at 13:03 +0200, Gabriel Paubert wrote:
> > > There is no conflict to the ABI. These functions are supposed to be
> > > directly reachable from whatever code
> > > section may need them.
> > > 
> > > Now I have a question: how did you get the need for this?
> > > 
> > > None of my kernels uses them:
> > > - if I compile with -O2, the compiler simply expands epilogue and
> > > prologue to series of lwz and stw
> > > - if I compile with -Os, the compiler generates lmw/stmw which give
> > > the smallest possible cache footprint
> > > 
> > > Neither did I find a single reference to these functions in several
> > > systems that I grepped for.
> > 
> > Newer gcc's ... even worse, with -Os, it does it for a single register
> > spill afaik. At least that's how I hit it with grub2 using whatever gcc
> > is in fc17.
> 
> Ok, it's beyond stupid, and at this point must be considered a gcc bug.

Probably, I haven't had a chance to report it...

It would make more sense if the out of line functions also handled
creating the stack frame & disposing of it (ie, maybe a tail call for
return) but they don't even do that so yes it's quite gross.

Cheers,
Ben.

  reply	other threads:[~2012-06-05 22:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 14:33 kernel panic during kernel module load (powerpc specific part) Steffen Rumler
2012-05-30 23:24 ` Michael Ellerman
2012-05-31  7:04   ` Wrobel Heinz-R39252
2012-05-31 11:04     ` Gabriel Paubert
2012-06-01  9:18       ` Benjamin Herrenschmidt
2012-06-01 11:33         ` Wrobel Heinz-R39252
2012-06-04  7:43           ` Steffen Rumler
2012-06-04 10:53             ` Paul Mackerras
2012-06-04 11:03           ` Gabriel Paubert
2012-06-04 22:00             ` Benjamin Herrenschmidt
2012-06-05 10:44               ` Gabriel Paubert
2012-06-05 22:47                 ` Benjamin Herrenschmidt [this message]
2012-06-05 11:32               ` Gabriel Paubert
2012-06-05 22:14                 ` Benjamin Herrenschmidt
2012-06-06  7:36             ` Steffen Rumler
2012-06-06 11:32               ` Benjamin Herrenschmidt
2012-06-06 14:37                 ` [PATCH] " Steffen Rumler
2012-06-21 15:27                   ` roger blofeld

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=1338936422.7150.139.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=michael@ellerman.id.au \
    --cc=paubert@iram.es \
    --cc=r39252@freescale.com \
    --cc=steffen.rumler.ext@nsn.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;
as well as URLs for NNTP newsgroup(s).