biarch support for 2.6, missing kdb pieces

Anton Blanchard anton at
Wed Oct 15 09:08:54 EST 2003


> This patch adds biarch support, removes the hardcoded power4 (which will
> result in a missing tlbiel handling in pSeries_flush_hash_range()) and
> adds a missing kdb file (copied from 2.4).

It makes sense to optimise for POWER4 in the default kernel. Up until
recently -mcpu=POWER4 would tune for it but would still run on RS64 and

Unfortunately the mtcrf optimisation in POWER4 results in an illegal
instruction on POWER3.

One option would be to recognise this in the SIGILL handler and fix it
up. However last time I looked, we hit the first mtcrf a few hundred
cycles into boot which is way too early to handle an exception.

Another option would be to scan the kernel text early and make the
necessary modifications. This is probably playing with fire, we could
get unlucky and find a bogus match (eg junk in the syscall table).

The other option is to have a gcc/binutils option that would tune for
POWER4 but still allow it to boot on POWER3.

Alan: BTW is there an extended format for mtcrf? I was optimising some
POWER4 only assembly in the kernel and figured we could safely use the
extended mtcrf there.


** Sent via the linuxppc64-dev mail list. See

More information about the Linuxppc64-dev mailing list