Lines Matching refs:nvdimm
187 static int xlat_nvdimm_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd, in xlat_nvdimm_status() argument
190 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in xlat_nvdimm_status()
224 static int xlat_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd, in xlat_status() argument
227 if (!nvdimm) in xlat_status()
229 return xlat_nvdimm_status(nvdimm, buf, cmd, status); in xlat_status()
395 static bool payload_dumpable(struct nvdimm *nvdimm, unsigned int func) in payload_dumpable() argument
397 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in payload_dumpable()
437 int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, in acpi_nfit_ctl() argument
441 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_ctl()
463 if (nvdimm) { in acpi_nfit_ctl()
469 dimm_name = nvdimm_name(nvdimm); in acpi_nfit_ctl()
471 cmd_mask = nvdimm_cmd_mask(nvdimm); in acpi_nfit_ctl()
521 in_buf.buffer.length += nd_cmd_in_size(nvdimm, cmd, desc, in acpi_nfit_ctl()
532 if (payload_dumpable(nvdimm, func)) in acpi_nfit_ctl()
538 if (nvdimm && cmd == ND_CMD_GET_CONFIG_SIZE in acpi_nfit_ctl()
541 else if (nvdimm && cmd == ND_CMD_GET_CONFIG_DATA in acpi_nfit_ctl()
546 } else if (nvdimm && cmd == ND_CMD_SET_CONFIG_DATA in acpi_nfit_ctl()
555 if (nvdimm) in acpi_nfit_ctl()
599 u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf, in acpi_nfit_ctl()
624 if (i >= 1 && ((!nvdimm && cmd >= ND_CMD_ARS_CAP in acpi_nfit_ctl()
626 || (nvdimm && cmd >= ND_CMD_SMART in acpi_nfit_ctl()
638 *cmd_rc = xlat_status(nvdimm, buf, cmd, in acpi_nfit_ctl()
649 *cmd_rc = xlat_status(nvdimm, buf, cmd, fw_status); in acpi_nfit_ctl()
1366 struct nvdimm *nvdimm = to_nvdimm(dev); in to_nfit_memdev() local
1367 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in to_nfit_memdev()
1374 struct nvdimm *nvdimm = to_nvdimm(dev); in to_nfit_dcr() local
1375 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in to_nfit_dcr()
1453 static int num_nvdimm_formats(struct nvdimm *nvdimm) in num_nvdimm_formats() argument
1455 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in num_nvdimm_formats()
1480 struct nvdimm *nvdimm = to_nvdimm(dev); in format1_show() local
1483 nfit_mem = nvdimm_provider_data(nvdimm); in format1_show()
1516 struct nvdimm *nvdimm = to_nvdimm(dev); in formats_show() local
1518 return sprintf(buf, "%d\n", num_nvdimm_formats(nvdimm)); in formats_show()
1534 struct nvdimm *nvdimm = to_nvdimm(dev); in family_show() local
1535 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in family_show()
1546 struct nvdimm *nvdimm = to_nvdimm(dev); in dsm_mask_show() local
1547 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in dsm_mask_show()
1558 struct nvdimm *nvdimm = to_nvdimm(dev); in flags_show() local
1559 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in flags_show()
1579 struct nvdimm *nvdimm = to_nvdimm(dev); in id_show() local
1580 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in id_show()
1589 struct nvdimm *nvdimm = to_nvdimm(dev); in dirty_shutdown_show() local
1590 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in dirty_shutdown_show()
1621 struct nvdimm *nvdimm = to_nvdimm(dev); in acpi_nfit_dimm_attr_visible() local
1622 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_dimm_attr_visible()
1634 if (a == &dev_attr_format1.attr && num_nvdimm_formats(nvdimm) <= 1) in acpi_nfit_dimm_attr_visible()
1655 static struct nvdimm *acpi_nfit_dimm_by_handle(struct acpi_nfit_desc *acpi_desc, in acpi_nfit_dimm_by_handle()
1662 return nfit_mem->nvdimm; in acpi_nfit_dimm_by_handle()
1989 struct nvdimm *nvdimm; in acpi_nfit_register_dimms() local
1999 nvdimm = acpi_nfit_dimm_by_handle(acpi_desc, device_handle); in acpi_nfit_register_dimms()
2000 if (nvdimm) { in acpi_nfit_register_dimms()
2048 nvdimm = __nvdimm_create(acpi_desc->nvdimm_bus, nfit_mem, in acpi_nfit_register_dimms()
2054 if (!nvdimm) in acpi_nfit_register_dimms()
2057 nfit_mem->nvdimm = nvdimm; in acpi_nfit_register_dimms()
2064 nvdimm_name(nvdimm), in acpi_nfit_register_dimms()
2084 nvdimm = nfit_mem->nvdimm; in acpi_nfit_register_dimms()
2085 if (!nvdimm) in acpi_nfit_register_dimms()
2088 nfit_kernfs = sysfs_get_dirent(nvdimm_kobj(nvdimm)->sd, "nfit"); in acpi_nfit_register_dimms()
2095 nvdimm_name(nvdimm)); in acpi_nfit_register_dimms()
2282 struct nvdimm *nvdimm = mapping->nvdimm; in acpi_nfit_init_interleave_set() local
2283 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_init_interleave_set()
2324 struct nvdimm *nvdimm = mapping->nvdimm; in acpi_nfit_init_interleave_set() local
2325 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_init_interleave_set()
2559 struct nvdimm *nvdimm = acpi_nfit_dimm_by_handle(acpi_desc, in acpi_nfit_init_mapping() local
2563 if (!nvdimm) { in acpi_nfit_init_mapping()
2569 mapping->nvdimm = nvdimm; in acpi_nfit_init_mapping()
3166 struct nvdimm *nvdimm, unsigned int cmd) in __acpi_nfit_clear_to_send() argument
3170 if (nvdimm) in __acpi_nfit_clear_to_send()
3192 struct nvdimm *nvdimm, unsigned int cmd, void *buf) in acpi_nfit_clear_to_send() argument
3197 if (nvdimm && cmd == ND_CMD_CALL && in acpi_nfit_clear_to_send()
3206 if (!nvdimm && cmd == ND_CMD_CALL && in acpi_nfit_clear_to_send()
3210 return __acpi_nfit_clear_to_send(nd_desc, nvdimm, cmd); in acpi_nfit_clear_to_send()