diff options
Diffstat (limited to 'arch/sparc64/kernel/entry.S')
-rw-r--r-- | arch/sparc64/kernel/entry.S | 116 |
1 files changed, 4 insertions, 112 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index a47f2d0b1a29..eee516a71c14 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -271,8 +271,9 @@ cplus_fptrap_insn_1: | |||
271 | fmuld %f0, %f2, %f26 | 271 | fmuld %f0, %f2, %f26 |
272 | faddd %f0, %f2, %f28 | 272 | faddd %f0, %f2, %f28 |
273 | fmuld %f0, %f2, %f30 | 273 | fmuld %f0, %f2, %f30 |
274 | membar #Sync | ||
274 | b,pt %xcc, fpdis_exit | 275 | b,pt %xcc, fpdis_exit |
275 | membar #Sync | 276 | nop |
276 | 2: andcc %g5, FPRS_DU, %g0 | 277 | 2: andcc %g5, FPRS_DU, %g0 |
277 | bne,pt %icc, 3f | 278 | bne,pt %icc, 3f |
278 | fzero %f32 | 279 | fzero %f32 |
@@ -301,8 +302,9 @@ cplus_fptrap_insn_2: | |||
301 | fmuld %f32, %f34, %f58 | 302 | fmuld %f32, %f34, %f58 |
302 | faddd %f32, %f34, %f60 | 303 | faddd %f32, %f34, %f60 |
303 | fmuld %f32, %f34, %f62 | 304 | fmuld %f32, %f34, %f62 |
305 | membar #Sync | ||
304 | ba,pt %xcc, fpdis_exit | 306 | ba,pt %xcc, fpdis_exit |
305 | membar #Sync | 307 | nop |
306 | 3: mov SECONDARY_CONTEXT, %g3 | 308 | 3: mov SECONDARY_CONTEXT, %g3 |
307 | add %g6, TI_FPREGS, %g1 | 309 | add %g6, TI_FPREGS, %g1 |
308 | ldxa [%g3] ASI_DMMU, %g5 | 310 | ldxa [%g3] ASI_DMMU, %g5 |
@@ -699,116 +701,6 @@ utrap_ill: | |||
699 | ba,pt %xcc, rtrap | 701 | ba,pt %xcc, rtrap |
700 | clr %l6 | 702 | clr %l6 |
701 | 703 | ||
702 | #ifdef CONFIG_BLK_DEV_FD | ||
703 | .globl floppy_hardint | ||
704 | floppy_hardint: | ||
705 | wr %g0, (1 << 11), %clear_softint | ||
706 | sethi %hi(doing_pdma), %g1 | ||
707 | ld [%g1 + %lo(doing_pdma)], %g2 | ||
708 | brz,pn %g2, floppy_dosoftint | ||
709 | sethi %hi(fdc_status), %g3 | ||
710 | ldx [%g3 + %lo(fdc_status)], %g3 | ||
711 | sethi %hi(pdma_vaddr), %g5 | ||
712 | ldx [%g5 + %lo(pdma_vaddr)], %g4 | ||
713 | sethi %hi(pdma_size), %g5 | ||
714 | ldx [%g5 + %lo(pdma_size)], %g5 | ||
715 | |||
716 | next_byte: | ||
717 | lduba [%g3] ASI_PHYS_BYPASS_EC_E, %g7 | ||
718 | andcc %g7, 0x80, %g0 | ||
719 | be,pn %icc, floppy_fifo_emptied | ||
720 | andcc %g7, 0x20, %g0 | ||
721 | be,pn %icc, floppy_overrun | ||
722 | andcc %g7, 0x40, %g0 | ||
723 | be,pn %icc, floppy_write | ||
724 | sub %g5, 1, %g5 | ||
725 | |||
726 | inc %g3 | ||
727 | lduba [%g3] ASI_PHYS_BYPASS_EC_E, %g7 | ||
728 | dec %g3 | ||
729 | orcc %g0, %g5, %g0 | ||
730 | stb %g7, [%g4] | ||
731 | bne,pn %xcc, next_byte | ||
732 | add %g4, 1, %g4 | ||
733 | |||
734 | b,pt %xcc, floppy_tdone | ||
735 | nop | ||
736 | |||
737 | floppy_write: | ||
738 | ldub [%g4], %g7 | ||
739 | orcc %g0, %g5, %g0 | ||
740 | inc %g3 | ||
741 | stba %g7, [%g3] ASI_PHYS_BYPASS_EC_E | ||
742 | dec %g3 | ||
743 | bne,pn %xcc, next_byte | ||
744 | add %g4, 1, %g4 | ||
745 | |||
746 | floppy_tdone: | ||
747 | sethi %hi(pdma_vaddr), %g1 | ||
748 | stx %g4, [%g1 + %lo(pdma_vaddr)] | ||
749 | sethi %hi(pdma_size), %g1 | ||
750 | stx %g5, [%g1 + %lo(pdma_size)] | ||
751 | sethi %hi(auxio_register), %g1 | ||
752 | ldx [%g1 + %lo(auxio_register)], %g7 | ||
753 | lduba [%g7] ASI_PHYS_BYPASS_EC_E, %g5 | ||
754 | or %g5, AUXIO_AUX1_FTCNT, %g5 | ||
755 | /* andn %g5, AUXIO_AUX1_MASK, %g5 */ | ||
756 | stba %g5, [%g7] ASI_PHYS_BYPASS_EC_E | ||
757 | andn %g5, AUXIO_AUX1_FTCNT, %g5 | ||
758 | /* andn %g5, AUXIO_AUX1_MASK, %g5 */ | ||
759 | |||
760 | nop; nop; nop; nop; nop; nop; | ||
761 | nop; nop; nop; nop; nop; nop; | ||
762 | |||
763 | stba %g5, [%g7] ASI_PHYS_BYPASS_EC_E | ||
764 | sethi %hi(doing_pdma), %g1 | ||
765 | b,pt %xcc, floppy_dosoftint | ||
766 | st %g0, [%g1 + %lo(doing_pdma)] | ||
767 | |||
768 | floppy_fifo_emptied: | ||
769 | sethi %hi(pdma_vaddr), %g1 | ||
770 | stx %g4, [%g1 + %lo(pdma_vaddr)] | ||
771 | sethi %hi(pdma_size), %g1 | ||
772 | stx %g5, [%g1 + %lo(pdma_size)] | ||
773 | sethi %hi(irq_action), %g1 | ||
774 | or %g1, %lo(irq_action), %g1 | ||
775 | ldx [%g1 + (11 << 3)], %g3 ! irqaction[floppy_irq] | ||
776 | ldx [%g3 + 0x08], %g4 ! action->flags>>48==ino | ||
777 | sethi %hi(ivector_table), %g3 | ||
778 | srlx %g4, 48, %g4 | ||
779 | or %g3, %lo(ivector_table), %g3 | ||
780 | sllx %g4, 5, %g4 | ||
781 | ldx [%g3 + %g4], %g4 ! &ivector_table[ino] | ||
782 | ldx [%g4 + 0x10], %g4 ! bucket->iclr | ||
783 | stwa %g0, [%g4] ASI_PHYS_BYPASS_EC_E ! ICLR_IDLE | ||
784 | membar #Sync ! probably not needed... | ||
785 | retry | ||
786 | |||
787 | floppy_overrun: | ||
788 | sethi %hi(pdma_vaddr), %g1 | ||
789 | stx %g4, [%g1 + %lo(pdma_vaddr)] | ||
790 | sethi %hi(pdma_size), %g1 | ||
791 | stx %g5, [%g1 + %lo(pdma_size)] | ||
792 | sethi %hi(doing_pdma), %g1 | ||
793 | st %g0, [%g1 + %lo(doing_pdma)] | ||
794 | |||
795 | floppy_dosoftint: | ||
796 | rdpr %pil, %g2 | ||
797 | wrpr %g0, 15, %pil | ||
798 | sethi %hi(109f), %g7 | ||
799 | b,pt %xcc, etrap_irq | ||
800 | 109: or %g7, %lo(109b), %g7 | ||
801 | |||
802 | mov 11, %o0 | ||
803 | mov 0, %o1 | ||
804 | call sparc_floppy_irq | ||
805 | add %sp, PTREGS_OFF, %o2 | ||
806 | |||
807 | b,pt %xcc, rtrap_irq | ||
808 | nop | ||
809 | |||
810 | #endif /* CONFIG_BLK_DEV_FD */ | ||
811 | |||
812 | /* XXX Here is stuff we still need to write... -DaveM XXX */ | 704 | /* XXX Here is stuff we still need to write... -DaveM XXX */ |
813 | .globl netbsd_syscall | 705 | .globl netbsd_syscall |
814 | netbsd_syscall: | 706 | netbsd_syscall: |