[Cbe-oss-dev] [PATCH] force -mno-string option on cell

Segher Boessenkool segher at kernel.crashing.org
Mon Mar 26 22:00:31 EST 2007


>> It would be even better to not lie to the compiler by
>> telling it it can use the LS area as normal memory, since
>> evidently it cannot :-)
>
> Yes, this is the important point. I actually think the first
> patch that just replaces memcpy with memcpy_fromio is the
> right solution for the specific problem.

Not only is it the _right_ solution, it actually _is_ a
solution -- adding -mno-string only sweeps one particular
symptom under the rug, it doesn't fix anything.

> Avoiding certain instructions in the kernel may be a good
> thing to do as well,

Only if there is something special about the kernel wrt
those instructions.  For example, if certain insns cannot
execute in supervisor mode on some CPU.

If there is no such special consideration, you should
just let GCC do its job (and if you think it makes bad
insn selection choices, you know where to come complain).

> but this is not at all a cell specific
> thing.

Indeed.

> Maybe we should have a more detailed CPU selection Kconfig
> option like
>
> CPU Family
>    * 64 bit common (power3/4/5/6, ppc970, cell, *star)
>    * 32 bit common (6xx, 82xx, 83xx, 86xx)
>    * 40x/44x
>    * ...

Useful.  This could at least partly be derived / defaulted
from the platform support that is already selected, too.

> Minimum supported CPU (gcc -march=, depending on above selection)
>    * 603
>    * 604
>    * 750
>    * power3
>    * power4
>    * 970

There is no -march= option.  You mean -mcpu= I think?

> Optimize for CPU (gcc -mtune)
>    (subset of the -march list as before)

-mcpu= implies -mtune= for the same CPU.  I don't think
many people would ever want to set something else.

Btw, when you install GCC, you can select its default
-mcpu= target: ../gcc/configure --with-cpu=970 .  It
helps ;-)


Segher




More information about the cbe-oss-dev mailing list