Subject: Re: "-mcpu=21264a" for kernel compile?
To: Hiroshi Hakoyama <firstname.lastname@example.org>
From: Greg A. Woods <email@example.com>
Date: 12/16/2004 17:24:43
[ On Tuesday, December 14, 2004 at 20:22:51 (+0900), Hiroshi Hakoyama wrote: ]
> Subject: Re: "-mcpu=21264a" for kernel compile?
> For 21264a CPU, I have compiled a kernel with -mcpu=ev56,
(note that 'ev56' and '21164a' are equivalent CPU_TYPE values for GCC)
> however it
> also shows kernel panics and errors like "internal compiler error:
> Segmentation fault" during a kernel compile. Frequency of the
> "internal compile error" increased for a kernel with ev56 flag,
> comparing with a kernel with no extra flag.
That's not likely a compiler problem -- that's most likely a hardware
problem. I've never seen any such errors on my dual 21164A/400MHz
> Why do you use -mno-soft-float?
That's actually just a side-effect of my using '-mno-soft-float' for the
rest of the userland build.....
> Did you omit a default flag
> -mno-fp-regs (-msoft-float), when you use -mno-soft-float?
No, definitely not -- '-mno-fp-regs' is necessary when compiling the
kernel to ensure that the FPU registers are never used as temporary
registers by any kernel code, since they are not saved in user process
context when switching to kernel mode. If the kernel used any FPU
registers it would clobber user values in those registers.
In any case '-mno-fp-regs' is always added by the kernel makefile
generated by config(8).
> Kernel FAQ
> says -msoft-float have advantages for kernel performance...
That doesn't seem right -- as I understand it the kernel does not, and
cannot, use any floating point.
Greg A. Woods
+1 416 218-0098 VE3TCP RoboHack <firstname.lastname@example.org>
Planix, Inc. <email@example.com> Secrets of the Weird <firstname.lastname@example.org>