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()
385 if (!csrow->channels[idx]->dimm->nr_pages) in csrow_dev_is_visible()
421 nr_pages += csrow->channels[chan]->dimm->nr_pages; in nr_pages_per_csrow()
500 struct dimm_info *dimm = to_dimm(dev); in dimmdev_location_show() local
503 count = edac_dimm_info_location(dimm, data, PAGE_SIZE); in dimmdev_location_show()
512 struct dimm_info *dimm = to_dimm(dev); in dimmdev_label_show() local
515 if (!dimm->label[0]) in dimmdev_label_show()
518 return snprintf(data, sizeof(dimm->label) + 1, "%s\n", dimm->label); in dimmdev_label_show()
526 struct dimm_info *dimm = to_dimm(dev); in dimmdev_label_store() local
535 if (copy_count == 0 || copy_count >= sizeof(dimm->label)) in dimmdev_label_store()
538 strncpy(dimm->label, data, copy_count); in dimmdev_label_store()
539 dimm->label[copy_count] = '\0'; in dimmdev_label_store()
547 struct dimm_info *dimm = to_dimm(dev); in dimmdev_size_show() local
549 return sprintf(data, "%u\n", PAGES_TO_MiB(dimm->nr_pages)); in dimmdev_size_show()
555 struct dimm_info *dimm = to_dimm(dev); in dimmdev_mem_type_show() local
557 return sprintf(data, "%s\n", edac_mem_types[dimm->mtype]); in dimmdev_mem_type_show()
563 struct dimm_info *dimm = to_dimm(dev); in dimmdev_dev_type_show() local
565 return sprintf(data, "%s\n", dev_types[dimm->dtype]); in dimmdev_dev_type_show()
572 struct dimm_info *dimm = to_dimm(dev); in dimmdev_edac_mode_show() local
574 return sprintf(data, "%s\n", edac_caps[dimm->edac_mode]); in dimmdev_edac_mode_show()
581 struct dimm_info *dimm = to_dimm(dev); in dimmdev_ce_count_show() local
583 return sprintf(data, "%u\n", dimm->ce_count); in dimmdev_ce_count_show()
590 struct dimm_info *dimm = to_dimm(dev); in dimmdev_ue_count_show() local
592 return sprintf(data, "%u\n", dimm->ue_count); in dimmdev_ue_count_show()
642 struct dimm_info *dimm) in edac_create_dimm_object() argument
645 dimm->mci = mci; in edac_create_dimm_object()
647 dimm->dev.type = &dimm_attr_type; in edac_create_dimm_object()
648 dimm->dev.release = dimm_release; in edac_create_dimm_object()
649 device_initialize(&dimm->dev); in edac_create_dimm_object()
651 dimm->dev.parent = &mci->dev; in edac_create_dimm_object()
653 dev_set_name(&dimm->dev, "rank%d", dimm->idx); in edac_create_dimm_object()
655 dev_set_name(&dimm->dev, "dimm%d", dimm->idx); in edac_create_dimm_object()
656 dev_set_drvdata(&dimm->dev, dimm); in edac_create_dimm_object()
659 err = device_add(&dimm->dev); in edac_create_dimm_object()
661 edac_dbg(1, "failure: create device %s\n", dev_name(&dimm->dev)); in edac_create_dimm_object()
662 put_device(&dimm->dev); in edac_create_dimm_object()
669 edac_dimm_info_location(dimm, location, sizeof(location)); in edac_create_dimm_object()
671 dev_name(&dimm->dev), location); in edac_create_dimm_object()
688 struct dimm_info *dimm; in mci_reset_counters_store() local
706 mci_for_each_dimm(mci, dimm) { in mci_reset_counters_store()
707 dimm->ue_count = 0; in mci_reset_counters_store()
708 dimm->ce_count = 0; in mci_reset_counters_store()
830 struct dimm_info *dimm = csrow->channels[j]->dimm; in mci_size_mb_show() local
832 total_pages += dimm->nr_pages; in mci_size_mb_show()
936 struct dimm_info *dimm; in edac_create_sysfs_mci_device() local
959 mci_for_each_dimm(mci, dimm) { in edac_create_sysfs_mci_device()
961 if (!dimm->nr_pages) in edac_create_sysfs_mci_device()
964 err = edac_create_dimm_object(mci, dimm); in edac_create_sysfs_mci_device()
989 struct dimm_info *dimm; in edac_remove_sysfs_mci_device() local
1003 mci_for_each_dimm(mci, dimm) { in edac_remove_sysfs_mci_device()
1004 if (!device_is_registered(&dimm->dev)) in edac_remove_sysfs_mci_device()
1006 edac_dbg(1, "unregistering device %s\n", dev_name(&dimm->dev)); in edac_remove_sysfs_mci_device()
1007 device_unregister(&dimm->dev); in edac_remove_sysfs_mci_device()