Lines Matching refs:fp

129 asmlinkage void trap_c(struct frame *fp);
132 static inline void access_error060 (struct frame *fp) in access_error060() argument
134 unsigned long fslw = fp->un.fmt4.pc; /* is really FSLW for access error */ in access_error060()
136 pr_debug("fslw=%#lx, fa=%#lx\n", fslw, fp->un.fmt4.effaddr); in access_error060()
151 unsigned long addr = fp->un.fmt4.effaddr; in access_error060()
164 do_page_fault(&fp->ptregs, addr, errorcode); in access_error060()
169 send_fault_sig(&fp->ptregs); in access_error060()
171 send_fault_sig(&fp->ptregs) > 0) { in access_error060()
172 pr_err("pc=%#lx, fa=%#lx\n", fp->ptregs.pc, in access_error060()
173 fp->un.fmt4.effaddr); in access_error060()
175 trap_c( fp ); in access_error060()
234 static inline void fix_xframe040(struct frame *fp, unsigned long wba, unsigned short wbs) in fix_xframe040() argument
236 fp->un.fmt7.faddr = wba; in fix_xframe040()
237 fp->un.fmt7.ssw = wbs & 0xff; in fix_xframe040()
239 fp->un.fmt7.ssw |= MA_040; in fix_xframe040()
242 static inline void do_040writebacks(struct frame *fp) in do_040writebacks() argument
246 if (fp->un.fmt7.wb1s & WBV_040) in do_040writebacks()
250 if ((fp->un.fmt7.wb2s & WBV_040) && in do_040writebacks()
251 !(fp->un.fmt7.wb2s & WBTT_040)) { in do_040writebacks()
252 res = do_040writeback1(fp->un.fmt7.wb2s, fp->un.fmt7.wb2a, in do_040writebacks()
253 fp->un.fmt7.wb2d); in do_040writebacks()
255 fix_xframe040(fp, fp->un.fmt7.wb2a, fp->un.fmt7.wb2s); in do_040writebacks()
257 fp->un.fmt7.wb2s = 0; in do_040writebacks()
261 if (fp->un.fmt7.wb3s & WBV_040 && (!res || fp->un.fmt7.wb3s & 4)) { in do_040writebacks()
262 res = do_040writeback1(fp->un.fmt7.wb3s, fp->un.fmt7.wb3a, in do_040writebacks()
263 fp->un.fmt7.wb3d); in do_040writebacks()
266 fix_xframe040(fp, fp->un.fmt7.wb3a, fp->un.fmt7.wb3s); in do_040writebacks()
268 fp->un.fmt7.wb2s = fp->un.fmt7.wb3s; in do_040writebacks()
269 fp->un.fmt7.wb3s &= (~WBV_040); in do_040writebacks()
270 fp->un.fmt7.wb2a = fp->un.fmt7.wb3a; in do_040writebacks()
271 fp->un.fmt7.wb2d = fp->un.fmt7.wb3d; in do_040writebacks()
274 fp->un.fmt7.wb3s = 0; in do_040writebacks()
278 send_fault_sig(&fp->ptregs); in do_040writebacks()
287 asmlinkage void berr_040cleanup(struct frame *fp) in berr_040cleanup() argument
289 fp->un.fmt7.wb2s &= ~4; in berr_040cleanup()
290 fp->un.fmt7.wb3s &= ~4; in berr_040cleanup()
292 do_040writebacks(fp); in berr_040cleanup()
295 static inline void access_error040(struct frame *fp) in access_error040() argument
297 unsigned short ssw = fp->un.fmt7.ssw; in access_error040()
300 pr_debug("ssw=%#x, fa=%#lx\n", ssw, fp->un.fmt7.faddr); in access_error040()
301 pr_debug("wb1s=%#x, wb2s=%#x, wb3s=%#x\n", fp->un.fmt7.wb1s, in access_error040()
302 fp->un.fmt7.wb2s, fp->un.fmt7.wb3s); in access_error040()
304 fp->un.fmt7.wb2a, fp->un.fmt7.wb3a, in access_error040()
305 fp->un.fmt7.wb2d, fp->un.fmt7.wb3d); in access_error040()
308 unsigned long addr = fp->un.fmt7.faddr; in access_error040()
333 if (do_page_fault(&fp->ptregs, addr, errorcode)) { in access_error040()
335 if (user_mode(&fp->ptregs)){ in access_error040()
346 if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr) in access_error040()
347 fp->un.fmt7.wb2s &= ~WBV_040; in access_error040()
348 if (fp->un.fmt7.wb3a == fp->un.fmt7.faddr) in access_error040()
349 fp->un.fmt7.wb3s &= ~WBV_040; in access_error040()
357 current->thread.faddr = fp->un.fmt7.faddr; in access_error040()
358 if (send_fault_sig(&fp->ptregs) >= 0) in access_error040()
360 fp->un.fmt7.faddr); in access_error040()
364 do_040writebacks(fp); in access_error040()
375 static inline void bus_error030 (struct frame *fp) in bus_error030() argument
379 unsigned short ssw = fp->un.fmtb.ssw; in bus_error030()
385 fp->ptregs.format == 0xa ? fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2 in bus_error030()
387 fp->ptregs.format == 0xa ? fp->ptregs.pc + 4 : fp->un.fmtb.baddr); in bus_error030()
391 fp->un.fmtb.daddr, in bus_error030()
392 space_names[ssw & DFC], fp->ptregs.pc); in bus_error030()
402 if (mmu_emu_handle_fault (fp->un.fmtb.daddr, ssw & RW, 0)) in bus_error030()
407 if (fp->ptregs.sr & PS_S) { in bus_error030()
411 if (mmu_emu_handle_fault (fp->un.fmtb.daddr, ssw & RW, 1)) in bus_error030()
416 fp->ptregs.pc); in bus_error030()
419 if((fp->ptregs.pc >= (unsigned long)&_sun3_map_test_start) && in bus_error030()
420 (fp->ptregs.pc <= (unsigned long)&_sun3_map_test_end)) { in bus_error030()
421 send_fault_sig(&fp->ptregs); in bus_error030()
427 fp->un.fmtb.daddr, in bus_error030()
428 space_names[ssw & DFC], fp->ptregs.pc); in bus_error030()
432 die_if_kernel("Oops", &fp->ptregs,0); in bus_error030()
446 addr = fp->un.fmtb.daddr; in bus_error030()
463 fp->ptregs.pc); in bus_error030()
464 die_if_kernel ("Oops", &fp->ptregs, buserr_type); in bus_error030()
474 do_page_fault (&fp->ptregs, addr, errorcode); in bus_error030()
483 if (fp->ptregs.format == 0xA) in bus_error030()
484 addr = fp->ptregs.pc + 4; in bus_error030()
486 addr = fp->un.fmtb.baddr; in bus_error030()
492 do_page_fault (&fp->ptregs, addr, 0); in bus_error030()
500 static inline void bus_error030 (struct frame *fp) in bus_error030() argument
505 unsigned short ssw = fp->un.fmtb.ssw; in bus_error030()
516 fp->ptregs.format == 0xa ? fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2 in bus_error030()
518 fp->ptregs.format == 0xa ? fp->ptregs.pc + 4 : fp->un.fmtb.baddr); in bus_error030()
522 fp->un.fmtb.daddr, in bus_error030()
523 space_names[ssw & DFC], fp->ptregs.pc); in bus_error030()
530 addr = fp->un.fmtb.daddr; in bus_error030()
555 fp->un.fmtb.daddr, in bus_error030()
556 space_names[ssw & DFC], fp->ptregs.pc); in bus_error030()
561 if (do_page_fault (&fp->ptregs, addr, errorcode) < 0) in bus_error030()
565 if (!(ssw & RM) && send_fault_sig(&fp->ptregs) > 0) in bus_error030()
571 fp->ptregs.pc); in bus_error030()
572 die_if_kernel("Oops",&fp->ptregs,mmusr); in bus_error030()
582 fp->ptregs.pc, ssw); in bus_error030()
599 die_if_kernel("Oops",&fp->ptregs,mmusr); in bus_error030()
618 if (fp->ptregs.sr & PS_S) { in bus_error030()
619 pr_err("Instruction fault at %#010lx\n", fp->ptregs.pc); in bus_error030()
622 die_if_kernel("Oops",&fp->ptregs,0); in bus_error030()
628 if (fp->ptregs.format == 10) in bus_error030()
629 addr = fp->ptregs.pc + 4; in bus_error030()
631 addr = fp->un.fmtb.baddr; in bus_error030()
635 if ((ssw & DF) && ((addr ^ fp->un.fmtb.daddr) & PAGE_MASK) == 0) in bus_error030()
656 do_page_fault (&fp->ptregs, addr, 0); in bus_error030()
659 addr, fp->ptregs.pc); in bus_error030()
661 die_if_kernel("Oops",&fp->ptregs,mmusr); in bus_error030()
701 static inline void access_errorcf(unsigned int fs, struct frame *fp) in access_errorcf() argument
717 need_page_fault = cf_tlb_miss(&fp->ptregs, 0, 0, 0); in access_errorcf()
718 addr = fp->ptregs.pc; in access_errorcf()
721 need_page_fault = cf_tlb_miss(&fp->ptregs, 0, 0, 1); in access_errorcf()
722 addr = fp->ptregs.pc + sizeof(long); in access_errorcf()
725 need_page_fault = cf_tlb_miss(&fp->ptregs, 1, 1, 0); in access_errorcf()
728 need_page_fault = cf_tlb_miss(&fp->ptregs, 0, 1, 0); in access_errorcf()
751 do_page_fault(&fp->ptregs, addr, err_code); in access_errorcf()
756 asmlinkage void buserr_c(struct frame *fp) in buserr_c() argument
759 if (user_mode(&fp->ptregs)) in buserr_c()
760 current->thread.esp0 = (unsigned long) fp; in buserr_c()
762 pr_debug("*** Bus Error *** Format is %x\n", fp->ptregs.format); in buserr_c()
767 fs = (fp->ptregs.vector & 0x3) | in buserr_c()
768 ((fp->ptregs.vector & 0xc00) >> 8); in buserr_c()
778 access_errorcf(fs, fp); in buserr_c()
786 switch (fp->ptregs.format) { in buserr_c()
789 access_error060 (fp); in buserr_c()
794 access_error040 (fp); in buserr_c()
800 bus_error030 (fp); in buserr_c()
804 die_if_kernel("bad frame format",&fp->ptregs,0); in buserr_c()
847 struct frame *fp = (struct frame *)regs; in show_registers() local
863 addr = (unsigned long)&fp->un; in show_registers()
867 pr_cont("instr addr=%08lx\n", fp->un.fmt2.iaddr); in show_registers()
868 addr += sizeof(fp->un.fmt2); in show_registers()
871 pr_cont("eff addr=%08lx\n", fp->un.fmt3.effaddr); in show_registers()
872 addr += sizeof(fp->un.fmt3); in show_registers()
877 fp->un.fmt4.effaddr, fp->un.fmt4.pc); in show_registers()
880 fp->un.fmt4.effaddr, fp->un.fmt4.pc); in show_registers()
881 addr += sizeof(fp->un.fmt4); in show_registers()
885 fp->un.fmt7.effaddr, fp->un.fmt7.ssw, fp->un.fmt7.faddr); in show_registers()
887 fp->un.fmt7.wb1s, fp->un.fmt7.wb1a, fp->un.fmt7.wb1dpd0); in show_registers()
889 fp->un.fmt7.wb2s, fp->un.fmt7.wb2a, fp->un.fmt7.wb2d); in show_registers()
891 fp->un.fmt7.wb3s, fp->un.fmt7.wb3a, fp->un.fmt7.wb3d); in show_registers()
893 fp->un.fmt7.wb1dpd0, fp->un.fmt7.pd1, fp->un.fmt7.pd2, in show_registers()
894 fp->un.fmt7.pd3); in show_registers()
895 addr += sizeof(fp->un.fmt7); in show_registers()
898 pr_cont("instr addr=%08lx\n", fp->un.fmt9.iaddr); in show_registers()
899 addr += sizeof(fp->un.fmt9); in show_registers()
903 fp->un.fmta.ssw, fp->un.fmta.isc, fp->un.fmta.isb, in show_registers()
904 fp->un.fmta.daddr, fp->un.fmta.dobuf); in show_registers()
905 addr += sizeof(fp->un.fmta); in show_registers()
909 fp->un.fmtb.ssw, fp->un.fmtb.isc, fp->un.fmtb.isb, in show_registers()
910 fp->un.fmtb.daddr, fp->un.fmtb.dobuf); in show_registers()
912 fp->un.fmtb.baddr, fp->un.fmtb.dibuf, fp->un.fmtb.ver); in show_registers()
913 addr += sizeof(fp->un.fmtb); in show_registers()
972 void bad_super_trap (struct frame *fp) in bad_super_trap() argument
974 int vector = (fp->ptregs.vector >> 2) & 0xff; in bad_super_trap()
980 fp->ptregs.format); in bad_super_trap()
983 vector, fp->ptregs.format); in bad_super_trap()
985 unsigned short ssw = fp->un.fmtb.ssw; in bad_super_trap()
991 (fp->ptregs.format) == 0xA ? in bad_super_trap()
992 fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2); in bad_super_trap()
995 (fp->ptregs.format) == 0xA ? in bad_super_trap()
996 fp->ptregs.pc + 4 : fp->un.fmtb.baddr); in bad_super_trap()
1000 fp->un.fmtb.daddr, space_names[ssw & DFC], in bad_super_trap()
1001 fp->ptregs.pc); in bad_super_trap()
1004 die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0); in bad_super_trap()
1007 asmlinkage void trap_c(struct frame *fp) in trap_c() argument
1010 int vector = (fp->ptregs.vector >> 2) & 0xff; in trap_c()
1013 if (fp->ptregs.sr & PS_S) { in trap_c()
1018 } else if (!handle_kernel_fault(&fp->ptregs)) in trap_c()
1019 bad_super_trap(fp); in trap_c()
1106 switch (fp->ptregs.format) { in trap_c()
1108 info.si_addr = (void *) fp->ptregs.pc; in trap_c()
1111 info.si_addr = (void *) fp->un.fmt2.iaddr; in trap_c()
1114 info.si_addr = (void *) fp->un.fmt7.effaddr; in trap_c()
1117 info.si_addr = (void *) fp->un.fmt9.iaddr; in trap_c()
1120 info.si_addr = (void *) fp->un.fmta.daddr; in trap_c()
1123 info.si_addr = (void *) fp->un.fmtb.daddr; in trap_c()
1129 void die_if_kernel (char *str, struct pt_regs *fp, int nr) in die_if_kernel() argument
1131 if (!(fp->sr & PS_S)) in die_if_kernel()
1136 show_registers(fp); in die_if_kernel()