PPC601 MQ patch

From: Stef Simoens <hidden>
Date: 2004-06-01 12:26:07

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/

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help