Lines Matching refs:imc
92 } imc[NUM_IMC]; member
97 struct skx_imc *imc; member
104 int imc; member
231 d->imc[i].chan[m->mtype].cdev = pdev; in get_all_munits()
352 struct skx_imc *imc, int chan, int dimmno) in get_dimm_info() argument
368 imc->mc, chan, dimmno, size, npages, in get_dimm_info()
371 imc->chan[chan].dimms[dimmno].close_pg = GET_BITFIELD(mtr, 0, 0); in get_dimm_info()
372 imc->chan[chan].dimms[dimmno].bank_xor_enable = GET_BITFIELD(mtr, 9, 9); in get_dimm_info()
373 imc->chan[chan].dimms[dimmno].fine_grain_bank = GET_BITFIELD(amap, 0, 0); in get_dimm_info()
374 imc->chan[chan].dimms[dimmno].rowbits = rows; in get_dimm_info()
375 imc->chan[chan].dimms[dimmno].colbits = cols; in get_dimm_info()
383 imc->src_id, imc->lmc, chan, dimmno); in get_dimm_info()
388 static int get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc, in get_nvdimm_info() argument
396 dev_handle = ACPI_NFIT_BUILD_DEVICE_HANDLE(dimmno, chan, imc->lmc, in get_nvdimm_info()
397 imc->src_id, 0); in get_nvdimm_info()
428 imc->mc, chan, dimmno, size >> 20, dimm->nr_pages); in get_nvdimm_info()
431 imc->src_id, imc->lmc, chan, dimmno); in get_nvdimm_info()
451 struct skx_imc *imc = pvt->imc; in skx_get_dimm_config() local
459 pci_read_config_dword(imc->chan[i].cdev, 0x8C, &amap); in skx_get_dimm_config()
460 pci_read_config_dword(imc->chan[i].cdev, 0x400, &mcddrtcfg); in skx_get_dimm_config()
464 pci_read_config_dword(imc->chan[i].cdev, in skx_get_dimm_config()
467 ndimms += get_dimm_info(mtr, amap, dimm, imc, i, j); in skx_get_dimm_config()
469 ndimms += get_nvdimm_info(dimm, imc, i, j); in skx_get_dimm_config()
471 if (ndimms && !skx_check_ecc(imc->chan[0].cdev)) { in skx_get_dimm_config()
472 skx_printk(KERN_ERR, "ECC is disabled on imc %d\n", imc->mc); in skx_get_dimm_config()
480 static void skx_unregister_mci(struct skx_imc *imc) in skx_unregister_mci() argument
482 struct mem_ctl_info *mci = imc->mci; in skx_unregister_mci()
487 edac_dbg(0, "MC%d: mci = %p\n", imc->mc, mci); in skx_unregister_mci()
497 static int skx_register_mci(struct skx_imc *imc) in skx_register_mci() argument
501 struct pci_dev *pdev = imc->chan[0].cdev; in skx_register_mci()
512 mci = edac_mc_alloc(imc->mc, ARRAY_SIZE(layers), layers, in skx_register_mci()
518 edac_dbg(0, "MC#%d: mci = %p\n", imc->mc, mci); in skx_register_mci()
521 imc->mci = mci; in skx_register_mci()
523 pvt->imc = imc; in skx_register_mci()
526 imc->node_id, imc->lmc); in skx_register_mci()
536 mci->dev_name = pci_name(imc->chan[0].cdev); in skx_register_mci()
559 imc->mci = NULL; in skx_register_mci()
638 if (d->imc[0].src_id == SKX_ILV_TARGET(tgt)) in skx_sad_decode()
681 res->socket = d->imc[0].src_id; in skx_sad_decode()
682 res->imc = GET_BITFIELD(d->mcroute, lchan * 3, lchan * 3 + 2); in skx_sad_decode()
686 res->addr, res->socket, res->imc, res->channel); in skx_sad_decode()
693 pci_read_config_dword((d)->imc[mc].chan[0].cdev, 0x850 + 4 * (i), ®)
695 pci_read_config_dword((d)->imc[mc].chan[0].cdev, 0x880 + 4 * (i), ®)
697 pci_read_config_dword((d)->imc[mc].chan[ch].cdev, 0x90 + 4 * (i), ®)
727 SKX_GET_TADBASE(res->dev, res->imc, i, base); in skx_tad_decode()
728 SKX_GET_TADWAYNESS(res->dev, res->imc, i, wayness); in skx_tad_decode()
741 SKX_GET_TADCHNILVOFFSET(res->dev, res->imc, res->channel, i, chnilvoffset); in skx_tad_decode()
768 pci_read_config_dword((d)->imc[mc].chan[ch].cdev, \
771 pci_read_config_dword((d)->imc[mc].chan[ch].cdev, \
787 if (res->dev->imc[res->imc].chan[res->channel].dimms[0].close_pg) in skx_rir_decode()
793 SKX_GET_RIRWAYNESS(res->dev, res->imc, res->channel, i, rirway); in skx_rir_decode()
814 SKX_GET_RIRILV(res->dev, res->imc, res->channel, idx, i, rirlv); in skx_rir_decode()
864 struct skx_dimm *dimm = &r->dev->imc[r->imc].chan[r->channel].dimms[r->dimm]; in skx_mad_decode()
1015 res->socket, res->imc, res->rank, in skx_mce_output_error()
1045 mci = res.dev->imc[res.imc].mci; in skx_mce_check_error()
1085 skx_unregister_mci(&d->imc[i]); in skx_remove()
1087 pci_dev_put(d->imc[i].chan[j].cdev); in skx_remove()
1150 d->imc[i].mc = mc++; in skx_init()
1151 d->imc[i].lmc = i; in skx_init()
1152 d->imc[i].src_id = src_id; in skx_init()
1153 d->imc[i].node_id = node_id; in skx_init()
1154 rc = skx_register_mci(&d->imc[i]); in skx_init()