Lines Matching full:l2c

1494 /*---------------------- L2C driver ---------------------------------*/
1838 struct thunderx_l2c *l2c = container_of(msix, struct thunderx_l2c, in thunderx_l2c_threaded_isr() local
1841 unsigned long tail = ring_pos(l2c->ring_tail, ARRAY_SIZE(l2c->err_ctx)); in thunderx_l2c_threaded_isr()
1842 struct l2c_err_ctx *ctx = &l2c->err_ctx[tail]; in thunderx_l2c_threaded_isr()
1858 switch (l2c->pdev->device) { in thunderx_l2c_threaded_isr()
1878 dev_err(&l2c->pdev->dev, "Unsupported device: %04x\n", in thunderx_l2c_threaded_isr()
1879 l2c->pdev->device); in thunderx_l2c_threaded_isr()
1883 while (CIRC_CNT(l2c->ring_head, l2c->ring_tail, in thunderx_l2c_threaded_isr()
1884 ARRAY_SIZE(l2c->err_ctx))) { in thunderx_l2c_threaded_isr()
1887 l2c->edac_dev->ctl_name, reg_int_name, ctx->reg_int, in thunderx_l2c_threaded_isr()
1895 edac_device_handle_ue(l2c->edac_dev, 0, 0, msg); in thunderx_l2c_threaded_isr()
1897 edac_device_handle_ce(l2c->edac_dev, 0, 0, msg); in thunderx_l2c_threaded_isr()
1899 l2c->ring_tail++; in thunderx_l2c_threaded_isr()
1911 #define L2C_DEBUGFS_ATTR(_name, _reg) DEBUGFS_REG_ATTR(l2c, _name, _reg)
1941 struct thunderx_l2c *l2c; in thunderx_l2c_probe() local
1969 fmt = "L2C-TAD%d"; in thunderx_l2c_probe()
1977 fmt = "L2C-CBC%d"; in thunderx_l2c_probe()
1985 fmt = "L2C-MCI%d"; in thunderx_l2c_probe()
2000 name, 1, "L2C", 1, 0, idx); in thunderx_l2c_probe()
2006 l2c = edac_dev->pvt_info; in thunderx_l2c_probe()
2007 l2c->edac_dev = edac_dev; in thunderx_l2c_probe()
2009 l2c->regs = pcim_iomap_table(pdev)[0]; in thunderx_l2c_probe()
2010 if (!l2c->regs) { in thunderx_l2c_probe()
2016 l2c->pdev = pdev; in thunderx_l2c_probe()
2018 l2c->ring_head = 0; in thunderx_l2c_probe()
2019 l2c->ring_tail = 0; in thunderx_l2c_probe()
2021 l2c->msix_ent.entry = 0; in thunderx_l2c_probe()
2022 l2c->msix_ent.vector = 0; in thunderx_l2c_probe()
2024 ret = pci_enable_msix_exact(pdev, &l2c->msix_ent, 1); in thunderx_l2c_probe()
2030 ret = devm_request_threaded_irq(&pdev->dev, l2c->msix_ent.vector, in thunderx_l2c_probe()
2033 0, "[EDAC] ThunderX L2C", in thunderx_l2c_probe()
2034 &l2c->msix_ent); in thunderx_l2c_probe()
2040 edac_dev->mod_name = "thunderx-l2c"; in thunderx_l2c_probe()
2041 edac_dev->ctl_name = "thunderx-l2c"; in thunderx_l2c_probe()
2050 l2c->debugfs = edac_debugfs_create_dir(pdev->dev.kobj.name); in thunderx_l2c_probe()
2052 ret = thunderx_create_debugfs_nodes(l2c->debugfs, l2c_devattr, in thunderx_l2c_probe()
2053 l2c, dfs_entries); in thunderx_l2c_probe()
2063 writeq(reg_en_mask, l2c->regs + reg_en_offs); in thunderx_l2c_probe()
2076 struct thunderx_l2c *l2c = edac_dev->pvt_info; in thunderx_l2c_remove() local
2080 writeq(L2C_TAD_INT_ENA_ALL, l2c->regs + L2C_TAD_INT_ENA_W1C); in thunderx_l2c_remove()
2083 writeq(L2C_CBC_INT_ENA_ALL, l2c->regs + L2C_CBC_INT_ENA_W1C); in thunderx_l2c_remove()
2086 writeq(L2C_MCI_INT_ENA_ALL, l2c->regs + L2C_MCI_INT_ENA_W1C); in thunderx_l2c_remove()
2090 edac_debugfs_remove_recursive(l2c->debugfs); in thunderx_l2c_remove()