Lines Matching refs:nvdimm
174 static int xlat_nvdimm_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd, in xlat_nvdimm_status() argument
177 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in xlat_nvdimm_status()
211 static int xlat_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd, in xlat_status() argument
214 if (!nvdimm) in xlat_status()
216 return xlat_nvdimm_status(nvdimm, buf, cmd, status); in xlat_status()
397 static bool payload_dumpable(struct nvdimm *nvdimm, unsigned int func) in payload_dumpable() argument
399 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in payload_dumpable()
438 int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, in acpi_nfit_ctl() argument
442 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()
509 in_buf.buffer.length += nd_cmd_in_size(nvdimm, cmd, desc, in acpi_nfit_ctl()
520 if (payload_dumpable(nvdimm, func)) in acpi_nfit_ctl()
526 if (nvdimm && cmd == ND_CMD_GET_CONFIG_SIZE in acpi_nfit_ctl()
529 else if (nvdimm && cmd == ND_CMD_GET_CONFIG_DATA in acpi_nfit_ctl()
534 } else if (nvdimm && cmd == ND_CMD_SET_CONFIG_DATA in acpi_nfit_ctl()
543 if (nvdimm) in acpi_nfit_ctl()
587 u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf, in acpi_nfit_ctl()
612 if (i >= 1 && ((!nvdimm && cmd >= ND_CMD_ARS_CAP in acpi_nfit_ctl()
614 || (nvdimm && cmd >= ND_CMD_SMART in acpi_nfit_ctl()
626 *cmd_rc = xlat_status(nvdimm, buf, cmd, in acpi_nfit_ctl()
637 *cmd_rc = xlat_status(nvdimm, buf, cmd, fw_status); in acpi_nfit_ctl()
1414 struct nvdimm *nvdimm = to_nvdimm(dev); in to_nfit_memdev() local
1415 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in to_nfit_memdev()
1422 struct nvdimm *nvdimm = to_nvdimm(dev); in to_nfit_dcr() local
1423 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in to_nfit_dcr()
1501 static int num_nvdimm_formats(struct nvdimm *nvdimm) in num_nvdimm_formats() argument
1503 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in num_nvdimm_formats()
1530 struct nvdimm *nvdimm = to_nvdimm(dev); in format1_show() local
1533 nfit_mem = nvdimm_provider_data(nvdimm); in format1_show()
1566 struct nvdimm *nvdimm = to_nvdimm(dev); in formats_show() local
1568 return sprintf(buf, "%d\n", num_nvdimm_formats(nvdimm)); in formats_show()
1584 struct nvdimm *nvdimm = to_nvdimm(dev); in family_show() local
1585 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in family_show()
1596 struct nvdimm *nvdimm = to_nvdimm(dev); in dsm_mask_show() local
1597 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in dsm_mask_show()
1608 struct nvdimm *nvdimm = to_nvdimm(dev); in flags_show() local
1609 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in flags_show()
1629 struct nvdimm *nvdimm = to_nvdimm(dev); in id_show() local
1630 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in id_show()
1639 struct nvdimm *nvdimm = to_nvdimm(dev); in dirty_shutdown_show() local
1640 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in dirty_shutdown_show()
1671 struct nvdimm *nvdimm = to_nvdimm(dev); in acpi_nfit_dimm_attr_visible() local
1672 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_dimm_attr_visible()
1684 if (a == &dev_attr_format1.attr && num_nvdimm_formats(nvdimm) <= 1) in acpi_nfit_dimm_attr_visible()
1707 static struct nvdimm *acpi_nfit_dimm_by_handle(struct acpi_nfit_desc *acpi_desc, in acpi_nfit_dimm_by_handle()
1714 return nfit_mem->nvdimm; in acpi_nfit_dimm_by_handle()
2016 struct nvdimm *nvdimm; in acpi_nfit_register_dimms() local
2026 nvdimm = acpi_nfit_dimm_by_handle(acpi_desc, device_handle); in acpi_nfit_register_dimms()
2027 if (nvdimm) { in acpi_nfit_register_dimms()
2082 nvdimm = __nvdimm_create(acpi_desc->nvdimm_bus, nfit_mem, in acpi_nfit_register_dimms()
2087 if (!nvdimm) in acpi_nfit_register_dimms()
2090 nfit_mem->nvdimm = nvdimm; in acpi_nfit_register_dimms()
2097 nvdimm_name(nvdimm), in acpi_nfit_register_dimms()
2117 nvdimm = nfit_mem->nvdimm; in acpi_nfit_register_dimms()
2118 if (!nvdimm) in acpi_nfit_register_dimms()
2121 nfit_kernfs = sysfs_get_dirent(nvdimm_kobj(nvdimm)->sd, "nfit"); in acpi_nfit_register_dimms()
2128 nvdimm_name(nvdimm)); in acpi_nfit_register_dimms()
2314 struct nvdimm *nvdimm = mapping->nvdimm; in acpi_nfit_init_interleave_set() local
2315 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_init_interleave_set()
2357 struct nvdimm *nvdimm = mapping->nvdimm; in acpi_nfit_init_interleave_set() local
2358 struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_init_interleave_set()
2526 struct nvdimm *nvdimm, struct nfit_blk *nfit_blk) in acpi_nfit_blk_get_flags() argument
2532 rc = nd_desc->ndctl(nd_desc, nvdimm, ND_CMD_DIMM_FLAGS, &flags, in acpi_nfit_blk_get_flags()
2555 struct nvdimm *nvdimm; in acpi_nfit_blk_region_enable() local
2558 nvdimm = nd_blk_region_to_dimm(ndbr); in acpi_nfit_blk_region_enable()
2559 nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_blk_region_enable()
2581 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2592 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2604 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2615 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2619 rc = acpi_nfit_blk_get_flags(nd_desc, nvdimm, nfit_blk); in acpi_nfit_blk_region_enable()
2622 nvdimm_name(nvdimm)); in acpi_nfit_blk_region_enable()
2858 struct nvdimm *nvdimm = acpi_nfit_dimm_by_handle(acpi_desc, in acpi_nfit_init_mapping() local
2865 if (!nvdimm) { in acpi_nfit_init_mapping()
2871 mapping->nvdimm = nvdimm; in acpi_nfit_init_mapping()
2879 nfit_mem = nvdimm_provider_data(nvdimm); in acpi_nfit_init_mapping()
2882 spa->range_index, nvdimm_name(nvdimm)); in acpi_nfit_init_mapping()
3471 struct nvdimm *nvdimm, unsigned int cmd) in __acpi_nfit_clear_to_send() argument
3475 if (nvdimm) in __acpi_nfit_clear_to_send()
3494 struct nvdimm *nvdimm, unsigned int cmd, void *buf) in acpi_nfit_clear_to_send() argument
3499 if (nvdimm && cmd == ND_CMD_CALL && in acpi_nfit_clear_to_send()
3506 return __acpi_nfit_clear_to_send(nd_desc, nvdimm, cmd); in acpi_nfit_clear_to_send()