kernel panic during kernel module load (powerpc specific part)
Gabriel Paubert
paubert at iram.es
Tue Jun 5 21:32:25 EST 2012
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.
Well, I've not yet been able to make it call the save/restore routines,
but here on a machine with Debian testing and several gcc installed:
- gcc-4.4 never generates lmw/stmw, it always uses individual
lwz/stw whatever options are set (-Os -mmultiple).
- gcc-4.6 and gcc-4.7 behave identically, if -Os is set, they
generate by default lmw/stmw. But if I combine -Os with
-mno-multiple, they call the helper functions.
In other words, on this system, gcc-4.4 is broken but should not
cause any harm. gcc-4.6 and gcc-4.7 look correct, but are there
any processors on which -mno-multiple is worth setting?
Regards,
Gabriel
More information about the Linuxppc-dev
mailing list