Lines Matching refs:nvdimm
186 static int xlat_nvdimm_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd, in xlat_nvdimm_status() argument
189 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in xlat_nvdimm_status()
223 static int xlat_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd, in xlat_status() argument
226 if (!nvdimm) in xlat_status()
228 return xlat_nvdimm_status(nvdimm, buf, cmd, status); in xlat_status()
393 static bool payload_dumpable(struct nvdimm *nvdimm, unsigned int func) in payload_dumpable() argument
395 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in payload_dumpable()
435 int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, in acpi_nfit_ctl() argument
439 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_ctl()
461 if (nvdimm) { in acpi_nfit_ctl()
467 dimm_name = nvdimm_name(nvdimm); in acpi_nfit_ctl()
469 cmd_mask = nvdimm_cmd_mask(nvdimm); in acpi_nfit_ctl()
516 in_buf.buffer.length += nd_cmd_in_size(nvdimm, cmd, desc, in acpi_nfit_ctl()
527 if (payload_dumpable(nvdimm, func)) in acpi_nfit_ctl()
533 if (nvdimm && cmd == ND_CMD_GET_CONFIG_SIZE in acpi_nfit_ctl()
536 else if (nvdimm && cmd == ND_CMD_GET_CONFIG_DATA in acpi_nfit_ctl()
541 } else if (nvdimm && cmd == ND_CMD_SET_CONFIG_DATA in acpi_nfit_ctl()
550 if (nvdimm) in acpi_nfit_ctl()
594 u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf, in acpi_nfit_ctl()
619 if (i >= 1 && ((!nvdimm && cmd >= ND_CMD_ARS_CAP in acpi_nfit_ctl()
621 || (nvdimm && cmd >= ND_CMD_SMART in acpi_nfit_ctl()
633 *cmd_rc = xlat_status(nvdimm, buf, cmd, in acpi_nfit_ctl()
644 *cmd_rc = xlat_status(nvdimm, buf, cmd, fw_status); in acpi_nfit_ctl()
1426 struct nvdimm *nvdimm = to_nvdimm(dev); in to_nfit_memdev() local
1427 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in to_nfit_memdev()
1434 struct nvdimm *nvdimm = to_nvdimm(dev); in to_nfit_dcr() local
1435 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in to_nfit_dcr()
1513 static int num_nvdimm_formats(struct nvdimm *nvdimm) in num_nvdimm_formats() argument
1515 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in num_nvdimm_formats()
1542 struct nvdimm *nvdimm = to_nvdimm(dev); in format1_show() local
1545 nfit_mem = nvdimm_provider_data(nvdimm); in format1_show()
1578 struct nvdimm *nvdimm = to_nvdimm(dev); in formats_show() local
1580 return sprintf(buf, "%d\n", num_nvdimm_formats(nvdimm)); in formats_show()
1596 struct nvdimm *nvdimm = to_nvdimm(dev); in family_show() local
1597 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in family_show()
1608 struct nvdimm *nvdimm = to_nvdimm(dev); in dsm_mask_show() local
1609 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in dsm_mask_show()
1620 struct nvdimm *nvdimm = to_nvdimm(dev); in flags_show() local
1621 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in flags_show()
1641 struct nvdimm *nvdimm = to_nvdimm(dev); in id_show() local
1642 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in id_show()
1651 struct nvdimm *nvdimm = to_nvdimm(dev); in dirty_shutdown_show() local
1652 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in dirty_shutdown_show()
1683 struct nvdimm *nvdimm = to_nvdimm(dev); in acpi_nfit_dimm_attr_visible() local
1684 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_dimm_attr_visible()
1696 if (a == &dev_attr_format1.attr && num_nvdimm_formats(nvdimm) <= 1) in acpi_nfit_dimm_attr_visible()
1717 static struct nvdimm *acpi_nfit_dimm_by_handle(struct acpi_nfit_desc *acpi_desc, in acpi_nfit_dimm_by_handle()
1724 return nfit_mem->nvdimm; in acpi_nfit_dimm_by_handle()
2051 struct nvdimm *nvdimm; in acpi_nfit_register_dimms() local
2061 nvdimm = acpi_nfit_dimm_by_handle(acpi_desc, device_handle); in acpi_nfit_register_dimms()
2062 if (nvdimm) { in acpi_nfit_register_dimms()
2119 nvdimm = __nvdimm_create(acpi_desc->nvdimm_bus, nfit_mem, in acpi_nfit_register_dimms()
2125 if (!nvdimm) in acpi_nfit_register_dimms()
2128 nfit_mem->nvdimm = nvdimm; in acpi_nfit_register_dimms()
2135 nvdimm_name(nvdimm), in acpi_nfit_register_dimms()
2155 nvdimm = nfit_mem->nvdimm; in acpi_nfit_register_dimms()
2156 if (!nvdimm) in acpi_nfit_register_dimms()
2159 nfit_kernfs = sysfs_get_dirent(nvdimm_kobj(nvdimm)->sd, "nfit"); in acpi_nfit_register_dimms()
2166 nvdimm_name(nvdimm)); in acpi_nfit_register_dimms()
2371 struct nvdimm *nvdimm = mapping->nvdimm; in acpi_nfit_init_interleave_set() local
2372 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_init_interleave_set()
2414 struct nvdimm *nvdimm = mapping->nvdimm; in acpi_nfit_init_interleave_set() local
2415 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_init_interleave_set()
2583 struct nvdimm *nvdimm, struct nfit_blk *nfit_blk) in acpi_nfit_blk_get_flags() argument
2589 rc = nd_desc->ndctl(nd_desc, nvdimm, ND_CMD_DIMM_FLAGS, &flags, in acpi_nfit_blk_get_flags()
2612 struct nvdimm *nvdimm; in acpi_nfit_blk_region_enable() local
2615 nvdimm = nd_blk_region_to_dimm(ndbr); in acpi_nfit_blk_region_enable()
2616 nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_blk_region_enable()
2638 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2649 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2661 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2672 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2676 rc = acpi_nfit_blk_get_flags(nd_desc, nvdimm, nfit_blk); in acpi_nfit_blk_region_enable()
2679 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2915 struct nvdimm *nvdimm = acpi_nfit_dimm_by_handle(acpi_desc, in acpi_nfit_init_mapping() local
2922 if (!nvdimm) { in acpi_nfit_init_mapping()
2928 mapping->nvdimm = nvdimm; in acpi_nfit_init_mapping()
2936 nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_init_mapping()
2939 spa->range_index, nvdimm_name(nvdimm)); in acpi_nfit_init_mapping()
3535 struct nvdimm *nvdimm, unsigned int cmd) in __acpi_nfit_clear_to_send() argument
3539 if (nvdimm) in __acpi_nfit_clear_to_send()
3561 struct nvdimm *nvdimm, unsigned int cmd, void *buf) in acpi_nfit_clear_to_send() argument
3566 if (nvdimm && cmd == ND_CMD_CALL && in acpi_nfit_clear_to_send()
3575 if (!nvdimm && cmd == ND_CMD_CALL && in acpi_nfit_clear_to_send()
3579 return __acpi_nfit_clear_to_send(nd_desc, nvdimm, cmd); in acpi_nfit_clear_to_send()