Lines Matching refs:dimm

168 		nr_pages += csrow->channels[i]->dimm->nr_pages;  in csrow_size_show()
177 return sprintf(data, "%s\n", edac_mem_types[csrow->channels[0]->dimm->mtype]); in csrow_mem_type_show()
185 return sprintf(data, "%s\n", dev_types[csrow->channels[0]->dimm->dtype]); in csrow_dev_type_show()
194 return sprintf(data, "%s\n", edac_caps[csrow->channels[0]->dimm->edac_mode]); in csrow_edac_mode_show()
207 if (!rank->dimm->label[0]) in channel_dimm_label_show()
210 return snprintf(data, sizeof(rank->dimm->label) + 1, "%s\n", in channel_dimm_label_show()
211 rank->dimm->label); in channel_dimm_label_show()
229 if (copy_count == 0 || copy_count >= sizeof(rank->dimm->label)) in channel_dimm_label_store()
232 strncpy(rank->dimm->label, data, copy_count); in channel_dimm_label_store()
233 rank->dimm->label[copy_count] = '\0'; in channel_dimm_label_store()
370 if (!csrow->channels[idx]->dimm->nr_pages) in csrow_dev_is_visible()
398 nr_pages += csrow->channels[chan]->dimm->nr_pages; in nr_pages_per_csrow()
477 struct dimm_info *dimm = to_dimm(dev); in dimmdev_location_show() local
479 return edac_dimm_info_location(dimm, data, PAGE_SIZE); in dimmdev_location_show()
485 struct dimm_info *dimm = to_dimm(dev); in dimmdev_label_show() local
488 if (!dimm->label[0]) in dimmdev_label_show()
491 return snprintf(data, sizeof(dimm->label) + 1, "%s\n", dimm->label); in dimmdev_label_show()
499 struct dimm_info *dimm = to_dimm(dev); in dimmdev_label_store() local
508 if (copy_count == 0 || copy_count >= sizeof(dimm->label)) in dimmdev_label_store()
511 strncpy(dimm->label, data, copy_count); in dimmdev_label_store()
512 dimm->label[copy_count] = '\0'; in dimmdev_label_store()
520 struct dimm_info *dimm = to_dimm(dev); in dimmdev_size_show() local
522 return sprintf(data, "%u\n", PAGES_TO_MiB(dimm->nr_pages)); in dimmdev_size_show()
528 struct dimm_info *dimm = to_dimm(dev); in dimmdev_mem_type_show() local
530 return sprintf(data, "%s\n", edac_mem_types[dimm->mtype]); in dimmdev_mem_type_show()
536 struct dimm_info *dimm = to_dimm(dev); in dimmdev_dev_type_show() local
538 return sprintf(data, "%s\n", dev_types[dimm->dtype]); in dimmdev_dev_type_show()
545 struct dimm_info *dimm = to_dimm(dev); in dimmdev_edac_mode_show() local
547 return sprintf(data, "%s\n", edac_caps[dimm->edac_mode]); in dimmdev_edac_mode_show()
554 struct dimm_info *dimm = to_dimm(dev); in dimmdev_ce_count_show() local
558 off = EDAC_DIMM_OFF(dimm->mci->layers, in dimmdev_ce_count_show()
559 dimm->mci->n_layers, in dimmdev_ce_count_show()
560 dimm->location[0], in dimmdev_ce_count_show()
561 dimm->location[1], in dimmdev_ce_count_show()
562 dimm->location[2]); in dimmdev_ce_count_show()
563 count = dimm->mci->ce_per_layer[dimm->mci->n_layers-1][off]; in dimmdev_ce_count_show()
571 struct dimm_info *dimm = to_dimm(dev); in dimmdev_ue_count_show() local
575 off = EDAC_DIMM_OFF(dimm->mci->layers, in dimmdev_ue_count_show()
576 dimm->mci->n_layers, in dimmdev_ue_count_show()
577 dimm->location[0], in dimmdev_ue_count_show()
578 dimm->location[1], in dimmdev_ue_count_show()
579 dimm->location[2]); in dimmdev_ue_count_show()
580 count = dimm->mci->ue_per_layer[dimm->mci->n_layers-1][off]; in dimmdev_ue_count_show()
619 struct dimm_info *dimm = container_of(dev, struct dimm_info, dev); in dimm_attr_release() local
622 kfree(dimm); in dimm_attr_release()
632 struct dimm_info *dimm, in edac_create_dimm_object() argument
636 dimm->mci = mci; in edac_create_dimm_object()
638 dimm->dev.type = &dimm_attr_type; in edac_create_dimm_object()
639 dimm->dev.bus = mci->bus; in edac_create_dimm_object()
640 device_initialize(&dimm->dev); in edac_create_dimm_object()
642 dimm->dev.parent = &mci->dev; in edac_create_dimm_object()
644 dev_set_name(&dimm->dev, "rank%d", index); in edac_create_dimm_object()
646 dev_set_name(&dimm->dev, "dimm%d", index); in edac_create_dimm_object()
647 dev_set_drvdata(&dimm->dev, dimm); in edac_create_dimm_object()
650 err = device_add(&dimm->dev); in edac_create_dimm_object()
652 edac_dbg(0, "creating rank/dimm device %s\n", dev_name(&dimm->dev)); in edac_create_dimm_object()
810 struct dimm_info *dimm = csrow->channels[j]->dimm; in mci_size_mb_show() local
812 total_pages += dimm->nr_pages; in mci_size_mb_show()
960 struct dimm_info *dimm = mci->dimms[i]; in edac_create_sysfs_mci_device() local
962 if (!dimm->nr_pages) in edac_create_sysfs_mci_device()
972 dimm->location[lay]); in edac_create_sysfs_mci_device()
976 err = edac_create_dimm_object(mci, dimm, i); in edac_create_sysfs_mci_device()
994 struct dimm_info *dimm = mci->dimms[i]; in edac_create_sysfs_mci_device() local
995 if (!dimm->nr_pages) in edac_create_sysfs_mci_device()
998 device_unregister(&dimm->dev); in edac_create_sysfs_mci_device()
1025 struct dimm_info *dimm = mci->dimms[i]; in edac_remove_sysfs_mci_device() local
1026 if (dimm->nr_pages == 0) in edac_remove_sysfs_mci_device()
1028 edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev)); in edac_remove_sysfs_mci_device()
1029 device_unregister(&dimm->dev); in edac_remove_sysfs_mci_device()