A quote from from SPARC V9 specification:
commit7ba7c6d0898977b10d41e9c2ac96eda606bd8e2f
authorJakub Jermar <jakub@jermar.eu>
Sun, 8 Oct 2006 20:09:28 +0000 (8 20:09 +0000)
committerJakub Jermar <jakub@jermar.eu>
Sun, 8 Oct 2006 20:09:28 +0000 (8 20:09 +0000)
tree9f13e42030c985d380a1af34cb1f37d506a361c9
parent64c2ad54353df91f481dd1d3d75da41bb50d72ea
A quote from from SPARC V9 specification:

 The Y register is deprecated; it is provided only for compatibility with previous versions
 of the architecture. It should not be used in new SPARC-V9 software. It is
 recommended that all instructions that reference the Y register (i.e., SMUL,
 SMULcc, UMUL, UMULcc, MULScc, SDIV, SDIVcc, UDIV, UDIVcc, RDY, and
 WRY) be avoided. See the appropriate pages in Appendix A, “Instruction Definitions,”
 for suitable substitute instructions.

Still gcc is generating code which uses Y and some of the instructions above.
This change modifies the preemptible_handler() to preserve the Y register
across preemption.
kernel/arch/sparc64/include/trap/trap_table.h
kernel/arch/sparc64/src/dummy.s
kernel/arch/sparc64/src/trap/trap_table.S
kernel/doc/arch/sparc64
kernel/generic/src/mm/as.c