Re: kernel panic during kernel module load (powerpc specific part)

From
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date
2012-06-05 22:47:20
Reply to
Gabriel Paubert, 2012-06-05
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:
quoted
On Mon, 2012-06-04 at 13:03 +0200, Gabriel Paubert wrote:
quoted
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.
Thread (18 messages) 18 messages, 7 authors, last reply 2012-06-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help