| /linux/drivers/pci/endpoint/ |
| H A D | pci-epc-core.c | 23 struct pci_epc *epc = *(struct pci_epc **)res; in devm_pci_epc_release() local 25 pci_epc_destroy(epc); in devm_pci_epc_release() 34 void pci_epc_put(struct pci_epc *epc) in pci_epc_put() argument 36 if (IS_ERR_OR_NULL(epc)) in pci_epc_put() 39 module_put(epc->ops->owner); in pci_epc_put() 40 put_device(&epc->dev); in pci_epc_put() 54 struct pci_epc *epc; in pci_epc_get() local 61 epc = to_pci_epc(dev); in pci_epc_get() 62 if (try_module_get(epc->ops->owner)) in pci_epc_get() 63 return epc; in pci_epc_get() [all …]
|
| H A D | pci-ep-msi.c | 23 struct pci_epc *epc; in pci_epf_write_msi_msg() local 26 epc = pci_epc_get(dev_name(msi_desc_to_dev(desc))); in pci_epf_write_msi_msg() 27 if (IS_ERR(epc)) in pci_epf_write_msi_msg() 30 epf = list_first_entry_or_null(&epc->pci_epf, struct pci_epf, list); in pci_epf_write_msi_msg() 35 pci_epc_put(epc); in pci_epf_write_msi_msg() 40 struct pci_epc *epc = epf->epc; in pci_epf_alloc_doorbell() local 48 if (list_first_entry_or_null(&epc->pci_epf, struct pci_epf, list) != epf) { in pci_epf_alloc_doorbell() 53 domain = of_msi_map_get_device_domain(epc->dev.parent, 0, in pci_epf_alloc_doorbell() 68 dev_set_msi_domain(epc->dev.parent, domain); in pci_epf_alloc_doorbell() 77 ret = platform_device_msi_init_and_alloc_irqs(epc->dev.parent, num_db, in pci_epf_alloc_doorbell() [all …]
|
| H A D | pci-ep-cfs.c | 33 struct pci_epc *epc; member 53 struct pci_epc *epc = epc_group->epc; in pci_secondary_epc_epf_link() local 56 ret = pci_epc_add_epf(epc, epf, SECONDARY_INTERFACE); in pci_secondary_epc_epf_link() 62 pci_epc_remove_epf(epc, epf, SECONDARY_INTERFACE); in pci_secondary_epc_epf_link() 67 pci_epc_notify_pending_init(epc, epf); in pci_secondary_epc_epf_link() 77 struct pci_epc *epc; in pci_secondary_epc_epf_unlink() local 82 epc = epc_group->epc; in pci_secondary_epc_epf_unlink() 85 pci_epc_remove_epf(epc, epf, SECONDARY_INTERFACE); in pci_secondary_epc_epf_unlink() 117 struct pci_epc *epc = epc_group->epc; in pci_primary_epc_epf_link() local 120 ret = pci_epc_add_epf(epc, epf, PRIMARY_INTERFACE); in pci_primary_epc_epf_link() [all …]
|
| H A D | Makefile | 7 obj-$(CONFIG_PCI_ENDPOINT) += pci-epc-core.o pci-epf-core.o\ 8 pci-epc-mem.o functions/
|
| /linux/arch/mips/kernel/ |
| H A D | branch.c | 32 long epc = regs->cp0_epc; in __isa_exception_epc() local 35 if (__get_user(inst, (u16 __user *) msk_isa16_mode(epc))) { in __isa_exception_epc() 38 return epc; in __isa_exception_epc() 45 epc += 4; in __isa_exception_epc() 47 epc += 2; in __isa_exception_epc() 49 epc += 2; in __isa_exception_epc() 51 epc += 4; in __isa_exception_epc() 53 return epc; in __isa_exception_epc() 326 long epc; in __MIPS16e_compute_return_epc() local 328 epc = regs->cp0_epc; in __MIPS16e_compute_return_epc() [all …]
|
| H A D | mips-r2-to-r6-emul.c | 250 unsigned long cepc, epc, nepc; in jr_func() local 260 epc = regs->cp0_epc; in jr_func() 287 err = mips_dsemul(regs, nir, epc, cepc); in jr_func() 911 unsigned long cpc, epc, nepc, r31, res, rs, rt; in mipsr2_decoder() local 918 epc = regs->cp0_epc; in mipsr2_decoder() 925 inst, epc, pass); in mipsr2_decoder() 994 regs->cp0_epc = epc; in mipsr2_decoder() 1001 nepc = epc + 4; in mipsr2_decoder() 1037 err = mips_dsemul(regs, nir, epc, cpc); in mipsr2_decoder() 1051 regs->cp0_epc = epc; in mipsr2_decoder() [all …]
|
| H A D | traps.c | 1031 unsigned long epc = msk_isa16_mode(exception_epc(regs)); in do_bp() local 1041 if (__get_inst16(&instr[0], (u16 *)epc, user)) in do_bp() 1052 if (__get_inst16(&instr[1], (u16 *)(epc + 2), user)) in do_bp() 1058 if (__get_inst32(&opcode, (u32 *)epc, user)) in do_bp() 1122 unsigned long epc = msk_isa16_mode(exception_epc(regs)); in do_tr() local 1127 if (__get_inst16(&instr[0], (u16 *)(epc + 0), user) || in do_tr() 1128 __get_inst16(&instr[1], (u16 *)(epc + 2), user)) in do_tr() 1135 if (__get_inst32(&opcode, (u32 *)epc, user)) in do_tr() 1155 unsigned int __user *epc = (unsigned int __user *)exception_epc(regs); in do_ri() local 1168 likely(get_user(opcode, epc) >= 0)) { in do_ri() [all …]
|
| /linux/include/linux/ |
| H A D | pci-epc.h | 90 int (*write_header)(struct pci_epc *epc, u8 func_no, u8 vfunc_no, 92 int (*set_bar)(struct pci_epc *epc, u8 func_no, u8 vfunc_no, 94 void (*clear_bar)(struct pci_epc *epc, u8 func_no, u8 vfunc_no, 96 u64 (*align_addr)(struct pci_epc *epc, u64 pci_addr, size_t *size, 98 int (*map_addr)(struct pci_epc *epc, u8 func_no, u8 vfunc_no, 100 void (*unmap_addr)(struct pci_epc *epc, u8 func_no, u8 vfunc_no, 102 int (*set_msi)(struct pci_epc *epc, u8 func_no, u8 vfunc_no, 104 int (*get_msi)(struct pci_epc *epc, u8 func_no, u8 vfunc_no); 105 int (*set_msix)(struct pci_epc *epc, u8 func_no, u8 vfunc_no, 107 int (*get_msix)(struct pci_epc *epc, u8 func_no, u8 vfunc_no); [all …]
|
| /linux/drivers/pci/endpoint/functions/ |
| H A D | pci-epf-ntb.c | 83 struct epf_ntb_epc *epc[2]; member 95 struct pci_epc *epc; member 146 struct pci_epc *epc; in epf_ntb_link_up() local 152 ntb_epc = ntb->epc[type]; in epf_ntb_link_up() 153 epc = ntb_epc->epc; in epf_ntb_link_up() 163 ret = pci_epc_raise_irq(epc, func_no, vfunc_no, irq_type, 1); in epf_ntb_link_up() 165 dev_err(&epc->dev, in epf_ntb_link_up() 244 struct pci_epc *epc; in epf_ntb_configure_mw() local 248 ntb_epc = ntb->epc[type]; in epf_ntb_configure_mw() 249 epc = ntb_epc->epc; in epf_ntb_configure_mw() [all …]
|
| /linux/drivers/pci/controller/cadence/ |
| H A D | pcie-cadence-ep.c | 38 static int cdns_pcie_ep_write_header(struct pci_epc *epc, u8 fn, u8 vfn, in cdns_pcie_ep_write_header() argument 41 struct cdns_pcie_ep *ep = epc_get_drvdata(epc); in cdns_pcie_ep_write_header() 48 dev_err(&epc->dev, "Only Virtual Function #1 has deviceID\n"); in cdns_pcie_ep_write_header() 81 static int cdns_pcie_ep_set_bar(struct pci_epc *epc, u8 fn, u8 vfn, in cdns_pcie_ep_set_bar() argument 84 struct cdns_pcie_ep *ep = epc_get_drvdata(epc); in cdns_pcie_ep_set_bar() 152 static void cdns_pcie_ep_clear_bar(struct pci_epc *epc, u8 fn, u8 vfn, in cdns_pcie_ep_clear_bar() argument 155 struct cdns_pcie_ep *ep = epc_get_drvdata(epc); in cdns_pcie_ep_clear_bar() 185 static int cdns_pcie_ep_map_addr(struct pci_epc *epc, u8 fn, u8 vfn, in cdns_pcie_ep_map_addr() argument 188 struct cdns_pcie_ep *ep = epc_get_drvdata(epc); in cdns_pcie_ep_map_addr() 194 dev_err(&epc->dev, "no free outbound region\n"); in cdns_pcie_ep_map_addr() [all …]
|
| /linux/drivers/pci/controller/ |
| H A D | pcie-rockchip-ep.c | 50 struct pci_epc *epc; member 114 static int rockchip_pcie_ep_write_header(struct pci_epc *epc, u8 fn, u8 vfn, in rockchip_pcie_ep_write_header() argument 118 struct rockchip_pcie_ep *ep = epc_get_drvdata(epc); in rockchip_pcie_ep_write_header() 151 static int rockchip_pcie_ep_set_bar(struct pci_epc *epc, u8 fn, u8 vfn, in rockchip_pcie_ep_set_bar() argument 154 struct rockchip_pcie_ep *ep = epc_get_drvdata(epc); in rockchip_pcie_ep_set_bar() 219 static void rockchip_pcie_ep_clear_bar(struct pci_epc *epc, u8 fn, u8 vfn, in rockchip_pcie_ep_clear_bar() argument 222 struct rockchip_pcie_ep *ep = epc_get_drvdata(epc); in rockchip_pcie_ep_clear_bar() 253 static u64 rockchip_pcie_ep_align_addr(struct pci_epc *epc, u64 pci_addr, in rockchip_pcie_ep_align_addr() argument 256 struct rockchip_pcie_ep *ep = epc_get_drvdata(epc); in rockchip_pcie_ep_align_addr() 275 static int rockchip_pcie_ep_map_addr(struct pci_epc *epc, u8 fn, u8 vfn, in rockchip_pcie_ep_map_addr() argument [all …]
|
| H A D | pcie-rcar-ep.c | 159 static int rcar_pcie_ep_write_header(struct pci_epc *epc, u8 fn, u8 vfn, in rcar_pcie_ep_write_header() argument 162 struct rcar_pcie_endpoint *ep = epc_get_drvdata(epc); in rcar_pcie_ep_write_header() 195 static int rcar_pcie_ep_set_bar(struct pci_epc *epc, u8 func_no, u8 vfunc_no, in rcar_pcie_ep_set_bar() argument 199 struct rcar_pcie_endpoint *ep = epc_get_drvdata(epc); in rcar_pcie_ep_set_bar() 246 static void rcar_pcie_ep_clear_bar(struct pci_epc *epc, u8 fn, u8 vfn, in rcar_pcie_ep_clear_bar() argument 249 struct rcar_pcie_endpoint *ep = epc_get_drvdata(epc); in rcar_pcie_ep_clear_bar() 259 static int rcar_pcie_ep_set_msi(struct pci_epc *epc, u8 fn, u8 vfn, u8 nr_irqs) in rcar_pcie_ep_set_msi() argument 261 struct rcar_pcie_endpoint *ep = epc_get_drvdata(epc); in rcar_pcie_ep_set_msi() 273 static int rcar_pcie_ep_get_msi(struct pci_epc *epc, u8 fn, u8 vfn) in rcar_pcie_ep_get_msi() argument 275 struct rcar_pcie_endpoint *ep = epc_get_drvdata(epc); in rcar_pcie_ep_get_msi() [all …]
|
| /linux/arch/riscv/kernel/ |
| H A D | traps_misaligned.c | 146 static inline int get_insn(struct pt_regs *regs, ulong epc, ulong *r_insn) in get_insn() argument 150 if (epc & 0x2) { in get_insn() 153 if (__read_insn(regs, insn, epc, u16)) in get_insn() 164 epc += sizeof(u16); in get_insn() 165 if (__read_insn(regs, tmp, epc, u16)) in get_insn() 171 if (__read_insn(regs, insn, epc, u32)) in get_insn() 196 unsigned long epc = regs->epc; in handle_vector_misaligned_load() local 199 if (get_insn(regs, epc, &insn)) in handle_vector_misaligned_load() 205 regs->epc = epc + INSN_LEN(insn); in handle_vector_misaligned_load() 210 regs->epc = epc; in handle_vector_misaligned_load() [all …]
|
| H A D | cfi.c | 38 if (get_kernel_nofault(insn, (void *)regs->epc - 4)) in decode_cfi_insn() 45 if (get_kernel_nofault(insn, (void *)regs->epc) || in decode_cfi_insn() 46 get_kernel_nofault(insn, (void *)regs->epc + GET_INSN_LENGTH(insn))) in decode_cfi_insn() 70 if (!is_cfi_trap(regs->epc)) in handle_cfi_failure() 74 return report_cfi_failure_noaddr(regs, regs->epc); in handle_cfi_failure() 76 return report_cfi_failure(regs, regs->epc, &target, type); in handle_cfi_failure()
|
| H A D | traps.c | 156 do_trap_error(regs, signo, code, regs->epc, "Oops - " str); \ 161 do_trap_error(regs, signo, code, regs->epc, "Oops - " str); \ 183 do_trap_error(regs, SIGILL, ILL_ILLOPC, regs->epc, in do_trap_insn_illegal() 191 do_trap_error(regs, SIGILL, ILL_ILLOPC, regs->epc, in do_trap_insn_illegal() 231 do_trap_error(regs, SIGBUS, BUS_ADRALN, regs->epc, in do_trap_misaligned() 294 force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->epc); in handle_break() 300 else if (report_bug(regs->epc, regs) == BUG_TRAP_TYPE_WARN || in handle_break() 302 regs->epc += get_break_insn_length(regs->epc); in handle_break() 332 regs->epc += 4; in do_trap_ecall_u() 361 do_trap_error(regs, SIGILL, ILL_ILLTRP, regs->epc, in do_trap_ecall_u()
|
| H A D | signal.c | 269 frame, (void *)regs->epc, (void *)regs->sp); in SYSCALL_DEFINE0() 385 regs->epc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame() 394 (void *)regs->epc, (void *)regs->ra, frame); in setup_rt_frame() 425 continue_addr = regs->epc; in arch_do_signal_or_restart() 442 regs->epc = restart_addr; in arch_do_signal_or_restart() 457 if (regs->epc == restart_addr && in arch_do_signal_or_restart() 463 regs->epc = continue_addr; in arch_do_signal_or_restart() 475 if (syscall && regs->epc == restart_addr && retval == -ERESTART_RESTARTBLOCK) in arch_do_signal_or_restart()
|
| H A D | kgdb.c | 39 unsigned long pc = regs->epc; in get_step_address() 201 {DBG_REG_EPC, GDB_SIZEOF_REG, offsetof(struct pt_regs, epc)}, 254 regs->epc = pc; in kgdb_arch_set_pc() 282 regs->epc = addr; in kgdb_arch_update_addr() 332 type = kgdb_riscv_kgdbbreak(regs->epc); in kgdb_riscv_notify() 343 regs->epc += 4; in kgdb_riscv_notify()
|
| H A D | stacktrace.c | 83 if (regs && (regs->epc == pc) && fp_is_valid(frame->ra, sp)) { in walk_stackframe() 97 pc = ((struct pt_regs *)sp)->epc; in walk_stackframe() 220 if (!consume_entry(cookie, regs->epc)) in arch_stack_walk_user()
|
| /linux/arch/mips/kvm/ |
| H A D | emulate.c | 46 long epc = instpc; in kvm_compute_return_epc() local 50 if (epc & 3) { in kvm_compute_return_epc() 56 err = kvm_get_badinstrp((u32 *)epc, vcpu, &insn.word); in kvm_compute_return_epc() 65 arch->gprs[insn.r_format.rd] = epc + 8; in kvm_compute_return_epc() 85 epc = epc + 4 + (insn.i_format.simmediate << 2); in kvm_compute_return_epc() 87 epc += 8; in kvm_compute_return_epc() 88 nextpc = epc; in kvm_compute_return_epc() 94 epc = epc + 4 + (insn.i_format.simmediate << 2); in kvm_compute_return_epc() 96 epc += 8; in kvm_compute_return_epc() 97 nextpc = epc; in kvm_compute_return_epc() [all …]
|
| /linux/arch/riscv/include/asm/ |
| H A D | ftrace.h | 128 unsigned long epc; member 161 return arch_ftrace_regs(fregs)->epc; in ftrace_regs_get_instruction_pointer() 167 arch_ftrace_regs(fregs)->epc = pc; in ftrace_regs_set_instruction_pointer() 206 arch_ftrace_regs(fregs)->epc = arch_ftrace_regs(fregs)->ra; in ftrace_override_function_with_return() 215 regs->epc = afregs->epc; in ftrace_partial_regs()
|
| H A D | ptrace.h | 16 unsigned long epc; member 74 return regs->epc; in instruction_pointer() 79 regs->epc = val; in instruction_pointer_set()
|
| /linux/arch/riscv/mm/ |
| H A D | extable.c | 26 regs->epc = get_ex_fixup(ex); in ex_handler_fixup() 57 regs->epc = get_ex_fixup(ex); in ex_handler_uaccess_err_zero() 78 regs->epc = get_ex_fixup(ex); in ex_handler_load_unaligned_zeropad() 86 ex = search_exception_tables(regs->epc); in fixup_exception()
|
| /linux/arch/csky/kernel/ |
| H A D | atomic.S | 21 mfcr a3, epc 53 mtcr a3, epc
|
| /linux/tools/testing/selftests/kvm/riscv/ |
| H A D | ebreak_test.c | 32 WRITE_ONCE(sw_bp_addr, regs->epc); in guest_breakpoint_handler() 33 regs->epc += 4; in guest_breakpoint_handler()
|
| /linux/include/uapi/linux/ |
| H A D | zorro.h | 36 #define ZORRO_ID(manuf, prod, epc) \ argument 37 ((ZORRO_MANUF_##manuf << 16) | ((prod) << 8) | (epc))
|