Lines Matching +full:user +full:- +full:level

1 // SPDX-License-Identifier: GPL-2.0
50 #include "../math-emu/math-emu.h" /* for handle_fpe() */
57 unsigned long mask = 1UL << (nbits - 1); in printbinary()
72 #define FFMT "%016llx" /* fpregs are 64-bit always */
75 printk("%s%s%02d-%02d " fmt " " fmt " " fmt " " fmt "\n", \
79 static void print_gr(const char *level, struct pt_regs *regs) in print_gr() argument
84 printk("%s\n", level); in print_gr()
85 printk("%s YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI\n", level); in print_gr()
86 printbinary(buf, regs->gr[0], 32); in print_gr()
87 printk("%sPSW: %s %s\n", level, buf, print_tainted()); in print_gr()
90 PRINTREGS(level, regs->gr, "r", RFMT, i); in print_gr()
93 static void print_fr(const char *level, struct pt_regs *regs) in print_fr() argument
102 * The fldd is used to restore the T-bit if there was one, as the in print_fr()
104 * PA2.0 book says "thou shall not use fstw on FPSR/FPERs" - T-Bone */ in print_fr()
109 printk("%s\n", level); in print_fr()
110 printk("%s VZOUICununcqcqcqcqcqcrmunTDVZOUI\n", level); in print_fr()
112 printk("%sFPSR: %s\n", level, buf); in print_fr()
113 printk("%sFPER1: %08x\n", level, s.sw[1]); in print_fr()
117 PRINTREGS(level, regs->fr, "fr", FFMT, i); in print_fr()
122 int i, user; in show_regs() local
123 const char *level; in show_regs() local
126 user = user_mode(regs); in show_regs()
127 level = user ? KERN_DEBUG : KERN_CRIT; in show_regs()
129 show_regs_print_info(level); in show_regs()
131 print_gr(level, regs); in show_regs()
134 PRINTREGS(level, regs->sr, "sr", RFMT, i); in show_regs()
136 if (user) in show_regs()
137 print_fr(level, regs); in show_regs()
141 printk("%s\n", level); in show_regs()
143 level, regs->iasq[0], regs->iasq[1], regs->iaoq[0], regs->iaoq[1]); in show_regs()
145 level, regs->iir, regs->isr, regs->ior); in show_regs()
147 level, task_cpu(current), cr30, cr31); in show_regs()
148 printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28); in show_regs()
150 if (user) { in show_regs()
151 printk("%s IAOQ[0]: " RFMT "\n", level, regs->iaoq[0]); in show_regs()
152 printk("%s IAOQ[1]: " RFMT "\n", level, regs->iaoq[1]); in show_regs()
153 printk("%s RP(r2): " RFMT "\n", level, regs->gr[2]); in show_regs()
155 printk("%s IAOQ[0]: %pS\n", level, (void *) regs->iaoq[0]); in show_regs()
156 printk("%s IAOQ[1]: %pS\n", level, (void *) regs->iaoq[1]); in show_regs()
157 printk("%s RP(r2): %pS\n", level, (void *) regs->gr[2]); in show_regs()
180 if (unwind_once(info) < 0 || info->ip == 0) in do_show_stack()
183 if (__kernel_text_address(info->ip)) { in do_show_stack()
185 loglvl, info->ip, (void *) info->ip); in do_show_stack()
220 current->comm, task_pid_nr(current), str, err, regs->iaoq[0]); in die_if_kernel()
229 /* Amuse the user in a SPARC fashion */ in die_if_kernel()
233 " ------------------------------- \n" in die_if_kernel()
236 " U ||----w |\n" in die_if_kernel()
244 current->comm, task_pid_nr(current), str, err); in die_if_kernel()
247 if (current->thread.flags & PARISC_KERNEL_DEATH) { in die_if_kernel()
252 current->thread.flags |= PARISC_KERNEL_DEATH; in die_if_kernel()
273 (void __user *) (regs->iaoq[0] & ~3)); in handle_gdb_break()
278 unsigned iir = regs->iir; in handle_break()
283 tt = report_bug(regs->iaoq[0] & ~3, regs); in handle_break()
285 regs->iaoq[0] += 4; in handle_break()
286 regs->iaoq[1] += 4; in handle_break()
315 iir & 31, (iir>>13) & ((1<<13)-1), in handle_break()
316 task_pid_nr(current), current->comm); in handle_break()
349 regs->gr[0] = pim_wide->cr[22]; in transfer_pim_to_trap_frame()
352 regs->gr[i] = pim_wide->gr[i]; in transfer_pim_to_trap_frame()
355 regs->fr[i] = pim_wide->fr[i]; in transfer_pim_to_trap_frame()
358 regs->sr[i] = pim_wide->sr[i]; in transfer_pim_to_trap_frame()
360 regs->iasq[0] = pim_wide->cr[17]; in transfer_pim_to_trap_frame()
361 regs->iasq[1] = pim_wide->iasq_back; in transfer_pim_to_trap_frame()
362 regs->iaoq[0] = pim_wide->cr[18]; in transfer_pim_to_trap_frame()
363 regs->iaoq[1] = pim_wide->iaoq_back; in transfer_pim_to_trap_frame()
365 regs->sar = pim_wide->cr[11]; in transfer_pim_to_trap_frame()
366 regs->iir = pim_wide->cr[19]; in transfer_pim_to_trap_frame()
367 regs->isr = pim_wide->cr[20]; in transfer_pim_to_trap_frame()
368 regs->ior = pim_wide->cr[21]; in transfer_pim_to_trap_frame()
373 regs->gr[0] = pim_narrow->cr[22]; in transfer_pim_to_trap_frame()
376 regs->gr[i] = pim_narrow->gr[i]; in transfer_pim_to_trap_frame()
379 regs->fr[i] = pim_narrow->fr[i]; in transfer_pim_to_trap_frame()
382 regs->sr[i] = pim_narrow->sr[i]; in transfer_pim_to_trap_frame()
384 regs->iasq[0] = pim_narrow->cr[17]; in transfer_pim_to_trap_frame()
385 regs->iasq[1] = pim_narrow->iasq_back; in transfer_pim_to_trap_frame()
386 regs->iaoq[0] = pim_narrow->cr[18]; in transfer_pim_to_trap_frame()
387 regs->iaoq[1] = pim_narrow->iaoq_back; in transfer_pim_to_trap_frame()
389 regs->sar = pim_narrow->cr[11]; in transfer_pim_to_trap_frame()
390 regs->iir = pim_narrow->cr[19]; in transfer_pim_to_trap_frame()
391 regs->isr = pim_narrow->cr[20]; in transfer_pim_to_trap_frame()
392 regs->ior = pim_narrow->cr[21]; in transfer_pim_to_trap_frame()
400 regs->ksp = 0; in transfer_pim_to_trap_frame()
401 regs->kpc = 0; in transfer_pim_to_trap_frame()
402 regs->orig_r28 = 0; in transfer_pim_to_trap_frame()
438 /* show_stack(NULL, (unsigned long *)regs->gr[30]); */ in parisc_terminate()
452 * if the user had pressed it once at any time, the in parisc_terminate()
474 if (!irqs_disabled_flags(regs->gr[0])) in handle_interruption()
478 * If the priority level is still user, and the in handle_interruption()
480 * then the user is attempting something in a space in handle_interruption()
483 * This is normally the situation when the user in handle_interruption()
497 if (((unsigned long)regs->iaoq[0] & 3) && in handle_interruption()
498 ((unsigned long)regs->iasq[0] != (unsigned long)regs->sr[7])) { in handle_interruption()
499 /* Kill the user process later */ in handle_interruption()
500 regs->iaoq[0] = 0 | 3; in handle_interruption()
501 regs->iaoq[1] = regs->iaoq[0] + 4; in handle_interruption()
502 regs->iasq[0] = regs->iasq[1] = regs->sr[7]; in handle_interruption()
503 regs->gr[0] &= ~PSW_B; in handle_interruption()
514 /* High-priority machine check (HPMC) */ in handle_interruption()
530 regs->gr[0] &= ~PSW_R; in handle_interruption()
541 /* else this must be the start of a syscall - just let it run */ in handle_interruption()
545 /* Low-priority machine check */ in handle_interruption()
555 fault_address = regs->iaoq[0]; in handle_interruption()
556 fault_space = regs->iasq[0]; in handle_interruption()
578 if ((regs->iir & 0xffdfffe0) == 0x034008a0) { in handle_interruption()
584 if (regs->iir & 0x00200000) in handle_interruption()
585 regs->gr[regs->iir & 0x1f] = mfctl(27); in handle_interruption()
587 regs->gr[regs->iir & 0x1f] = mfctl(26); in handle_interruption()
589 regs->iaoq[0] = regs->iaoq[1]; in handle_interruption()
590 regs->iaoq[1] += 4; in handle_interruption()
591 regs->iasq[0] = regs->iasq[1]; in handle_interruption()
599 (void __user *) regs->iaoq[0]); in handle_interruption()
605 (void __user *) regs->iaoq[0]); in handle_interruption()
617 (void __user *) regs->iaoq[0]); in handle_interruption()
634 /* Non-access instruction TLB miss fault */ in handle_interruption()
639 /* Non-access data TLB miss fault/Non-access data page fault */ in handle_interruption()
642 If the insn used a non-shadow register, then the tlb in handle_interruption()
643 handlers could not have their side-effect (e.g. probe in handle_interruption()
652 fault_address = regs->ior; in handle_interruption()
653 fault_space = regs->isr; in handle_interruption()
657 /* PCXS only -- later cpu's split this into types 26,27 & 28 */ in handle_interruption()
666 fault_address = regs->ior; in handle_interruption()
667 fault_space = regs->isr; in handle_interruption()
672 regs->gr[0] |= PSW_X; /* So we can single-step over the trap */ in handle_interruption()
681 regs->gr[0] &= ~PSW_T; in handle_interruption()
684 /* else this must be the start of a syscall - just let it in handle_interruption()
707 mmap_read_lock(current->mm); in handle_interruption()
708 vma = find_vma(current->mm,regs->iaoq[0]); in handle_interruption()
709 if (vma && (regs->iaoq[0] >= vma->vm_start) in handle_interruption()
710 && (vma->vm_flags & VM_EXEC)) { in handle_interruption()
712 fault_address = regs->iaoq[0]; in handle_interruption()
713 fault_space = regs->iasq[0]; in handle_interruption()
715 mmap_read_unlock(current->mm); in handle_interruption()
718 mmap_read_unlock(current->mm); in handle_interruption()
721 regs->iir = 0xbaadf00d; in handle_interruption()
732 ((void __user *) regs->iaoq[0]) : in handle_interruption()
733 ((void __user *) regs->ior)); in handle_interruption()
745 task_pid_nr(current), current->comm); in handle_interruption()
748 (void __user *)regs->ior); in handle_interruption()
758 if ((fault_space >> SPACEID_SHIFT) != (regs->sr[7] >> SPACEID_SHIFT)) { in handle_interruption()
760 "User fault %d on space 0x%08lx, pid=%d command='%s'\n", in handle_interruption()
762 task_pid_nr(current), current->comm); in handle_interruption()
764 (void __user *)regs->ior); in handle_interruption()
782 parisc_acctyp(code, regs->iir) == VM_WRITE, regs)) in handle_interruption()
813 * PDCE_CHECK in HPMC handler. See programming note at page 1-31 of in initialize_ivt()
825 * Address (IVA + 56) are word-aligned. in initialize_ivt()
838 ivap[5] = -check; in initialize_ivt()
844 * write-protect the kernel */