/linux/arch/nios2/kernel/ |
H A D | signal.c | 42 unsigned long __user *gregs = uc->uc_mcontext.gregs; in rt_restore_ucontext() local 52 err |= __get_user(regs->r1, &gregs[0]); in rt_restore_ucontext() 53 err |= __get_user(regs->r2, &gregs[1]); in rt_restore_ucontext() 54 err |= __get_user(regs->r3, &gregs[2]); in rt_restore_ucontext() 55 err |= __get_user(regs->r4, &gregs[3]); in rt_restore_ucontext() 56 err |= __get_user(regs->r5, &gregs[4]); in rt_restore_ucontext() 57 err |= __get_user(regs->r6, &gregs[5]); in rt_restore_ucontext() 58 err |= __get_user(regs->r7, &gregs[6]); in rt_restore_ucontext() 59 err |= __get_user(regs->r8, &gregs[7]); in rt_restore_ucontext() 60 err |= __get_user(regs->r9, &gregs[8]); in rt_restore_ucontext() [all …]
|
/linux/arch/m68k/kernel/ |
H A D | signal.c | 715 greg_t __user *gregs = uc->uc_mcontext.gregs; in rt_restore_ucontext() local 726 err |= __get_user(regs->d0, &gregs[0]); in rt_restore_ucontext() 727 err |= __get_user(regs->d1, &gregs[1]); in rt_restore_ucontext() 728 err |= __get_user(regs->d2, &gregs[2]); in rt_restore_ucontext() 729 err |= __get_user(regs->d3, &gregs[3]); in rt_restore_ucontext() 730 err |= __get_user(regs->d4, &gregs[4]); in rt_restore_ucontext() 731 err |= __get_user(regs->d5, &gregs[5]); in rt_restore_ucontext() 732 err |= __get_user(sw->d6, &gregs[6]); in rt_restore_ucontext() 733 err |= __get_user(sw->d7, &gregs[7]); in rt_restore_ucontext() 734 err |= __get_user(regs->a0, &gregs[8]); in rt_restore_ucontext() [all …]
|
/linux/tools/testing/selftests/x86/ |
H A D | sysret_rip.c | 65 if (rip != ctx->uc_mcontext.gregs[REG_RIP]) { in sigsegv_for_sigreturn_test() 67 rip, (unsigned long)ctx->uc_mcontext.gregs[REG_RIP]); in sigsegv_for_sigreturn_test() 72 memcpy(&ctx->uc_mcontext.gregs, &initial_regs, sizeof(gregset_t)); in sigsegv_for_sigreturn_test() 81 memcpy(&initial_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1() 84 ctx->uc_mcontext.gregs[REG_RIP] = rip; in sigusr1() 85 ctx->uc_mcontext.gregs[REG_RCX] = rip; in sigusr1() 88 assert(ctx->uc_mcontext.gregs[REG_EFL] == in sigusr1() 89 ctx->uc_mcontext.gregs[REG_R11]); in sigusr1() 109 if (rip != ctx->uc_mcontext.gregs[REG_RIP]) { in sigsegv_for_fallthrough() 111 rip, (unsigned long)ctx->uc_mcontext.gregs[REG_RIP]); in sigsegv_for_fallthrough()
|
H A D | nx_stack.c | 125 stack_min_addr = ++uc->uc_mcontext.gregs[RDI]; in sigsegv() 129 uc->uc_mcontext.gregs[RIP] = (uintptr_t)&make_stack2; in sigsegv() 133 unsigned long stack_max_addr = uc->uc_mcontext.gregs[RDI]; in sigsegv() 138 uc->uc_mcontext.gregs[RIP] = stack_max_addr - PAGE_SIZE; in sigsegv() 142 uc->uc_mcontext.gregs[RIP] -= PAGE_SIZE; in sigsegv() 143 if (uc->uc_mcontext.gregs[RIP] == stack_min_addr) { in sigsegv() 156 unsigned long rip = uc->uc_mcontext.gregs[RIP]; in sigtrap()
|
H A D | sigreturn.c | 306 struct selectors *sels = (void *)&ctx->uc_mcontext.gregs[REG_CSGSFS]; in ssptr() 312 struct selectors *sels = (void *)&ctx->uc_mcontext.gregs[REG_CSGSFS]; in csptr() 322 return &ctx->uc_mcontext.gregs[REG_SS]; in ssptr() 327 return &ctx->uc_mcontext.gregs[REG_CS]; in csptr() 441 memcpy(&initial_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1() 446 ctx->uc_mcontext.gregs[REG_IP] = in sigusr1() 448 ctx->uc_mcontext.gregs[REG_SP] = (unsigned long)0x8badf00d5aadc0deULL; in sigusr1() 449 ctx->uc_mcontext.gregs[REG_CX] = 0; in sigusr1() 460 ctx->uc_mcontext.gregs[REG_DS] = 0; in sigusr1() 461 ctx->uc_mcontext.gregs[REG_ES] = 0; in sigusr1() [all …]
|
H A D | syscall_arg_fault.c | 47 long ax = (long)ctx->uc_mcontext.gregs[REG_AX]; in sigsegv_or_sigbus() 52 printf("\tIP = 0x%lx\n", (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in sigsegv_or_sigbus() 72 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigtrap() 89 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigill()
|
H A D | single_step_syscall.c | 87 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in sigtrap() 103 (unsigned long)ctx->uc_mcontext.gregs[REG_IP], in print_and_longjmp() 104 (unsigned long)ctx->uc_mcontext.gregs[REG_EFL] & X86_EFLAGS_TF); in print_and_longjmp() 106 sig_eflags = (unsigned long)ctx->uc_mcontext.gregs[REG_EFL]; in print_and_longjmp()
|
H A D | mov_ss_trap.c | 121 (unsigned long)ctx->uc_mcontext.gregs[REG_IP], in sigtrap() 122 !!(ctx->uc_mcontext.gregs[REG_EFL] & X86_EFLAGS_RF)); in sigtrap() 130 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in handle_and_return() 138 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in handle_and_longjmp()
|
H A D | unwind_vdso.c | 111 unsigned long ip = ctx->uc_mcontext.gregs[REG_EIP]; in sigtrap() 117 return_address = *(unsigned long *)(unsigned long)ctx->uc_mcontext.gregs[REG_ESP]; in sigtrap() 127 ctx->uc_mcontext.gregs[REG_EFL] &= ~X86_EFLAGS_TF; in sigtrap()
|
H A D | entry_from_vm86.c | 58 if (ctx->uc_mcontext.gregs[REG_EFL] & X86_EFLAGS_VM || in sighandler() 59 (ctx->uc_mcontext.gregs[REG_CS] & 3) != 3) { in sighandler() 73 (unsigned long)ctx->uc_mcontext.gregs[REG_EFL], in sighandler() 74 (unsigned short)ctx->uc_mcontext.gregs[REG_CS]); in sighandler()
|
H A D | test_vsyscall.c | 330 segv_err = ctx->uc_mcontext.gregs[REG_ERR]; in sigsegv() 482 unsigned long ip = ctx->uc_mcontext.gregs[REG_RIP]; in sigtrap()
|
/linux/arch/x86/um/shared/sysdep/ |
H A D | mcontext.h | 16 (fi).error_code = (mc)->gregs[REG_ERR]; \ 17 (fi).trap_no = (mc)->gregs[REG_TRAPNO]; \ 24 (fi).cr2 = (mc)->gregs[REG_CR2]; \ 25 (fi).error_code = (mc)->gregs[REG_ERR]; \ 26 (fi).trap_no = (mc)->gregs[REG_TRAPNO]; \
|
/linux/drivers/memory/ |
H A D | fsl_ifc.c | 51 if (!fsl_ifc_ctrl_dev || !fsl_ifc_ctrl_dev->gregs) in fsl_ifc_find() 55 u32 cspr = ifc_in32(&fsl_ifc_ctrl_dev->gregs->cspr_cs[i].cspr); in fsl_ifc_find() 68 struct fsl_ifc_global __iomem *ifc = ctrl->gregs; in fsl_ifc_ctrl_init() 98 iounmap(ctrl->gregs); in fsl_ifc_ctrl_remove() 148 struct fsl_ifc_global __iomem *ifc = ctrl->gregs; in fsl_ifc_ctrl_irq() 218 fsl_ifc_ctrl_dev->gregs = of_iomap(dev->dev.of_node, 0); in fsl_ifc_ctrl_probe() 219 if (!fsl_ifc_ctrl_dev->gregs) { in fsl_ifc_ctrl_probe() 232 version = ifc_in32(&fsl_ifc_ctrl_dev->gregs->ifc_rev) & in fsl_ifc_ctrl_probe() 242 addr = fsl_ifc_ctrl_dev->gregs; in fsl_ifc_ctrl_probe() 302 iounmap(fsl_ifc_ctrl_dev->gregs); in fsl_ifc_ctrl_probe()
|
/linux/samples/seccomp/ |
H A D | bpf-direct.c | 73 syscall = ctx->uc_mcontext.gregs[REG_SYSCALL]; in emulator() 74 buf = (char *) ctx->uc_mcontext.gregs[REG_ARG1]; in emulator() 75 len = (size_t) ctx->uc_mcontext.gregs[REG_ARG2]; in emulator() 79 if (ctx->uc_mcontext.gregs[REG_ARG0] != STDERR_FILENO) in emulator() 82 ctx->uc_mcontext.gregs[REG_RESULT] = -1; in emulator() 85 ctx->uc_mcontext.gregs[REG_RESULT] = bytes; in emulator()
|
/linux/arch/powerpc/sysdev/ |
H A D | mpic.c | 220 return _mpic_read(type, &mpic->gregs, offset); in _mpic_ipi_read() 228 _mpic_write(mpic->reg_type, &mpic->gregs, offset, value); in _mpic_ipi_write() 355 mpic_write(mpic->gregs, MPIC_INFO(GREG_IPI_VECTOR_PRI_0), MPIC_VECPRI_MASK); in mpic_test_broken_ipi() 356 r = mpic_read(mpic->gregs, MPIC_INFO(GREG_IPI_VECTOR_PRI_0)); in mpic_test_broken_ipi() 1359 mpic_map(mpic, mpic->paddr, &mpic->gregs, MPIC_INFO(GREG_BASE), 0x1000); in mpic_alloc() 1419 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0), in mpic_alloc() 1420 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) in mpic_alloc() 1422 while( mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) in mpic_alloc() 1429 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0), in mpic_alloc() 1430 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) in mpic_alloc() [all …]
|
/linux/drivers/net/ethernet/sun/ |
H A D | sunhme.c | 943 static void happy_meal_stop(struct happy_meal *hp, void __iomem *gregs) in happy_meal_stop() argument 950 hme_write32(hp, gregs + GREG_SWRESET, GREG_RESET_ALL); in happy_meal_stop() 951 while (hme_read32(hp, gregs + GREG_SWRESET) && --tries) in happy_meal_stop() 1259 void __iomem *gregs = hp->gregs; in happy_meal_init() local 1279 happy_meal_stop(hp, gregs); in happy_meal_init() 1395 hme_write32(hp, gregs + GREG_CFG, GREG_CFG_BURST64); in happy_meal_init() 1421 hme_write32(hp, gregs + GREG_CFG, gcfg); in happy_meal_init() 1424 hme_write32(hp, gregs + GREG_CFG, GREG_CFG_BURST32); in happy_meal_init() 1427 hme_write32(hp, gregs + GREG_CFG, GREG_CFG_BURST16); in happy_meal_init() 1430 hme_write32(hp, gregs + GREG_CFG, 0); in happy_meal_init() [all …]
|
/linux/arch/powerpc/include/asm/ |
H A D | elf.h | 54 #define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs); argument
|
/linux/tools/testing/selftests/powerpc/include/ |
H A D | utils.h | 205 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_NIP] 206 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_MSR]
|
/linux/arch/nios2/include/uapi/asm/ |
H A D | sigcontext.h | 28 unsigned long gregs[32]; member
|
/linux/arch/m68k/include/asm/ |
H A D | ucontext.h | 16 gregset_t gregs; member
|
/linux/tools/testing/selftests/powerpc/alignment/ |
H A D | copy_first_unaligned.c | 24 unsigned int *pc = (unsigned int *)ctx->uc_mcontext.uc_regs->gregs[PT_NIP]; in signal_action_handler()
|
/linux/tools/testing/selftests/powerpc/tm/ |
H A D | tm-signal-msr-resv.c | 43 ucp->uc_mcontext.uc_regs->gregs[PT_MSR] |= (7ULL); in signal_usr1()
|
/linux/tools/testing/selftests/mm/ |
H A D | pkey-powerpc.h | 15 #define gregs gp_regs macro
|
/linux/tools/testing/selftests/powerpc/copyloops/ |
H A D | exc_validate.c | 16 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_NIP]
|
/linux/arch/powerpc/kernel/ |
H A D | signal_32.c | 94 elf_greg_t64 *gregs = (elf_greg_t64 *)regs; in __unsafe_save_general_regs() local 102 val = gregs[i]; in __unsafe_save_general_regs() 115 elf_greg_t64 *gregs = (elf_greg_t64 *)regs; in __unsafe_restore_general_regs() local 121 unsafe_get_user(gregs[i], &sr->mc_gregs[i], failed); in __unsafe_restore_general_regs()
|