Lines Matching refs:ocx

1078 	struct thunderx_ocx *ocx = container_of(msix, struct thunderx_ocx,  in thunderx_ocx_com_isr()  local
1082 unsigned long head = ring_pos(ocx->com_ring_head, in thunderx_ocx_com_isr()
1083 ARRAY_SIZE(ocx->com_err_ctx)); in thunderx_ocx_com_isr()
1084 struct ocx_com_err_ctx *ctx = &ocx->com_err_ctx[head]; in thunderx_ocx_com_isr()
1086 ctx->reg_com_int = readq(ocx->regs + OCX_COM_INT); in thunderx_ocx_com_isr()
1090 readq(ocx->regs + OCX_LNE_INT(lane)); in thunderx_ocx_com_isr()
1092 readq(ocx->regs + OCX_LNE_STAT(lane, 11)); in thunderx_ocx_com_isr()
1094 writeq(ctx->reg_lane_int[lane], ocx->regs + OCX_LNE_INT(lane)); in thunderx_ocx_com_isr()
1097 writeq(ctx->reg_com_int, ocx->regs + OCX_COM_INT); in thunderx_ocx_com_isr()
1099 ocx->com_ring_head++; in thunderx_ocx_com_isr()
1107 struct thunderx_ocx *ocx = container_of(msix, struct thunderx_ocx, in thunderx_ocx_com_threaded_isr() local
1124 while (CIRC_CNT(ocx->com_ring_head, ocx->com_ring_tail, in thunderx_ocx_com_threaded_isr()
1125 ARRAY_SIZE(ocx->com_err_ctx))) { in thunderx_ocx_com_threaded_isr()
1126 tail = ring_pos(ocx->com_ring_tail, in thunderx_ocx_com_threaded_isr()
1127 ARRAY_SIZE(ocx->com_err_ctx)); in thunderx_ocx_com_threaded_isr()
1128 ctx = &ocx->com_err_ctx[tail]; in thunderx_ocx_com_threaded_isr()
1131 ocx->edac_dev->ctl_name, ctx->reg_com_int); in thunderx_ocx_com_threaded_isr()
1154 edac_device_handle_ce(ocx->edac_dev, 0, 0, msg); in thunderx_ocx_com_threaded_isr()
1156 ocx->com_ring_tail++; in thunderx_ocx_com_threaded_isr()
1171 struct thunderx_ocx *ocx = container_of(msix, struct thunderx_ocx, in thunderx_ocx_lnk_isr() local
1173 unsigned long head = ring_pos(ocx->link_ring_head, in thunderx_ocx_lnk_isr()
1174 ARRAY_SIZE(ocx->link_err_ctx)); in thunderx_ocx_lnk_isr()
1175 struct ocx_link_err_ctx *ctx = &ocx->link_err_ctx[head]; in thunderx_ocx_lnk_isr()
1178 ctx->reg_com_link_int = readq(ocx->regs + OCX_COM_LINKX_INT(ctx->link)); in thunderx_ocx_lnk_isr()
1180 writeq(ctx->reg_com_link_int, ocx->regs + OCX_COM_LINKX_INT(ctx->link)); in thunderx_ocx_lnk_isr()
1182 ocx->link_ring_head++; in thunderx_ocx_lnk_isr()
1190 struct thunderx_ocx *ocx = container_of(msix, struct thunderx_ocx, in thunderx_ocx_lnk_threaded_isr() local
1205 while (CIRC_CNT(ocx->link_ring_head, ocx->link_ring_tail, in thunderx_ocx_lnk_threaded_isr()
1206 ARRAY_SIZE(ocx->link_err_ctx))) { in thunderx_ocx_lnk_threaded_isr()
1207 tail = ring_pos(ocx->link_ring_head, in thunderx_ocx_lnk_threaded_isr()
1208 ARRAY_SIZE(ocx->link_err_ctx)); in thunderx_ocx_lnk_threaded_isr()
1210 ctx = &ocx->link_err_ctx[tail]; in thunderx_ocx_lnk_threaded_isr()
1214 ocx->edac_dev->ctl_name, in thunderx_ocx_lnk_threaded_isr()
1223 edac_device_handle_ue(ocx->edac_dev, 0, 0, msg); in thunderx_ocx_lnk_threaded_isr()
1225 edac_device_handle_ce(ocx->edac_dev, 0, 0, msg); in thunderx_ocx_lnk_threaded_isr()
1227 ocx->link_ring_tail++; in thunderx_ocx_lnk_threaded_isr()
1238 #define OCX_DEBUGFS_ATTR(_name, _reg) DEBUGFS_REG_ATTR(ocx, _name, _reg)
1327 static void thunderx_ocx_clearstats(struct thunderx_ocx *ocx) in thunderx_ocx_clearstats() argument
1332 cfg = readq(ocx->regs + OCX_LNE_CFG(lane)); in thunderx_ocx_clearstats()
1335 writeq(cfg, ocx->regs + OCX_LNE_CFG(lane)); in thunderx_ocx_clearstats()
1338 readq(ocx->regs + OCX_LNE_STAT(lane, stat)); in thunderx_ocx_clearstats()
1345 struct thunderx_ocx *ocx; in thunderx_ocx_probe() local
1374 ocx = edac_dev->pvt_info; in thunderx_ocx_probe()
1375 ocx->edac_dev = edac_dev; in thunderx_ocx_probe()
1376 ocx->com_ring_head = 0; in thunderx_ocx_probe()
1377 ocx->com_ring_tail = 0; in thunderx_ocx_probe()
1378 ocx->link_ring_head = 0; in thunderx_ocx_probe()
1379 ocx->link_ring_tail = 0; in thunderx_ocx_probe()
1381 ocx->regs = pcim_iomap_table(pdev)[0]; in thunderx_ocx_probe()
1382 if (!ocx->regs) { in thunderx_ocx_probe()
1388 ocx->pdev = pdev; in thunderx_ocx_probe()
1391 ocx->msix_ent[i].entry = i; in thunderx_ocx_probe()
1392 ocx->msix_ent[i].vector = 0; in thunderx_ocx_probe()
1395 ret = pci_enable_msix_exact(pdev, ocx->msix_ent, OCX_INTS); in thunderx_ocx_probe()
1403 ocx->msix_ent[i].vector, in thunderx_ocx_probe()
1411 &ocx->msix_ent[i]); in thunderx_ocx_probe()
1428 ocx->debugfs = edac_debugfs_create_dir(pdev->dev.kobj.name); in thunderx_ocx_probe()
1430 ret = thunderx_create_debugfs_nodes(ocx->debugfs, in thunderx_ocx_probe()
1432 ocx, in thunderx_ocx_probe()
1442 thunderx_ocx_clearstats(ocx); in thunderx_ocx_probe()
1446 ocx->regs + OCX_LNE_INT_EN(i)); in thunderx_ocx_probe()
1448 reg = readq(ocx->regs + OCX_LNE_INT(i)); in thunderx_ocx_probe()
1449 writeq(reg, ocx->regs + OCX_LNE_INT(i)); in thunderx_ocx_probe()
1454 reg = readq(ocx->regs + OCX_COM_LINKX_INT(i)); in thunderx_ocx_probe()
1455 writeq(reg, ocx->regs + OCX_COM_LINKX_INT(i)); in thunderx_ocx_probe()
1458 ocx->regs + OCX_COM_LINKX_INT_ENA_W1S(i)); in thunderx_ocx_probe()
1461 reg = readq(ocx->regs + OCX_COM_INT); in thunderx_ocx_probe()
1462 writeq(reg, ocx->regs + OCX_COM_INT); in thunderx_ocx_probe()
1464 writeq(OCX_COM_INT_ENA_ALL, ocx->regs + OCX_COM_INT_ENA_W1S); in thunderx_ocx_probe()
1476 struct thunderx_ocx *ocx = edac_dev->pvt_info; in thunderx_ocx_remove() local
1479 writeq(OCX_COM_INT_ENA_ALL, ocx->regs + OCX_COM_INT_ENA_W1C); in thunderx_ocx_remove()
1483 ocx->regs + OCX_COM_LINKX_INT_ENA_W1C(i)); in thunderx_ocx_remove()
1486 edac_debugfs_remove_recursive(ocx->debugfs); in thunderx_ocx_remove()