1 /* $Id: entry.S,v 1.170 2001/11/13 00:57:05 davem Exp $
2 * arch/sparc/kernel/entry.S: Sparc trap low-level entry points.
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
7 * Copyright (C) 1996-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au)
11 #include <linux/config.h>
12 #include <linux/errno.h>
18 #include <asm/contregs.h>
19 #include <asm/ptrace.h>
21 #include <asm/cprefix.h>
22 #include <asm/vaddrs.h>
23 #include <asm/memreg.h>
26 #include <asm/pgtsun4.h>
28 #include <asm/pgtsun4c.h>
30 #include <asm/winmacro.h>
31 #include <asm/signal.h>
35 #include <asm/asmmacro.h>
39 #define NR_SYSCALLS 256 /* Each OS is different... */
41 /* These are just handy. */
42 #define _SV save %sp, -STACKFRAME_SZ, %sp
45 #define FLUSH_ALL_KERNEL_WINDOWS \
46 _SV; _SV; _SV; _SV; _SV; _SV; _SV; \
47 _RS; _RS; _RS; _RS; _RS; _RS; _RS;
49 /* First, KGDB low level things. This is a rewrite
50 * of the routines found in the sparc-stub.c asm() statement
51 * from the gdb distribution. This is also dual-purpose
52 * as a software trap for userlevel programs.
63 ! This function is called when any SPARC trap (except window overflow or
64 ! underflow) occurs. It makes sure that the invalid register window is still
65 ! available before jumping into C code. It will also restore the world if you
66 ! return from handle_exception.
68 .globl C_LABEL(trap_low)
73 sethi %hi(in_trap_handler), %l4
74 ld [%lo(in_trap_handler) + %l4], %l5
76 st %l5, [%lo(in_trap_handler) + %l4]
78 /* Make sure kgdb sees the same state we just saved. */
81 ld [%sp + STACKFRAME_SZ + PT_Y], %l4
82 ld [%sp + STACKFRAME_SZ + PT_WIM], %l3
83 ld [%sp + STACKFRAME_SZ + PT_PSR], %l0
84 ld [%sp + STACKFRAME_SZ + PT_PC], %l1
85 ld [%sp + STACKFRAME_SZ + PT_NPC], %l2
86 rd %tbr, %l5 /* Never changes... */
88 /* Make kgdb exception frame. */
89 sub %sp,(16+1+6+1+72)*4,%sp ! Make room for input & locals
90 ! + hidden arg + arg spill
91 ! + doubleword alignment
92 ! + registers[72] local var
95 SAVE_KGDB_SREGS(sp, l4, l0, l3, l5, l1, l2)
97 /* We are increasing PIL, so two writes. */
104 call C_LABEL(handle_exception)
105 add %sp, STACKFRAME_SZ, %o0 ! Pass address of registers
107 /* Load new kgdb register set. */
108 LOAD_KGDB_GLOBALS(sp)
110 LOAD_KGDB_SREGS(sp, l4, l0, l3, l5, l1, l2)
113 sethi %hi(in_trap_handler), %l4
114 ld [%lo(in_trap_handler) + %l4], %l5
116 st %l5, [%lo(in_trap_handler) + %l4]
118 add %sp,(16+1+6+1+72)*4,%sp ! Undo the kgdb trap frame.
120 /* Now take what kgdb did and place it into the pt_regs
121 * frame which SparcLinux RESTORE_ALL understands.,
125 STORE_PT_YREG(sp, g2)
126 STORE_PT_PRIV(sp, l0, l1, l2)
131 #ifdef CONFIG_BLK_DEV_FD
134 .globl C_LABEL(floppy_hardint)
135 C_LABEL(floppy_hardint):
137 * This code cannot touch registers %l0 %l1 and %l2
138 * because SAVE_ALL depends on their values. It depends
139 * on %l3 also, but we regenerate it before a call.
140 * Other registers are:
141 * %l3 -- base address of fdc registers
143 * %l5 -- scratch for ld/st address
145 * %l7 -- scratch [floppy byte, ld/st address, aux. data]
148 /* Do we have work to do? */
149 sethi %hi(C_LABEL(doing_pdma)), %l7
150 ld [%l7 + %lo(C_LABEL(doing_pdma))], %l7
155 /* Load fdc register base */
156 sethi %hi(C_LABEL(fdc_status)), %l3
157 ld [%l3 + %lo(C_LABEL(fdc_status))], %l3
159 /* Setup register addresses */
160 sethi %hi(C_LABEL(pdma_vaddr)), %l5 ! transfer buffer
161 ld [%l5 + %lo(C_LABEL(pdma_vaddr))], %l4
162 sethi %hi(C_LABEL(pdma_size)), %l5 ! bytes to go
163 ld [%l5 + %lo(C_LABEL(pdma_size))], %l6
167 andcc %l7, 0x80, %g0 ! Does fifo still have data
168 bz floppy_fifo_emptied ! fifo has been emptied...
169 andcc %l7, 0x20, %g0 ! in non-dma mode still?
170 bz floppy_overrun ! nope, overrun
171 andcc %l7, 0x40, %g0 ! 0=write 1=read
175 /* Ok, actually read this byte */
186 /* Ok, actually write this byte */
193 /* fall through... */
195 sethi %hi(C_LABEL(pdma_vaddr)), %l5
196 st %l4, [%l5 + %lo(C_LABEL(pdma_vaddr))]
197 sethi %hi(C_LABEL(pdma_size)), %l5
198 st %l6, [%l5 + %lo(C_LABEL(pdma_size))]
199 /* Flip terminal count pin */
200 set C_LABEL(auxio_register), %l7
203 set C_LABEL(sparc_cpu_model), %l5
205 subcc %l5, 1, %g0 /* enum { sun4c = 1 }; */
221 /* Kill some time so the bits set */
227 /* Prevent recursion */
228 sethi %hi(C_LABEL(doing_pdma)), %l7
230 st %g0, [%l7 + %lo(C_LABEL(doing_pdma))]
232 /* We emptied the FIFO, but we haven't read everything
233 * as of yet. Store the current transfer address and
234 * bytes left to read so we can continue when the next
238 sethi %hi(C_LABEL(pdma_vaddr)), %l5
239 st %l4, [%l5 + %lo(C_LABEL(pdma_vaddr))]
240 sethi %hi(C_LABEL(pdma_size)), %l7
241 st %l6, [%l7 + %lo(C_LABEL(pdma_size))]
243 /* Restore condition codes */
251 sethi %hi(C_LABEL(pdma_vaddr)), %l5
252 st %l4, [%l5 + %lo(C_LABEL(pdma_vaddr))]
253 sethi %hi(C_LABEL(pdma_size)), %l5
254 st %l6, [%l5 + %lo(C_LABEL(pdma_size))]
255 /* Prevent recursion */
256 sethi %hi(C_LABEL(doing_pdma)), %l7
257 st %g0, [%l7 + %lo(C_LABEL(doing_pdma))]
259 /* fall through... */
264 /* Set all IRQs off. */
271 mov 11, %o0 ! floppy irq level (unused anyway)
272 mov %g0, %o1 ! devid is not used in fast interrupts
273 call C_LABEL(sparc_floppy_irq)
274 add %sp, STACKFRAME_SZ, %o2 ! struct pt_regs *regs
278 #endif /* (CONFIG_BLK_DEV_FD) */
280 /* Bad trap handler */
281 .globl bad_trap_handler
288 mov %l7, %o0 ! trap number
290 call C_LABEL(do_hw_interrupt)
295 /* For now all IRQ's not registered get sent here. handler_irq() will
296 * see if a routine is registered to handle this interrupt and if not
297 * it will say so on the console.
301 .globl real_irq_entry, patch_handler_irq
306 .globl patchme_maybe_smp_msg
309 patchme_maybe_smp_msg:
320 mov %l7, %o0 ! irq level
322 call C_LABEL(handler_irq)
323 add %sp, STACKFRAME_SZ, %o1 ! pt_regs ptr
324 or %l0, PSR_PIL, %g2 ! restore PIL after handler_irq
325 wr %g2, PSR_ET, %psr ! keep ET up
331 /* SMP per-cpu ticker interrupts are handled specially. */
333 bne real_irq_continue+4
339 call C_LABEL(smp4m_percpu_timer_interrupt)
340 add %sp, STACKFRAME_SZ, %o0
345 /* Here is where we check for possible SMP IPI passed to us
346 * on some level other than 15 which is the NMI and only used
347 * for cross calls. That has a separate entry point below.
350 GET_PROCESSOR_MID(o3, o2)
351 set C_LABEL(sun4m_interrupts), %l5
353 sethi %hi(0x60000000), %o4
362 sethi %hi(0x40000000), %o2
363 sethi %hi(0x20000000), %o2
377 call C_LABEL(smp_reschedule_irq)
380 call C_LABEL(smp_stop_cpu_irq)
385 .globl linux_trap_ipi15_sun4m
386 linux_trap_ipi15_sun4m:
388 sethi %hi(0x80000000), %o2
389 GET_PROCESSOR_MID(o0, o1)
390 set C_LABEL(sun4m_interrupts), %l5
396 be 1f ! Must be an NMI async memory error
406 call C_LABEL(smp4m_cross_call_irq)
408 b ret_trap_lockless_ipi
411 /* NMI async memory error handling. */
412 sethi %hi(0x80000000), %l4
413 sethi %hi(0x4000), %o3
425 call C_LABEL(sun4m_nmi)
434 /* SMP per-cpu ticker interrupts are handled specially. */
438 sethi %hi(CC_ICLR), %o0
439 sethi %hi(1 << 14), %o1
440 or %o0, %lo(CC_ICLR), %o0
441 stha %o1, [%o0] ASI_M_MXCC /* Clear PIL 14 in MXCC's ICLR */
446 call C_LABEL(smp4d_percpu_timer_interrupt)
447 add %sp, STACKFRAME_SZ, %o0
453 .globl linux_trap_ipi15_sun4d
454 linux_trap_ipi15_sun4d:
456 sethi %hi(CC_BASE), %o4
457 sethi %hi(MXCC_ERR_ME|MXCC_ERR_PEW|MXCC_ERR_ASE|MXCC_ERR_PEE), %o2
458 or %o4, (CC_EREG - CC_BASE), %o0
459 ldda [%o0] ASI_M_MXCC, %o0
462 sethi %hi(BB_STAT2), %o2
463 lduba [%o2] ASI_M_CTL, %o2
464 andcc %o2, BB_STAT2_MASK, %g0
466 or %o4, (CC_ICLR - CC_BASE), %o0
467 sethi %hi(1 << 15), %o1
468 stha %o1, [%o0] ASI_M_MXCC /* Clear PIL 15 in MXCC's ICLR */
474 call C_LABEL(smp4d_cross_call_irq)
476 b ret_trap_lockless_ipi
483 lduha [%l4] ASI_M_MXCC, %l5
484 sethi %hi(1 << 15), %l7
486 stha %l5, [%l4] ASI_M_MXCC
490 #endif /* CONFIG_SMP */
492 /* This routine handles illegal instructions and privileged
493 * instruction attempts from user code.
496 .globl bad_instruction
498 sethi %hi(0xc1f80000), %l4
500 sethi %hi(0x81d80000), %l7
506 wr %l0, PSR_ET, %psr ! re-enable traps
509 add %sp, STACKFRAME_SZ, %o0
512 call C_LABEL(do_illegal_instruction)
517 1: /* unimplemented flush - just skip */
522 .globl priv_instruction
529 add %sp, STACKFRAME_SZ, %o0
532 call C_LABEL(do_priv_instruction)
537 /* This routine handles unaligned data accesses. */
541 andcc %l0, PSR_PS, %g0
551 call C_LABEL(kernel_unaligned_trap)
552 add %sp, STACKFRAME_SZ, %o0
559 wr %l0, PSR_ET, %psr ! re-enable traps
563 call C_LABEL(user_unaligned_trap)
564 add %sp, STACKFRAME_SZ, %o0
568 /* This routine handles floating point disabled traps. */
570 .globl fpd_trap_handler
574 wr %l0, PSR_ET, %psr ! re-enable traps
577 add %sp, STACKFRAME_SZ, %o0
580 call C_LABEL(do_fpd_trap)
585 /* This routine handles Floating Point Exceptions. */
587 .globl fpe_trap_handler
589 set fpsave_magic, %l5
592 sethi %hi(C_LABEL(fpsave)), %l5
593 or %l5, %lo(C_LABEL(fpsave)), %l5
596 sethi %hi(fpsave_catch2), %l5
597 or %l5, %lo(fpsave_catch2), %l5
603 sethi %hi(fpsave_catch), %l5
604 or %l5, %lo(fpsave_catch), %l5
613 wr %l0, PSR_ET, %psr ! re-enable traps
616 add %sp, STACKFRAME_SZ, %o0
619 call C_LABEL(do_fpe_trap)
624 /* This routine handles Tag Overflow Exceptions. */
626 .globl do_tag_overflow
630 wr %l0, PSR_ET, %psr ! re-enable traps
633 add %sp, STACKFRAME_SZ, %o0
636 call C_LABEL(handle_tag_overflow)
641 /* This routine handles Watchpoint Exceptions. */
647 wr %l0, PSR_ET, %psr ! re-enable traps
650 add %sp, STACKFRAME_SZ, %o0
653 call C_LABEL(handle_watchpoint)
658 /* This routine handles Register Access Exceptions. */
664 wr %l0, PSR_ET, %psr ! re-enable traps
667 add %sp, STACKFRAME_SZ, %o0
670 call C_LABEL(handle_reg_access)
675 /* This routine handles Co-Processor Disabled Exceptions. */
677 .globl do_cp_disabled
681 wr %l0, PSR_ET, %psr ! re-enable traps
684 add %sp, STACKFRAME_SZ, %o0
687 call C_LABEL(handle_cp_disabled)
692 /* This routine handles Co-Processor Exceptions. */
694 .globl do_cp_exception
698 wr %l0, PSR_ET, %psr ! re-enable traps
701 add %sp, STACKFRAME_SZ, %o0
704 call C_LABEL(handle_cp_exception)
709 /* This routine handles Hardware Divide By Zero Exceptions. */
715 wr %l0, PSR_ET, %psr ! re-enable traps
718 add %sp, STACKFRAME_SZ, %o0
721 call C_LABEL(handle_hw_divzero)
727 .globl do_flush_windows
734 andcc %l0, PSR_PS, %g0
738 call C_LABEL(flush_user_windows)
741 /* Advance over the trap instruction. */
742 ld [%sp + STACKFRAME_SZ + PT_NPC], %l1
744 st %l1, [%sp + STACKFRAME_SZ + PT_PC]
745 st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
749 .globl flush_patch_one
751 /* We get these for debugging routines using __builtin_return_address() */
754 FLUSH_ALL_KERNEL_WINDOWS
756 /* Advance over the trap instruction. */
757 ld [%sp + STACKFRAME_SZ + PT_NPC], %l1
759 st %l1, [%sp + STACKFRAME_SZ + PT_PC]
760 st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
764 /* The getcc software trap. The user wants the condition codes from
765 * the %psr in register %g1.
769 .globl getcc_trap_handler
771 srl %l0, 20, %g1 ! give user
772 and %g1, 0xf, %g1 ! only ICC bits in %psr
773 jmp %l2 ! advance over trap instruction
774 rett %l2 + 0x4 ! like this...
776 /* The setcc software trap. The user has condition codes in %g1
777 * that it would like placed in the %psr. Be careful not to flip
778 * any unintentional bits!
782 .globl setcc_trap_handler
786 andn %l0, %l5, %l0 ! clear ICC bits in %psr
787 and %l4, %l5, %l4 ! clear non-ICC bits in user value
788 or %l4, %l0, %l4 ! or them in... mix mix mix
790 wr %l4, 0x0, %psr ! set new %psr
791 WRITE_PAUSE ! TI scumbags...
793 jmp %l2 ! advance over trap instruction
794 rett %l2 + 0x4 ! like this...
797 .globl linux_trap_nmi_sun4c
798 linux_trap_nmi_sun4c:
801 /* Ugh, we need to clear the IRQ line. This is now
802 * a very sun4c specific trap handler...
804 sethi %hi(C_LABEL(interrupt_enable)), %l5
805 ld [%l5 + %lo(C_LABEL(interrupt_enable))], %l5
807 andn %l6, INTS_ENAB, %l6
810 /* Now it is safe to re-enable traps without recursion. */
815 /* Now call the c-code with the pt_regs frame ptr and the
816 * memory error registers as arguments. The ordering chosen
817 * here is due to unlatching semantics.
819 sethi %hi(AC_SYNC_ERR), %o0
821 lda [%o0] ASI_CONTROL, %o2 ! sync vaddr
823 lda [%o0] ASI_CONTROL, %o1 ! sync error
825 lda [%o0] ASI_CONTROL, %o4 ! async vaddr
827 lda [%o0] ASI_CONTROL, %o3 ! async error
828 call C_LABEL(sparc_lvl15_nmi)
829 add %sp, STACKFRAME_SZ, %o0
834 .globl C_LABEL(invalid_segment_patch1_ff)
835 .globl C_LABEL(invalid_segment_patch2_ff)
836 C_LABEL(invalid_segment_patch1_ff): cmp %l4, 0xff
837 C_LABEL(invalid_segment_patch2_ff): mov 0xff, %l3
840 .globl C_LABEL(invalid_segment_patch1_1ff)
841 .globl C_LABEL(invalid_segment_patch2_1ff)
842 C_LABEL(invalid_segment_patch1_1ff): cmp %l4, 0x1ff
843 C_LABEL(invalid_segment_patch2_1ff): mov 0x1ff, %l3
846 .globl C_LABEL(num_context_patch1_16), C_LABEL(num_context_patch2_16)
847 C_LABEL(num_context_patch1_16): mov 0x10, %l7
848 C_LABEL(num_context_patch2_16): mov 0x10, %l7
851 .globl C_LABEL(vac_linesize_patch_32)
852 C_LABEL(vac_linesize_patch_32): subcc %l7, 32, %l7
855 .globl C_LABEL(vac_hwflush_patch1_on), C_LABEL(vac_hwflush_patch2_on)
858 * Ugly, but we cant use hardware flushing on the sun4 and we'd require
859 * two instructions (Anton)
862 C_LABEL(vac_hwflush_patch1_on): nop
864 C_LABEL(vac_hwflush_patch1_on): addcc %l7, -PAGE_SIZE, %l7
867 C_LABEL(vac_hwflush_patch2_on): sta %g0, [%l3 + %l7] ASI_HWFLUSHSEG
869 .globl C_LABEL(invalid_segment_patch1), C_LABEL(invalid_segment_patch2)
870 .globl C_LABEL(num_context_patch1), C_LABEL(num_context_patch2)
871 .globl C_LABEL(vac_linesize_patch), C_LABEL(vac_hwflush_patch1)
872 .globl C_LABEL(vac_hwflush_patch2)
881 ! %l7 = 1 for textfault
882 ! We want error in %l5, vaddr in %l6
885 sethi %hi(C_LABEL(sun4c_memerr_reg)), %l4
886 ld [%l4+%lo(C_LABEL(sun4c_memerr_reg))], %l4 ! memerr ctrl reg addr
887 ld [%l4], %l6 ! memerr ctrl reg
888 ld [%l4 + 4], %l5 ! memerr vaddr reg
889 andcc %l6, 0x80, %g0 ! check for error type
890 st %g0, [%l4 + 4] ! clear the error
892 sethi %hi(AC_BUS_ERROR), %l4 ! bus err reg addr
894 call C_LABEL(prom_halt) ! something weird happened
895 ! what exactly did happen?
896 ! what should we do here?
898 0: or %l4, %lo(AC_BUS_ERROR), %l4 ! bus err reg addr
899 lduba [%l4] ASI_CONTROL, %l6 ! bus err reg
901 cmp %l7, 1 ! text fault?
905 ld [%l1], %l4 ! load instruction that caused fault
907 andcc %l4, 1, %g0 ! store instruction?
910 sethi %hi(SUN4C_SYNC_BADWRITE), %l4 ! yep
911 ! %lo(SUN4C_SYNC_BADWRITE) = 0
912 or %l4, %l6, %l6 ! set write bit to emulate sun4c
915 sethi %hi(AC_SYNC_ERR), %l4
916 add %l4, 0x4, %l6 ! AC_SYNC_VA in %l6
917 lda [%l6] ASI_CONTROL, %l5 ! Address
918 lda [%l4] ASI_CONTROL, %l6 ! Error, retained for a bit
921 andn %l5, 0xfff, %l5 ! Encode all info into l7
927 or %l4, %l7, %l7 ! l7 = [addr,write,txtfault]
929 andcc %l0, PSR_PS, %g0
930 be sun4c_fault_fromuser
931 andcc %l7, 1, %g0 ! Text fault?
934 sethi %hi(KERNBASE), %l4
940 blu sun4c_fault_fromuser
941 sethi %hi(~((1 << SUN4C_REAL_PGDIR_SHIFT) - 1)), %l4
943 /* If the kernel references a bum kernel pointer, or a pte which
944 * points to a non existant page in ram, we will run this code
945 * _forever_ and lock up the machine!!!!! So we must check for
946 * this condition, the AC_SYNC_ERR bits are what we must examine.
947 * Also a parity error would make this happen as well. So we just
948 * check that we are in fact servicing a tlb miss and not some
949 * other type of fault for the kernel.
952 be sun4c_fault_fromuser
955 /* Test for NULL pte_t * in vmalloc area. */
956 sethi %hi(VMALLOC_START), %l4
958 blu,a C_LABEL(invalid_segment_patch1)
959 lduXa [%l5] ASI_SEGMAP, %l4
961 sethi %hi(C_LABEL(swapper_pg_dir)), %l4
962 srl %l5, SUN4C_PGDIR_SHIFT, %l6
963 or %l4, %lo(C_LABEL(swapper_pg_dir)), %l4
967 sethi %hi(PAGE_MASK), %l6
970 andcc %l4, PAGE_MASK, %g0
972 be sun4c_fault_fromuser
973 lduXa [%l5] ASI_SEGMAP, %l4
975 C_LABEL(invalid_segment_patch1):
978 sethi %hi(C_LABEL(sun4c_kfree_ring)), %l4
979 or %l4, %lo(C_LABEL(sun4c_kfree_ring)), %l4
981 deccc %l3 ! do we have a free entry?
982 bcs,a 2f ! no, unmap one.
983 sethi %hi(C_LABEL(sun4c_kernel_ring)), %l4
985 st %l3, [%l4 + 0x18] ! sun4c_kfree_ring.num_entries--
987 ld [%l4 + 0x00], %l6 ! entry = sun4c_kfree_ring.ringhd.next
988 st %l5, [%l6 + 0x08] ! entry->vaddr = address
990 ld [%l6 + 0x00], %l3 ! next = entry->next
991 ld [%l6 + 0x04], %l7 ! entry->prev
993 st %l7, [%l3 + 0x04] ! next->prev = entry->prev
994 st %l3, [%l7 + 0x00] ! entry->prev->next = next
996 sethi %hi(C_LABEL(sun4c_kernel_ring)), %l4
997 or %l4, %lo(C_LABEL(sun4c_kernel_ring)), %l4
998 ! head = &sun4c_kernel_ring.ringhd
1000 ld [%l4 + 0x00], %l7 ! head->next
1002 st %l4, [%l6 + 0x04] ! entry->prev = head
1003 st %l7, [%l6 + 0x00] ! entry->next = head->next
1004 st %l6, [%l7 + 0x04] ! head->next->prev = entry
1006 st %l6, [%l4 + 0x00] ! head->next = entry
1008 ld [%l4 + 0x18], %l3
1009 inc %l3 ! sun4c_kernel_ring.num_entries++
1010 st %l3, [%l4 + 0x18]
1012 ld [%l6 + 0x08], %l5
1015 or %l4, %lo(C_LABEL(sun4c_kernel_ring)), %l4
1016 ! head = &sun4c_kernel_ring.ringhd
1018 ld [%l4 + 0x04], %l6 ! entry = head->prev
1020 ld [%l6 + 0x08], %l3 ! tmp = entry->vaddr
1022 ! Flush segment from the cache.
1024 sethi %hi((128 * 1024)), %l7
1026 sethi %hi((64 * 1024)), %l7
1029 C_LABEL(vac_hwflush_patch1):
1030 C_LABEL(vac_linesize_patch):
1033 C_LABEL(vac_hwflush_patch2):
1034 sta %g0, [%l3 + %l7] ASI_FLUSHSEG
1036 st %l5, [%l6 + 0x08] ! entry->vaddr = address
1038 ld [%l6 + 0x00], %l5 ! next = entry->next
1039 ld [%l6 + 0x04], %l7 ! entry->prev
1041 st %l7, [%l5 + 0x04] ! next->prev = entry->prev
1042 st %l5, [%l7 + 0x00] ! entry->prev->next = next
1043 st %l4, [%l6 + 0x04] ! entry->prev = head
1045 ld [%l4 + 0x00], %l7 ! head->next
1047 st %l7, [%l6 + 0x00] ! entry->next = head->next
1048 st %l6, [%l7 + 0x04] ! head->next->prev = entry
1049 st %l6, [%l4 + 0x00] ! head->next = entry
1051 mov %l3, %l5 ! address = tmp
1054 C_LABEL(num_context_patch1):
1057 ld [%l6 + 0x08], %l4
1058 ldub [%l6 + 0x0c], %l3
1059 or %l4, %l3, %l4 ! encode new vaddr/pseg into l4
1061 sethi %hi(AC_CONTEXT), %l3
1062 lduba [%l3] ASI_CONTROL, %l6
1064 /* Invalidate old mapping, instantiate new mapping,
1065 * for each context. Registers l6/l7 are live across
1069 sethi %hi(AC_CONTEXT), %l3
1070 stba %l7, [%l3] ASI_CONTROL
1071 C_LABEL(invalid_segment_patch2):
1073 stXa %l3, [%l5] ASI_SEGMAP
1074 andn %l4, 0x1ff, %l3
1076 stXa %l4, [%l3] ASI_SEGMAP
1078 sethi %hi(AC_CONTEXT), %l3
1079 stba %l6, [%l3] ASI_CONTROL
1081 andn %l4, 0x1ff, %l5
1084 sethi %hi(VMALLOC_START), %l4
1088 mov 1 << (SUN4C_REAL_PGDIR_SHIFT - PAGE_SHIFT), %l7
1090 sethi %hi(KERNBASE), %l6
1093 srl %l4, PAGE_SHIFT, %l4
1094 sethi %hi((SUN4C_PAGE_KERNEL & 0xf4000000)), %l3
1097 sethi %hi(PAGE_SIZE), %l4
1100 sta %l3, [%l5] ASI_PTE
1107 sethi %hi(C_LABEL(sun4c_kernel_faults)), %l4
1110 srl %l5, SUN4C_PGDIR_SHIFT, %l3
1111 sethi %hi(C_LABEL(swapper_pg_dir)), %l4
1112 or %l4, %lo(C_LABEL(swapper_pg_dir)), %l4
1116 and %l4, PAGE_MASK, %l4
1118 sethi %hi(PAGE_MASK), %l6
1122 srl %l5, (PAGE_SHIFT - 2), %l6
1123 and %l6, ((SUN4C_PTRS_PER_PTE - 1) << 2), %l6
1126 sethi %hi(PAGE_SIZE), %l4
1131 sta %l3, [%l5] ASI_PTE
1136 sethi %hi(C_LABEL(sun4c_kernel_faults)), %l4
1138 ld [%l4 + %lo(C_LABEL(sun4c_kernel_faults))], %l3
1140 st %l3, [%l4 + %lo(C_LABEL(sun4c_kernel_faults))]
1142 /* Restore condition codes */
1148 sun4c_fault_fromuser:
1152 mov %l7, %o1 ! Decode the info from %l7
1154 and %o1, 1, %o1 ! arg2 = text_faultp
1156 and %o2, 2, %o2 ! arg3 = writep
1157 andn %o3, 0xfff, %o3 ! arg4 = faulting address
1159 wr %l0, PSR_ET, %psr
1162 call C_LABEL(do_sun4c_fault)
1163 add %sp, STACKFRAME_SZ, %o0 ! arg1 = pt_regs ptr
1168 .globl C_LABEL(srmmu_fault)
1169 C_LABEL(srmmu_fault):
1173 lda [%l5] ASI_M_MMUREGS, %l6 ! read sfar first
1174 lda [%l4] ASI_M_MMUREGS, %l5 ! read sfsr last
1176 andn %l6, 0xfff, %l6
1177 srl %l5, 6, %l5 ! and encode all info into l7
1182 or %l6, %l7, %l7 ! l7 = [addr,write,txtfault]
1188 and %o1, 1, %o1 ! arg2 = text_faultp
1190 and %o2, 2, %o2 ! arg3 = writep
1191 andn %o3, 0xfff, %o3 ! arg4 = faulting address
1193 wr %l0, PSR_ET, %psr
1196 call C_LABEL(do_sparc_fault)
1197 add %sp, STACKFRAME_SZ, %o0 ! arg1 = pt_regs ptr
1201 #ifdef CONFIG_SUNOS_EMUL
1202 /* SunOS uses syscall zero as the 'indirect syscall' it looks
1203 * like indir_syscall(scall_num, arg0, arg1, arg2...); etc.
1204 * This is complete brain damage.
1206 .globl C_LABEL(sunos_indir)
1207 C_LABEL(sunos_indir):
1209 cmp %o0, NR_SYSCALLS
1213 sethi %hi(C_LABEL(sunos_nosys)), %l6
1215 or %l6, %lo(C_LABEL(sunos_nosys)), %l6
1218 set C_LABEL(sunos_sys_table), %l7
1232 .globl C_LABEL(sys_nis_syscall)
1233 C_LABEL(sys_nis_syscall):
1235 add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg
1236 call C_LABEL(c_sys_nis_syscall)
1240 .globl C_LABEL(sys_ptrace)
1241 C_LABEL(sys_ptrace):
1242 call C_LABEL(do_ptrace)
1243 add %sp, STACKFRAME_SZ, %o0
1245 ld [%curptr + AOFF_task_ptrace], %l5
1246 andcc %l5, 0x02, %g0
1250 call C_LABEL(syscall_trace)
1257 .globl C_LABEL(sys_execve)
1258 C_LABEL(sys_execve):
1260 add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg
1261 call C_LABEL(sparc_execve)
1265 .globl C_LABEL(sys_pipe)
1268 add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg
1269 call C_LABEL(sparc_pipe)
1273 .globl C_LABEL(sys_sigaltstack)
1274 C_LABEL(sys_sigaltstack):
1277 call C_LABEL(do_sigaltstack)
1281 .globl C_LABEL(sys_sigstack)
1282 C_LABEL(sys_sigstack):
1285 call C_LABEL(do_sys_sigstack)
1289 .globl C_LABEL(sys_sigpause)
1290 C_LABEL(sys_sigpause):
1291 /* Note: %o0 already has correct value... */
1292 call C_LABEL(do_sigpause)
1293 add %sp, STACKFRAME_SZ, %o1
1295 ld [%curptr + AOFF_task_ptrace], %l5
1296 andcc %l5, 0x02, %g0
1300 call C_LABEL(syscall_trace)
1304 /* We are returning to a signal handler. */
1308 .globl C_LABEL(sys_sigsuspend)
1309 C_LABEL(sys_sigsuspend):
1310 call C_LABEL(do_sigsuspend)
1311 add %sp, STACKFRAME_SZ, %o0
1313 ld [%curptr + AOFF_task_ptrace], %l5
1314 andcc %l5, 0x02, %g0
1318 call C_LABEL(syscall_trace)
1322 /* We are returning to a signal handler. */
1326 .globl C_LABEL(sys_rt_sigsuspend)
1327 C_LABEL(sys_rt_sigsuspend):
1328 /* Note: %o0, %o1 already have correct value... */
1329 call C_LABEL(do_rt_sigsuspend)
1330 add %sp, STACKFRAME_SZ, %o2
1332 ld [%curptr + AOFF_task_ptrace], %l5
1333 andcc %l5, 0x02, %g0
1337 call C_LABEL(syscall_trace)
1341 /* We are returning to a signal handler. */
1345 .globl C_LABEL(sys_sigreturn)
1346 C_LABEL(sys_sigreturn):
1347 call C_LABEL(do_sigreturn)
1348 add %sp, STACKFRAME_SZ, %o0
1350 ld [%curptr + AOFF_task_ptrace], %l5
1351 andcc %l5, 0x02, %g0
1355 call C_LABEL(syscall_trace)
1359 /* We don't want to muck with user registers like a
1360 * normal syscall, just return.
1365 .globl C_LABEL(sys_rt_sigreturn)
1366 C_LABEL(sys_rt_sigreturn):
1367 call C_LABEL(do_rt_sigreturn)
1368 add %sp, STACKFRAME_SZ, %o0
1370 ld [%curptr + AOFF_task_ptrace], %l5
1371 andcc %l5, 0x02, %g0
1375 call C_LABEL(syscall_trace)
1379 /* We are returning to a signal handler. */
1382 /* Now that we have a real sys_clone, sys_fork() is
1383 * implemented in terms of it. Our _real_ implementation
1384 * of SunOS vfork() will use sys_vfork().
1386 * XXX These three should be consolidated into mostly shared
1387 * XXX code just like on sparc64... -DaveM
1390 .globl C_LABEL(sys_fork), flush_patch_two
1394 FLUSH_ALL_KERNEL_WINDOWS;
1397 mov SIGCHLD, %o0 ! arg0: clone flags
1400 mov %fp, %o1 ! arg1: usp
1401 std %g4, [%curptr + AOFF_task_thread + AOFF_thread_fork_kpsr]
1402 add %sp, STACKFRAME_SZ, %o2 ! arg2: pt_regs ptr
1404 call C_LABEL(do_fork)
1407 /* Whee, kernel threads! */
1408 .globl C_LABEL(sys_clone), flush_patch_three
1412 FLUSH_ALL_KERNEL_WINDOWS;
1416 /* arg0,1: flags,usp -- loaded already */
1417 cmp %o1, 0x0 ! Is new_usp NULL?
1421 mov %fp, %o1 ! yes, use callers usp
1422 andn %o1, 7, %o1 ! no, align to 8 bytes
1424 std %g4, [%curptr + AOFF_task_thread + AOFF_thread_fork_kpsr]
1425 add %sp, STACKFRAME_SZ, %o2 ! arg2: pt_regs ptr
1427 call C_LABEL(do_fork)
1430 /* Whee, real vfork! */
1431 .globl C_LABEL(sys_vfork), flush_patch_four
1434 FLUSH_ALL_KERNEL_WINDOWS;
1439 std %g4, [%curptr + AOFF_task_thread + AOFF_thread_fork_kpsr]
1440 sethi %hi(0x4000 | 0x0100 | SIGCHLD), %o0
1442 or %o0, %lo(0x4000 | 0x0100 | SIGCHLD), %o0
1443 sethi %hi(C_LABEL(do_fork)), %l1
1445 jmpl %l1 + %lo(C_LABEL(do_fork)), %g0
1446 add %sp, STACKFRAME_SZ, %o2
1449 linux_sparc_ni_syscall:
1450 sethi %hi(C_LABEL(sys_ni_syscall)), %l7
1451 b syscall_is_too_hard
1452 or %l7, %lo(C_LABEL(sys_ni_syscall)), %l7
1462 linux_syscall_trace:
1463 call C_LABEL(syscall_trace)
1472 .globl C_LABEL(ret_from_fork)
1473 C_LABEL(ret_from_fork):
1476 b C_LABEL(ret_sys_call)
1477 ld [%sp + STACKFRAME_SZ + PT_I0], %o0
1479 /* Linux native and SunOS system calls enter here... */
1481 .globl linux_sparc_syscall
1482 linux_sparc_syscall:
1483 /* Direct access to user regs, must faster. */
1484 cmp %g1, NR_SYSCALLS
1485 bgeu linux_sparc_ni_syscall
1489 bne linux_fast_syscall
1490 /* Just do first insn from SAVE_ALL in the delay slot */
1492 .globl syscall_is_too_hard
1493 syscall_is_too_hard:
1497 wr %l0, PSR_ET, %psr
1502 ld [%curptr + AOFF_task_ptrace], %l5
1504 andcc %l5, 0x02, %g0
1506 bne linux_syscall_trace
1512 st %o0, [%sp + STACKFRAME_SZ + PT_I0]
1514 .globl C_LABEL(ret_sys_call)
1515 C_LABEL(ret_sys_call):
1516 ld [%curptr + AOFF_task_ptrace], %l6
1517 cmp %o0, -ENOIOCTLCMD
1518 ld [%sp + STACKFRAME_SZ + PT_PSR], %g3
1521 andcc %l6, 0x02, %l6
1523 /* System call success, clear Carry condition code. */
1526 st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
1527 bne linux_syscall_trace2
1528 ld [%sp + STACKFRAME_SZ + PT_NPC], %l1 /* pc = npc */
1529 add %l1, 0x4, %l2 /* npc = npc+4 */
1530 st %l1, [%sp + STACKFRAME_SZ + PT_PC]
1532 st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
1534 /* System call failure, set Carry condition code.
1535 * Also, get abs(errno) to return to the process.
1539 st %o0, [%sp + STACKFRAME_SZ + PT_I0]
1541 st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
1542 bne linux_syscall_trace2
1543 ld [%sp + STACKFRAME_SZ + PT_NPC], %l1 /* pc = npc */
1544 add %l1, 0x4, %l2 /* npc = npc+4 */
1545 st %l1, [%sp + STACKFRAME_SZ + PT_PC]
1547 st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
1549 linux_syscall_trace2:
1550 call C_LABEL(syscall_trace)
1551 add %l1, 0x4, %l2 /* npc = npc+4 */
1552 st %l1, [%sp + STACKFRAME_SZ + PT_PC]
1554 st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
1558 * Solaris system calls and indirect system calls enter here.
1560 * I have named the solaris indirect syscalls like that because
1561 * it seems like Solaris has some fast path syscalls that can
1562 * be handled as indirect system calls. - mig
1565 linux_syscall_for_solaris:
1566 sethi %hi(sys_call_table), %l7
1567 b linux_sparc_syscall
1568 or %l7, %lo(sys_call_table), %l7
1571 .globl solaris_syscall
1574 be linux_syscall_for_solaris
1576 be linux_syscall_for_solaris
1578 be linux_syscall_for_solaris
1580 be,a linux_syscall_for_solaris
1586 wr %l0, PSR_ET, %psr
1591 call C_LABEL(do_solaris_syscall)
1592 add %sp, STACKFRAME_SZ, %o0
1594 st %o0, [%sp + STACKFRAME_SZ + PT_I0]
1596 cmp %o0, -ENOIOCTLCMD
1598 ld [%sp + STACKFRAME_SZ + PT_PSR], %g3
1600 /* System call success, clear Carry condition code. */
1604 st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
1607 /* System call failure, set Carry condition code.
1608 * Also, get abs(errno) to return to the process.
1612 st %o0, [%sp + STACKFRAME_SZ + PT_I0]
1614 st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
1616 /* Advance the pc and npc over the trap instruction.
1617 * If the npc is unaligned (has a 1 in the lower byte), it means
1618 * the kernel does not want us to play magic (ie, skipping over
1619 * traps). Mainly when the Solaris code wants to set some PC and
1623 ld [%sp + STACKFRAME_SZ + PT_NPC], %l1 /* pc = npc */
1626 add %l1, 0x4, %l2 /* npc = npc+4 */
1627 st %l1, [%sp + STACKFRAME_SZ + PT_PC]
1629 st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
1631 /* kernel knows what it is doing, fixup npc and continue */
1635 st %l1, [%sp + STACKFRAME_SZ + PT_NPC]
1637 #ifndef CONFIG_SUNOS_EMUL
1639 .globl sunos_syscall
1643 wr %l0, PSR_ET, %psr
1647 call C_LABEL(do_sunos_syscall)
1648 add %sp, STACKFRAME_SZ, %o0
1651 /* {net, open}bsd system calls enter here... */
1655 /* Direct access to user regs, must faster. */
1656 cmp %g1, NR_SYSCALLS
1660 set C_LABEL(sys_ni_syscall), %l7
1667 .globl bsd_is_too_hard
1672 wr %l0, PSR_ET, %psr
1685 st %o0, [%sp + STACKFRAME_SZ + PT_I0]
1687 cmp %o0, -ENOIOCTLCMD
1689 ld [%sp + STACKFRAME_SZ + PT_PSR], %g3
1691 /* System call success, clear Carry condition code. */
1695 st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
1698 /* System call failure, set Carry condition code.
1699 * Also, get abs(errno) to return to the process.
1702 #if 0 /* XXX todo XXX */
1703 sethi %hi(C_LABEL(bsd_xlatb_rorl), %o3
1704 or %o3, %lo(C_LABEL(bsd_xlatb_rorl)), %o3
1709 st %o0, [%sp + STACKFRAME_SZ + PT_I0]
1711 st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
1713 /* Advance the pc and npc over the trap instruction. */
1715 ld [%sp + STACKFRAME_SZ + PT_NPC], %l1 /* pc = npc */
1716 add %l1, 0x4, %l2 /* npc = npc+4 */
1717 st %l1, [%sp + STACKFRAME_SZ + PT_PC]
1719 st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
1721 /* Saving and restoring the FPU state is best done from lowlevel code.
1723 * void fpsave(unsigned long *fpregs, unsigned long *fsr,
1724 * void *fpqueue, unsigned long *fpqdepth)
1727 .globl C_LABEL(fpsave)
1729 st %fsr, [%o1] ! this can trap on us if fpu is in bogon state
1736 /* We have an fpqueue to save. */
1750 std %f0, [%o0 + 0x00]
1751 std %f2, [%o0 + 0x08]
1752 std %f4, [%o0 + 0x10]
1753 std %f6, [%o0 + 0x18]
1754 std %f8, [%o0 + 0x20]
1755 std %f10, [%o0 + 0x28]
1756 std %f12, [%o0 + 0x30]
1757 std %f14, [%o0 + 0x38]
1758 std %f16, [%o0 + 0x40]
1759 std %f18, [%o0 + 0x48]
1760 std %f20, [%o0 + 0x50]
1761 std %f22, [%o0 + 0x58]
1762 std %f24, [%o0 + 0x60]
1763 std %f26, [%o0 + 0x68]
1764 std %f28, [%o0 + 0x70]
1766 std %f30, [%o0 + 0x78]
1768 /* Thanks for Theo Deraadt and the authors of the Sprite/netbsd/openbsd
1769 * code for pointing out this possible deadlock, while we save state
1770 * above we could trap on the fsr store so our low level fpu trap
1771 * code has to know how to deal with this.
1778 b C_LABEL(fpsave) + 4
1781 /* void fpload(unsigned long *fpregs, unsigned long *fsr); */
1783 .globl C_LABEL(fpload)
1785 ldd [%o0 + 0x00], %f0
1786 ldd [%o0 + 0x08], %f2
1787 ldd [%o0 + 0x10], %f4
1788 ldd [%o0 + 0x18], %f6
1789 ldd [%o0 + 0x20], %f8
1790 ldd [%o0 + 0x28], %f10
1791 ldd [%o0 + 0x30], %f12
1792 ldd [%o0 + 0x38], %f14
1793 ldd [%o0 + 0x40], %f16
1794 ldd [%o0 + 0x48], %f18
1795 ldd [%o0 + 0x50], %f20
1796 ldd [%o0 + 0x58], %f22
1797 ldd [%o0 + 0x60], %f24
1798 ldd [%o0 + 0x68], %f26
1799 ldd [%o0 + 0x70], %f28
1800 ldd [%o0 + 0x78], %f30
1805 .globl C_LABEL(ndelay)
1807 save %sp, -STACKFRAME_SZ, %sp
1814 .globl C_LABEL(udelay)
1816 save %sp, -STACKFRAME_SZ, %sp
1818 sethi %hi(0x10c6), %o1
1820 or %o1, %lo(0x10c6), %o1
1823 sethi %hi(C_LABEL(loops_per_jiffy)), %o3
1825 ld [%o3 + %lo(C_LABEL(loops_per_jiffy))], %o1
1827 GET_PROCESSOR_OFFSET(o4, o2)
1828 set C_LABEL(cpu_data), %o3
1843 /* Handle a software breakpoint */
1844 /* We have to inform parent that child has stopped */
1846 .globl breakpoint_trap
1850 wr %l0, PSR_ET, %psr
1853 st %i0, [%sp + STACKFRAME_SZ + PT_G0] ! for restarting syscalls
1854 call C_LABEL(sparc_breakpoint)
1855 add %sp, STACKFRAME_SZ, %o0
1860 .globl C_LABEL(__handle_exception), flush_patch_exception
1861 C_LABEL(__handle_exception):
1862 flush_patch_exception:
1863 FLUSH_ALL_KERNEL_WINDOWS;
1865 jmpl %o7 + 0xc, %g0 ! see asm-sparc/processor.h
1866 mov 1, %g1 ! signal EFAULT condition
1869 .globl C_LABEL(kill_user_windows), kuw_patch1_7win
1871 kuw_patch1_7win: sll %o3, 6, %o3
1873 /* No matter how much overhead this routine has in the worst
1874 * case scenerio, it is several times better than taking the
1875 * traps with the old method of just doing flush_user_windows().
1877 C_LABEL(kill_user_windows):
1878 ld [%g6 + AOFF_task_thread + AOFF_thread_uwinmask], %o0 ! get current umask
1879 orcc %g0, %o0, %g0 ! if no bits set, we are done
1880 be 3f ! nothing to do
1881 rd %psr, %o5 ! must clear interrupts
1882 or %o5, PSR_PIL, %o4 ! or else that could change
1883 wr %o4, 0x0, %psr ! the uwinmask state
1884 WRITE_PAUSE ! burn them cycles
1886 ld [%g6 + AOFF_task_thread + AOFF_thread_uwinmask], %o0 ! get consistant state
1887 orcc %g0, %o0, %g0 ! did an interrupt come in?
1888 be 4f ! yep, we are done
1889 rd %wim, %o3 ! get current wim
1890 srl %o3, 1, %o4 ! simulate a save
1892 sll %o3, 7, %o3 ! compute next wim
1893 or %o4, %o3, %o3 ! result
1894 andncc %o0, %o3, %o0 ! clean this bit in umask
1895 bne kuw_patch1 ! not done yet
1896 srl %o3, 1, %o4 ! begin another save simulation
1897 wr %o3, 0x0, %wim ! set the new wim
1898 st %g0, [%g6 + AOFF_task_thread + AOFF_thread_uwinmask] ! clear uwinmask
1900 wr %o5, 0x0, %psr ! re-enable interrupts
1901 WRITE_PAUSE ! burn baby burn
1904 st %g0, [%g6 + AOFF_task_thread + AOFF_thread_w_saved] ! no windows saved
1907 .globl C_LABEL(restore_current)
1908 C_LABEL(restore_current):
1909 LOAD_CURRENT(g6, o0)
1914 #include <asm/pcic.h>
1917 .globl linux_trap_ipi15_pcic
1918 linux_trap_ipi15_pcic:
1923 * First deactivate NMI
1924 * or we cannot drop ET, cannot get window spill traps.
1925 * The busy loop is necessary because the PIO error
1926 * sometimes does not go away quickly and we trap again.
1928 sethi %hi(C_LABEL(pcic_regs)), %o1
1929 ld [%o1 + %lo(C_LABEL(pcic_regs))], %o2
1931 ! Get pending status for printouts later.
1932 ld [%o2 + PCI_SYS_INT_PENDING], %o0
1934 mov PCI_SYS_INT_PENDING_CLEAR_ALL, %o1
1935 stb %o1, [%o2 + PCI_SYS_INT_PENDING_CLEAR]
1937 ld [%o2 + PCI_SYS_INT_PENDING], %o1
1938 andcc %o1, ((PCI_SYS_INT_PENDING_PIO|PCI_SYS_INT_PENDING_PCI)>>24), %g0
1942 or %l0, PSR_PIL, %l4
1945 wr %l4, PSR_ET, %psr
1948 call C_LABEL(pcic_nmi)
1949 add %sp, STACKFRAME_SZ, %o1 ! struct pt_regs *regs
1952 .globl C_LABEL(pcic_nmi_trap_patch)
1953 C_LABEL(pcic_nmi_trap_patch):
1954 sethi %hi(linux_trap_ipi15_pcic), %l3
1955 jmpl %l3 + %lo(linux_trap_ipi15_pcic), %g0
1959 #endif /* CONFIG_PCI */
1961 /* End of entry.S */