PPC601 MQ patch

Stef Simoens stef.simoens at pi.be
Tue Jun 1 22:26:07 EST 2004


Hi,

I wanted to use gcc's -mcpu=601 to optimize code for my processor; I noticed the code had problems with certain instructions (the ones which use the POWER MQ register).

With some help of benh I'd like to share this patch. Unlike benh asked, it is still for 2.4 (I will provide the 2.6 patch as soon I'm sure it works as expected).

I used the assembler 'hiding' techniques as used for VRSAVE, to know where to save/restore MQ I looked where the XER register was saved/restored...

ppc-stub.c is used for debugging. I added MQ, but I didn't test this. Especially, I don't know if my changes interfere with other machines (include/asm-ppc/ptrace.h states mq is used to hold IPL on APUS)
Also note, I didn't enable CONFIG_PPC601_SYNC_FIX while testing (my machine doesn't appear to need it...)

Files changed:
 arch/ppc/config.in
	- rearrange PPC601 options
	- CONFIG_PPC601_MQ configure option
 arch/ppc/kernel/cputable.cx
	- add CPU_FTR_MQ to 601 features
 arch/ppc/kernel/entry.S
	- saving and restoring of MQ register
 arch/ppc/kernel/head.S
	- saving of MQ register
 arch/ppc/kernel/ppc-stub.c
	- we use mq now :)
 arch/ppc/kernel/process.c
	- show the MQ register
 Documentation/Configure.help
	- document CONFIG_PPC601_MQ
 include/asm-ppc/cputable.h
	- define CPU_FTR_MQ
 include/asm-ppc/processor.h
	- define SPRN_MQ
 include/asm-ppc/ptrace.h
	- delete the '(not used at present)' comment


---------------------------------------------------------
With Scarlet ADSL your upload speed could reach 384 Kbits
More info at http://www.scarlet.be/nl/consumer/adsl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.4.26-mq.diff.gz
Type: application/x-gzip-compressed
Size: 2556 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20040601/2f3b26d8/attachment.bin>


More information about the Linuxppc-dev mailing list