nvdimm             38 arch/powerpc/platforms/pseries/papr_scm.c 	struct nvdimm *nvdimm;
nvdimm            248 arch/powerpc/platforms/pseries/papr_scm.c int papr_scm_ndctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
nvdimm            255 arch/powerpc/platforms/pseries/papr_scm.c 	if (!nvdimm)
nvdimm            258 arch/powerpc/platforms/pseries/papr_scm.c 	p = nvdimm_provider_data(nvdimm);
nvdimm            352 arch/powerpc/platforms/pseries/papr_scm.c 	p->nvdimm = nvdimm_create(p->bus, p, papr_scm_dimm_groups,
nvdimm            354 arch/powerpc/platforms/pseries/papr_scm.c 	if (!p->nvdimm) {
nvdimm            365 arch/powerpc/platforms/pseries/papr_scm.c 	mapping.nvdimm = p->nvdimm;
nvdimm            174 drivers/acpi/nfit/core.c static int xlat_nvdimm_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd,
nvdimm            177 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            211 drivers/acpi/nfit/core.c static int xlat_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd,
nvdimm            214 drivers/acpi/nfit/core.c 	if (!nvdimm)
nvdimm            216 drivers/acpi/nfit/core.c 	return xlat_nvdimm_status(nvdimm, buf, cmd, status);
nvdimm            397 drivers/acpi/nfit/core.c static bool payload_dumpable(struct nvdimm *nvdimm, unsigned int func)
nvdimm            399 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            438 drivers/acpi/nfit/core.c int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
nvdimm            442 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            463 drivers/acpi/nfit/core.c 	if (nvdimm) {
nvdimm            469 drivers/acpi/nfit/core.c 		dimm_name = nvdimm_name(nvdimm);
nvdimm            471 drivers/acpi/nfit/core.c 		cmd_mask = nvdimm_cmd_mask(nvdimm);
nvdimm            510 drivers/acpi/nfit/core.c 		in_buf.buffer.length += nd_cmd_in_size(nvdimm, cmd, desc,
nvdimm            521 drivers/acpi/nfit/core.c 	if (payload_dumpable(nvdimm, func))
nvdimm            527 drivers/acpi/nfit/core.c 	if (nvdimm && cmd == ND_CMD_GET_CONFIG_SIZE
nvdimm            530 drivers/acpi/nfit/core.c 	else if (nvdimm && cmd == ND_CMD_GET_CONFIG_DATA
nvdimm            535 drivers/acpi/nfit/core.c 	} else if (nvdimm && cmd == ND_CMD_SET_CONFIG_DATA
nvdimm            544 drivers/acpi/nfit/core.c 		if (nvdimm)
nvdimm            588 drivers/acpi/nfit/core.c 		u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf,
nvdimm            613 drivers/acpi/nfit/core.c 	if (i >= 1 && ((!nvdimm && cmd >= ND_CMD_ARS_CAP
nvdimm            615 drivers/acpi/nfit/core.c 				|| (nvdimm && cmd >= ND_CMD_SMART
nvdimm            627 drivers/acpi/nfit/core.c 				*cmd_rc = xlat_status(nvdimm, buf, cmd,
nvdimm            638 drivers/acpi/nfit/core.c 			*cmd_rc = xlat_status(nvdimm, buf, cmd, fw_status);
nvdimm           1415 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1416 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1423 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1424 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1502 drivers/acpi/nfit/core.c static int num_nvdimm_formats(struct nvdimm *nvdimm)
nvdimm           1504 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1531 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1534 drivers/acpi/nfit/core.c 	nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1567 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1569 drivers/acpi/nfit/core.c 	return sprintf(buf, "%d\n", num_nvdimm_formats(nvdimm));
nvdimm           1585 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1586 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1597 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1598 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1609 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1610 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1630 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1631 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1640 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1641 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1672 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1673 drivers/acpi/nfit/core.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1685 drivers/acpi/nfit/core.c 	if (a == &dev_attr_format1.attr && num_nvdimm_formats(nvdimm) <= 1)
nvdimm           1708 drivers/acpi/nfit/core.c static struct nvdimm *acpi_nfit_dimm_by_handle(struct acpi_nfit_desc *acpi_desc,
nvdimm           1715 drivers/acpi/nfit/core.c 			return nfit_mem->nvdimm;
nvdimm           2017 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm;
nvdimm           2027 drivers/acpi/nfit/core.c 		nvdimm = acpi_nfit_dimm_by_handle(acpi_desc, device_handle);
nvdimm           2028 drivers/acpi/nfit/core.c 		if (nvdimm) {
nvdimm           2083 drivers/acpi/nfit/core.c 		nvdimm = __nvdimm_create(acpi_desc->nvdimm_bus, nfit_mem,
nvdimm           2088 drivers/acpi/nfit/core.c 		if (!nvdimm)
nvdimm           2091 drivers/acpi/nfit/core.c 		nfit_mem->nvdimm = nvdimm;
nvdimm           2098 drivers/acpi/nfit/core.c 				nvdimm_name(nvdimm),
nvdimm           2118 drivers/acpi/nfit/core.c 		nvdimm = nfit_mem->nvdimm;
nvdimm           2119 drivers/acpi/nfit/core.c 		if (!nvdimm)
nvdimm           2122 drivers/acpi/nfit/core.c 		nfit_kernfs = sysfs_get_dirent(nvdimm_kobj(nvdimm)->sd, "nfit");
nvdimm           2129 drivers/acpi/nfit/core.c 					nvdimm_name(nvdimm));
nvdimm           2315 drivers/acpi/nfit/core.c 		struct nvdimm *nvdimm = mapping->nvdimm;
nvdimm           2316 drivers/acpi/nfit/core.c 		struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           2358 drivers/acpi/nfit/core.c 			struct nvdimm *nvdimm = mapping->nvdimm;
nvdimm           2359 drivers/acpi/nfit/core.c 			struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           2527 drivers/acpi/nfit/core.c 		struct nvdimm *nvdimm, struct nfit_blk *nfit_blk)
nvdimm           2533 drivers/acpi/nfit/core.c 	rc = nd_desc->ndctl(nd_desc, nvdimm, ND_CMD_DIMM_FLAGS, &flags,
nvdimm           2556 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm;
nvdimm           2559 drivers/acpi/nfit/core.c 	nvdimm = nd_blk_region_to_dimm(ndbr);
nvdimm           2560 drivers/acpi/nfit/core.c 	nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           2582 drivers/acpi/nfit/core.c 				nvdimm_name(nvdimm));
nvdimm           2593 drivers/acpi/nfit/core.c 				nvdimm_name(nvdimm));
nvdimm           2605 drivers/acpi/nfit/core.c 				nvdimm_name(nvdimm));
nvdimm           2616 drivers/acpi/nfit/core.c 				nvdimm_name(nvdimm));
nvdimm           2620 drivers/acpi/nfit/core.c 	rc = acpi_nfit_blk_get_flags(nd_desc, nvdimm, nfit_blk);
nvdimm           2623 drivers/acpi/nfit/core.c 				nvdimm_name(nvdimm));
nvdimm           2859 drivers/acpi/nfit/core.c 	struct nvdimm *nvdimm = acpi_nfit_dimm_by_handle(acpi_desc,
nvdimm           2866 drivers/acpi/nfit/core.c 	if (!nvdimm) {
nvdimm           2872 drivers/acpi/nfit/core.c 	mapping->nvdimm = nvdimm;
nvdimm           2880 drivers/acpi/nfit/core.c 		nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           2883 drivers/acpi/nfit/core.c 					spa->range_index, nvdimm_name(nvdimm));
nvdimm           3472 drivers/acpi/nfit/core.c 		struct nvdimm *nvdimm, unsigned int cmd)
nvdimm           3476 drivers/acpi/nfit/core.c 	if (nvdimm)
nvdimm           3495 drivers/acpi/nfit/core.c 		struct nvdimm *nvdimm, unsigned int cmd, void *buf)
nvdimm           3500 drivers/acpi/nfit/core.c 	if (nvdimm && cmd == ND_CMD_CALL &&
nvdimm           3508 drivers/acpi/nfit/core.c 	return __acpi_nfit_clear_to_send(nd_desc, nvdimm, cmd);
nvdimm             10 drivers/acpi/nfit/intel.c static unsigned long intel_security_flags(struct nvdimm *nvdimm,
nvdimm             13 drivers/acpi/nfit/intel.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm             38 drivers/acpi/nfit/intel.c 	if (nvdimm_in_overwrite(nvdimm) && ptype == NVDIMM_USER)
nvdimm             41 drivers/acpi/nfit/intel.c 	rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL);
nvdimm             44 drivers/acpi/nfit/intel.c 				nvdimm_name(nvdimm), rc, nd_cmd.cmd.status);
nvdimm             77 drivers/acpi/nfit/intel.c static int intel_security_freeze(struct nvdimm *nvdimm)
nvdimm             79 drivers/acpi/nfit/intel.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm             96 drivers/acpi/nfit/intel.c 	rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL);
nvdimm            104 drivers/acpi/nfit/intel.c static int intel_security_change_key(struct nvdimm *nvdimm,
nvdimm            109 drivers/acpi/nfit/intel.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            134 drivers/acpi/nfit/intel.c 	rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL);
nvdimm            153 drivers/acpi/nfit/intel.c static int __maybe_unused intel_security_unlock(struct nvdimm *nvdimm,
nvdimm            156 drivers/acpi/nfit/intel.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            176 drivers/acpi/nfit/intel.c 	rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL);
nvdimm            194 drivers/acpi/nfit/intel.c static int intel_security_disable(struct nvdimm *nvdimm,
nvdimm            198 drivers/acpi/nfit/intel.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            217 drivers/acpi/nfit/intel.c 	rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL);
nvdimm            234 drivers/acpi/nfit/intel.c static int __maybe_unused intel_security_erase(struct nvdimm *nvdimm,
nvdimm            239 drivers/acpi/nfit/intel.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            262 drivers/acpi/nfit/intel.c 	rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL);
nvdimm            283 drivers/acpi/nfit/intel.c static int __maybe_unused intel_security_query_overwrite(struct nvdimm *nvdimm)
nvdimm            286 drivers/acpi/nfit/intel.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            302 drivers/acpi/nfit/intel.c 	rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL);
nvdimm            320 drivers/acpi/nfit/intel.c static int __maybe_unused intel_security_overwrite(struct nvdimm *nvdimm,
nvdimm            324 drivers/acpi/nfit/intel.c 	struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm            345 drivers/acpi/nfit/intel.c 	rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL);
nvdimm            187 drivers/acpi/nfit/nfit.h 	struct nvdimm *nvdimm;
nvdimm            345 drivers/acpi/nfit/nfit.h int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
nvdimm            331 drivers/nvdimm/bus.c struct nvdimm_bus *nvdimm_to_bus(struct nvdimm *nvdimm)
nvdimm            333 drivers/nvdimm/bus.c 	return to_nvdimm_bus(nvdimm->dev.parent);
nvdimm            396 drivers/nvdimm/bus.c 		struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            401 drivers/nvdimm/bus.c 		set_bit(NVDIMM_SECURITY_FROZEN, &nvdimm->sec.flags);
nvdimm            402 drivers/nvdimm/bus.c 		if (test_and_clear_bit(NDD_WORK_PENDING, &nvdimm->flags))
nvdimm            405 drivers/nvdimm/bus.c 		cancel_delayed_work_sync(&nvdimm->dwork);
nvdimm            818 drivers/nvdimm/bus.c u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd,
nvdimm            827 drivers/nvdimm/bus.c 	if (nvdimm && cmd == ND_CMD_SET_CONFIG_DATA && idx == 2) {
nvdimm            831 drivers/nvdimm/bus.c 	} else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) {
nvdimm            845 drivers/nvdimm/bus.c u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd,
nvdimm            855 drivers/nvdimm/bus.c 	if (nvdimm && cmd == ND_CMD_GET_CONFIG_DATA && idx == 1)
nvdimm            857 drivers/nvdimm/bus.c 	else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2)
nvdimm            859 drivers/nvdimm/bus.c 	else if (!nvdimm && cmd == ND_CMD_ARS_STATUS && idx == 2) {
nvdimm            951 drivers/nvdimm/bus.c 		struct nvdimm *nvdimm, unsigned int cmd, void *data)
nvdimm            957 drivers/nvdimm/bus.c 		int rc = nd_desc->clear_to_send(nd_desc, nvdimm, cmd, data);
nvdimm            964 drivers/nvdimm/bus.c 	if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR)
nvdimm            968 drivers/nvdimm/bus.c 	if (!nvdimm || cmd != ND_CMD_SET_CONFIG_DATA)
nvdimm            973 drivers/nvdimm/bus.c 	if (atomic_read(&nvdimm->busy))
nvdimm            978 drivers/nvdimm/bus.c static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm,
nvdimm            996 drivers/nvdimm/bus.c 	if (nvdimm) {
nvdimm            999 drivers/nvdimm/bus.c 		cmd_mask = nvdimm->cmd_mask;
nvdimm           1000 drivers/nvdimm/bus.c 		dimm_name = dev_name(&nvdimm->dev);
nvdimm           1028 drivers/nvdimm/bus.c 					nvdimm ? nvdimm_cmd_name(cmd)
nvdimm           1042 drivers/nvdimm/bus.c 		in_size = nd_cmd_in_size(nvdimm, cmd, desc, i, in_env);
nvdimm           1075 drivers/nvdimm/bus.c 		u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i,
nvdimm           1118 drivers/nvdimm/bus.c 	rc = nd_cmd_clear_to_send(nvdimm_bus, nvdimm, func, buf);
nvdimm           1122 drivers/nvdimm/bus.c 	rc = nd_desc->ndctl(nd_desc, nvdimm, cmd, buf, buf_len, &cmd_rc);
nvdimm           1126 drivers/nvdimm/bus.c 	if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR && cmd_rc >= 0) {
nvdimm           1156 drivers/nvdimm/bus.c 		struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm           1158 drivers/nvdimm/bus.c 		return nvdimm->id == id;
nvdimm           1170 drivers/nvdimm/bus.c 	struct nvdimm *nvdimm = NULL;
nvdimm           1183 drivers/nvdimm/bus.c 			nvdimm = to_nvdimm(dev);
nvdimm           1200 drivers/nvdimm/bus.c 	rc = __nd_ioctl(nvdimm_bus, nvdimm, ro, cmd, arg);
nvdimm           1202 drivers/nvdimm/bus.c 	if (nvdimm)
nvdimm           1203 drivers/nvdimm/bus.c 		put_device(&nvdimm->dev);
nvdimm             31 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm             33 drivers/nvdimm/dimm_devs.c 	if (!nvdimm->cmd_mask ||
nvdimm             34 drivers/nvdimm/dimm_devs.c 	    !test_bit(ND_CMD_GET_CONFIG_DATA, &nvdimm->cmd_mask)) {
nvdimm             35 drivers/nvdimm/dimm_devs.c 		if (test_bit(NDD_ALIASING, &nvdimm->flags))
nvdimm            178 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            180 drivers/nvdimm/dimm_devs.c 	set_bit(NDD_ALIASING, &nvdimm->flags);
nvdimm            185 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            187 drivers/nvdimm/dimm_devs.c 	set_bit(NDD_LOCKED, &nvdimm->flags);
nvdimm            192 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            194 drivers/nvdimm/dimm_devs.c 	clear_bit(NDD_LOCKED, &nvdimm->flags);
nvdimm            199 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            201 drivers/nvdimm/dimm_devs.c 	ida_simple_remove(&dimm_ida, nvdimm->id);
nvdimm            202 drivers/nvdimm/dimm_devs.c 	kfree(nvdimm);
nvdimm            215 drivers/nvdimm/dimm_devs.c struct nvdimm *to_nvdimm(struct device *dev)
nvdimm            217 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = container_of(dev, struct nvdimm, dev);
nvdimm            220 drivers/nvdimm/dimm_devs.c 	return nvdimm;
nvdimm            224 drivers/nvdimm/dimm_devs.c struct nvdimm *nd_blk_region_to_dimm(struct nd_blk_region *ndbr)
nvdimm            229 drivers/nvdimm/dimm_devs.c 	return nd_mapping->nvdimm;
nvdimm            242 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm            244 drivers/nvdimm/dimm_devs.c 	WARN_ON_ONCE(!is_nvdimm_bus_locked(&nvdimm->dev));
nvdimm            246 drivers/nvdimm/dimm_devs.c 	return dev_get_drvdata(&nvdimm->dev);
nvdimm            278 drivers/nvdimm/dimm_devs.c const char *nvdimm_name(struct nvdimm *nvdimm)
nvdimm            280 drivers/nvdimm/dimm_devs.c 	return dev_name(&nvdimm->dev);
nvdimm            284 drivers/nvdimm/dimm_devs.c struct kobject *nvdimm_kobj(struct nvdimm *nvdimm)
nvdimm            286 drivers/nvdimm/dimm_devs.c 	return &nvdimm->dev.kobj;
nvdimm            290 drivers/nvdimm/dimm_devs.c unsigned long nvdimm_cmd_mask(struct nvdimm *nvdimm)
nvdimm            292 drivers/nvdimm/dimm_devs.c 	return nvdimm->cmd_mask;
nvdimm            296 drivers/nvdimm/dimm_devs.c void *nvdimm_provider_data(struct nvdimm *nvdimm)
nvdimm            298 drivers/nvdimm/dimm_devs.c 	if (nvdimm)
nvdimm            299 drivers/nvdimm/dimm_devs.c 		return nvdimm->provider_data;
nvdimm            307 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            310 drivers/nvdimm/dimm_devs.c 	if (!nvdimm->cmd_mask)
nvdimm            313 drivers/nvdimm/dimm_devs.c 	for_each_set_bit(cmd, &nvdimm->cmd_mask, BITS_PER_LONG)
nvdimm            323 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            326 drivers/nvdimm/dimm_devs.c 			test_bit(NDD_ALIASING, &nvdimm->flags) ? "alias " : "",
nvdimm            327 drivers/nvdimm/dimm_devs.c 			test_bit(NDD_LOCKED, &nvdimm->flags) ? "lock " : "");
nvdimm            334 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            342 drivers/nvdimm/dimm_devs.c 	return sprintf(buf, "%s\n", atomic_read(&nvdimm->busy)
nvdimm            373 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            375 drivers/nvdimm/dimm_devs.c 	if (test_bit(NVDIMM_SECURITY_DISABLED, &nvdimm->sec.flags))
nvdimm            377 drivers/nvdimm/dimm_devs.c 	if (test_bit(NVDIMM_SECURITY_UNLOCKED, &nvdimm->sec.flags))
nvdimm            379 drivers/nvdimm/dimm_devs.c 	if (test_bit(NVDIMM_SECURITY_LOCKED, &nvdimm->sec.flags))
nvdimm            381 drivers/nvdimm/dimm_devs.c 	if (test_bit(NVDIMM_SECURITY_OVERWRITE, &nvdimm->sec.flags))
nvdimm            389 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            392 drivers/nvdimm/dimm_devs.c 				&nvdimm->sec.flags));
nvdimm            431 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            435 drivers/nvdimm/dimm_devs.c 	if (!nvdimm->sec.flags)
nvdimm            440 drivers/nvdimm/dimm_devs.c 		if (nvdimm->sec.ops->freeze || nvdimm->sec.ops->disable
nvdimm            441 drivers/nvdimm/dimm_devs.c 				|| nvdimm->sec.ops->change_key
nvdimm            442 drivers/nvdimm/dimm_devs.c 				|| nvdimm->sec.ops->erase
nvdimm            443 drivers/nvdimm/dimm_devs.c 				|| nvdimm->sec.ops->overwrite)
nvdimm            448 drivers/nvdimm/dimm_devs.c 	if (nvdimm->sec.ops->freeze)
nvdimm            459 drivers/nvdimm/dimm_devs.c struct nvdimm *__nvdimm_create(struct nvdimm_bus *nvdimm_bus,
nvdimm            465 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = kzalloc(sizeof(*nvdimm), GFP_KERNEL);
nvdimm            468 drivers/nvdimm/dimm_devs.c 	if (!nvdimm)
nvdimm            471 drivers/nvdimm/dimm_devs.c 	nvdimm->id = ida_simple_get(&dimm_ida, 0, 0, GFP_KERNEL);
nvdimm            472 drivers/nvdimm/dimm_devs.c 	if (nvdimm->id < 0) {
nvdimm            473 drivers/nvdimm/dimm_devs.c 		kfree(nvdimm);
nvdimm            477 drivers/nvdimm/dimm_devs.c 	nvdimm->dimm_id = dimm_id;
nvdimm            478 drivers/nvdimm/dimm_devs.c 	nvdimm->provider_data = provider_data;
nvdimm            481 drivers/nvdimm/dimm_devs.c 	nvdimm->flags = flags;
nvdimm            482 drivers/nvdimm/dimm_devs.c 	nvdimm->cmd_mask = cmd_mask;
nvdimm            483 drivers/nvdimm/dimm_devs.c 	nvdimm->num_flush = num_flush;
nvdimm            484 drivers/nvdimm/dimm_devs.c 	nvdimm->flush_wpq = flush_wpq;
nvdimm            485 drivers/nvdimm/dimm_devs.c 	atomic_set(&nvdimm->busy, 0);
nvdimm            486 drivers/nvdimm/dimm_devs.c 	dev = &nvdimm->dev;
nvdimm            487 drivers/nvdimm/dimm_devs.c 	dev_set_name(dev, "nmem%d", nvdimm->id);
nvdimm            490 drivers/nvdimm/dimm_devs.c 	dev->devt = MKDEV(nvdimm_major, nvdimm->id);
nvdimm            492 drivers/nvdimm/dimm_devs.c 	nvdimm->sec.ops = sec_ops;
nvdimm            493 drivers/nvdimm/dimm_devs.c 	nvdimm->sec.overwrite_tmo = 0;
nvdimm            494 drivers/nvdimm/dimm_devs.c 	INIT_DELAYED_WORK(&nvdimm->dwork, nvdimm_security_overwrite_query);
nvdimm            500 drivers/nvdimm/dimm_devs.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_USER);
nvdimm            501 drivers/nvdimm/dimm_devs.c 	nvdimm->sec.ext_flags = nvdimm_security_flags(nvdimm, NVDIMM_MASTER);
nvdimm            504 drivers/nvdimm/dimm_devs.c 	return nvdimm;
nvdimm            510 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = data;
nvdimm            512 drivers/nvdimm/dimm_devs.c 	sysfs_put(nvdimm->sec.overwrite_state);
nvdimm            517 drivers/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            519 drivers/nvdimm/dimm_devs.c 	if (!nvdimm->sec.flags || !nvdimm->sec.ops
nvdimm            520 drivers/nvdimm/dimm_devs.c 			|| !nvdimm->sec.ops->overwrite)
nvdimm            522 drivers/nvdimm/dimm_devs.c 	nvdimm->sec.overwrite_state = sysfs_get_dirent(dev->kobj.sd, "security");
nvdimm            523 drivers/nvdimm/dimm_devs.c 	if (!nvdimm->sec.overwrite_state)
nvdimm            526 drivers/nvdimm/dimm_devs.c 	return devm_add_action_or_reset(dev, shutdown_security_notify, nvdimm);
nvdimm            530 drivers/nvdimm/dimm_devs.c int nvdimm_in_overwrite(struct nvdimm *nvdimm)
nvdimm            532 drivers/nvdimm/dimm_devs.c 	return test_bit(NDD_SECURITY_OVERWRITE, &nvdimm->flags);
nvdimm            536 drivers/nvdimm/dimm_devs.c int nvdimm_security_freeze(struct nvdimm *nvdimm)
nvdimm            540 drivers/nvdimm/dimm_devs.c 	WARN_ON_ONCE(!is_nvdimm_bus_locked(&nvdimm->dev));
nvdimm            542 drivers/nvdimm/dimm_devs.c 	if (!nvdimm->sec.ops || !nvdimm->sec.ops->freeze)
nvdimm            545 drivers/nvdimm/dimm_devs.c 	if (!nvdimm->sec.flags)
nvdimm            548 drivers/nvdimm/dimm_devs.c 	if (test_bit(NDD_SECURITY_OVERWRITE, &nvdimm->flags)) {
nvdimm            549 drivers/nvdimm/dimm_devs.c 		dev_warn(&nvdimm->dev, "Overwrite operation in progress.\n");
nvdimm            553 drivers/nvdimm/dimm_devs.c 	rc = nvdimm->sec.ops->freeze(nvdimm);
nvdimm            554 drivers/nvdimm/dimm_devs.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_USER);
nvdimm            575 drivers/nvdimm/dimm_devs.c 		if (nd_mapping->nvdimm == info->nd_mapping->nvdimm)
nvdimm            685 drivers/nvdimm/dimm_devs.c 	if (__reserve_free_pmem(&nd_region->dev, nd_mapping->nvdimm))
nvdimm            384 drivers/nvdimm/label.c 		struct nvdimm *nvdimm = to_nvdimm(ndd->dev);
nvdimm            399 drivers/nvdimm/label.c 		if (test_bit(NDD_NOBLK, &nvdimm->flags))
nvdimm            799 drivers/nvdimm/namespace_devs.c 	struct nvdimm *nvdimm = data;
nvdimm            817 drivers/nvdimm/namespace_devs.c 		if (nd_mapping->nvdimm != nvdimm)
nvdimm            848 drivers/nvdimm/namespace_devs.c 	struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm            851 drivers/nvdimm/namespace_devs.c 	rc = device_for_each_child(&nvdimm_bus->dev, nvdimm,
nvdimm           1151 drivers/nvdimm/namespace_devs.c 		struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm           1153 drivers/nvdimm/namespace_devs.c 		if (test_bit(NDD_LOCKED, &nvdimm->flags)) {
nvdimm           1154 drivers/nvdimm/namespace_devs.c 			dev_dbg(dev, "%s locked\n", nvdimm_name(nvdimm));
nvdimm           1957 drivers/nvdimm/namespace_devs.c 		struct nvdimm *nvdimm = nd_region->mapping[i].nvdimm;
nvdimm           1965 drivers/nvdimm/namespace_devs.c 				nvdimm_name(nvdimm), nd_label->uuid);
nvdimm           2474 drivers/nvdimm/namespace_devs.c 		struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm           2483 drivers/nvdimm/namespace_devs.c 			atomic_dec(&nvdimm->busy);
nvdimm           2494 drivers/nvdimm/namespace_devs.c 		struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm           2503 drivers/nvdimm/namespace_devs.c 			if (test_bit(NDD_LOCKED, &nvdimm->flags))
nvdimm           2505 drivers/nvdimm/namespace_devs.c 			else if (test_bit(NDD_ALIASING, &nvdimm->flags))
nvdimm           2511 drivers/nvdimm/namespace_devs.c 					dev_name(&nd_mapping->nvdimm->dev),
nvdimm           2512 drivers/nvdimm/namespace_devs.c 					test_bit(NDD_LOCKED, &nvdimm->flags)
nvdimm           2517 drivers/nvdimm/namespace_devs.c 		atomic_inc(&nvdimm->busy);
nvdimm           2531 drivers/nvdimm/namespace_devs.c 			if (test_bit(NDD_NOBLK, &nvdimm->flags)) {
nvdimm             51 drivers/nvdimm/nd-core.h 		struct nvdimm *nvdimm, enum nvdimm_passphrase_type ptype)
nvdimm             59 drivers/nvdimm/nd-core.h 	if (!nvdimm->sec.ops)
nvdimm             62 drivers/nvdimm/nd-core.h 	flags = nvdimm->sec.ops->get_flags(nvdimm, ptype);
nvdimm             64 drivers/nvdimm/nd-core.h 	dev_WARN_ONCE(&nvdimm->dev, hweight64(flags & state_flags) > 1,
nvdimm             69 drivers/nvdimm/nd-core.h int nvdimm_security_freeze(struct nvdimm *nvdimm);
nvdimm            123 drivers/nvdimm/nd.h 	struct nvdimm *nvdimm;
nvdimm            236 drivers/nvdimm/nd.h struct nvdimm;
nvdimm             25 drivers/nvdimm/region_devs.c static int nvdimm_map_flush(struct device *dev, struct nvdimm *nvdimm, int dimm,
nvdimm             30 drivers/nvdimm/region_devs.c 	dev_dbg(dev, "%s: map %d flush address%s\n", nvdimm_name(nvdimm),
nvdimm             31 drivers/nvdimm/region_devs.c 			nvdimm->num_flush, nvdimm->num_flush == 1 ? "" : "es");
nvdimm             33 drivers/nvdimm/region_devs.c 		struct resource *res = &nvdimm->flush_wpq[i];
nvdimm             39 drivers/nvdimm/region_devs.c 			struct resource *res_j = &nvdimm->flush_wpq[j];
nvdimm             72 drivers/nvdimm/region_devs.c 		struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm             74 drivers/nvdimm/region_devs.c 		if (test_bit(NDD_SECURITY_OVERWRITE, &nvdimm->flags)) {
nvdimm             81 drivers/nvdimm/region_devs.c 		num_flush = min_not_zero(num_flush, nvdimm->num_flush);
nvdimm             82 drivers/nvdimm/region_devs.c 		if (!nvdimm->num_flush)
nvdimm             84 drivers/nvdimm/region_devs.c 		flush_data_size += nvdimm->num_flush * sizeof(void *);
nvdimm             99 drivers/nvdimm/region_devs.c 		struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm            100 drivers/nvdimm/region_devs.c 		int rc = nvdimm_map_flush(&nd_region->dev, nvdimm, i, ndrd);
nvdimm            131 drivers/nvdimm/region_devs.c 		struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm            133 drivers/nvdimm/region_devs.c 		put_device(&nvdimm->dev);
nvdimm            232 drivers/nvdimm/region_devs.c 			struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm            234 drivers/nvdimm/region_devs.c 			if (test_bit(NDD_ALIASING, &nvdimm->flags))
nvdimm            755 drivers/nvdimm/region_devs.c 	struct nvdimm *nvdimm;
nvdimm            760 drivers/nvdimm/region_devs.c 	nvdimm = nd_mapping->nvdimm;
nvdimm            762 drivers/nvdimm/region_devs.c 	return sprintf(buf, "%s,%llu,%llu,%d\n", dev_name(&nvdimm->dev),
nvdimm            945 drivers/nvdimm/region_devs.c 		struct nvdimm *nvdimm = mapping->nvdimm;
nvdimm            950 drivers/nvdimm/region_devs.c 				caller, dev_name(&nvdimm->dev), i, PAGE_SIZE);
nvdimm            954 drivers/nvdimm/region_devs.c 		if (test_bit(NDD_UNARMED, &nvdimm->flags))
nvdimm            957 drivers/nvdimm/region_devs.c 		if (test_bit(NDD_NOBLK, &nvdimm->flags)
nvdimm            960 drivers/nvdimm/region_devs.c 					caller, dev_name(&nvdimm->dev), i);
nvdimm           1006 drivers/nvdimm/region_devs.c 		struct nvdimm *nvdimm = mapping->nvdimm;
nvdimm           1008 drivers/nvdimm/region_devs.c 		nd_region->mapping[i].nvdimm = nvdimm;
nvdimm           1015 drivers/nvdimm/region_devs.c 		get_device(&nvdimm->dev);
nvdimm           1147 drivers/nvdimm/region_devs.c 		struct nvdimm *nvdimm = nd_mapping->nvdimm;
nvdimm           1150 drivers/nvdimm/region_devs.c 		if (nvdimm->num_flush)
nvdimm             50 drivers/nvdimm/security.c static struct key *nvdimm_request_key(struct nvdimm *nvdimm)
nvdimm             55 drivers/nvdimm/security.c 	struct device *dev = &nvdimm->dev;
nvdimm             57 drivers/nvdimm/security.c 	sprintf(desc, "%s%s", NVDIMM_PREFIX, nvdimm->dimm_id);
nvdimm             80 drivers/nvdimm/security.c static const void *nvdimm_get_key_payload(struct nvdimm *nvdimm,
nvdimm             83 drivers/nvdimm/security.c 	*key = nvdimm_request_key(nvdimm);
nvdimm             90 drivers/nvdimm/security.c static struct key *nvdimm_lookup_user_key(struct nvdimm *nvdimm,
nvdimm             96 drivers/nvdimm/security.c 	struct device *dev = &nvdimm->dev;
nvdimm            120 drivers/nvdimm/security.c static const void *nvdimm_get_user_key_payload(struct nvdimm *nvdimm,
nvdimm            131 drivers/nvdimm/security.c 	*key = nvdimm_lookup_user_key(nvdimm, id, subclass);
nvdimm            139 drivers/nvdimm/security.c static int nvdimm_key_revalidate(struct nvdimm *nvdimm)
nvdimm            145 drivers/nvdimm/security.c 	if (!nvdimm->sec.ops->change_key)
nvdimm            148 drivers/nvdimm/security.c 	data = nvdimm_get_key_payload(nvdimm, &key);
nvdimm            154 drivers/nvdimm/security.c 	rc = nvdimm->sec.ops->change_key(nvdimm, data, data, NVDIMM_USER);
nvdimm            161 drivers/nvdimm/security.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_USER);
nvdimm            165 drivers/nvdimm/security.c static int __nvdimm_security_unlock(struct nvdimm *nvdimm)
nvdimm            167 drivers/nvdimm/security.c 	struct device *dev = &nvdimm->dev;
nvdimm            176 drivers/nvdimm/security.c 	if (!nvdimm->sec.ops || !nvdimm->sec.ops->unlock
nvdimm            177 drivers/nvdimm/security.c 			|| !nvdimm->sec.flags)
nvdimm            181 drivers/nvdimm/security.c 	if (test_bit(NVDIMM_SECURITY_DISABLED, &nvdimm->sec.flags))
nvdimm            184 drivers/nvdimm/security.c 	if (test_bit(NDD_SECURITY_OVERWRITE, &nvdimm->flags)) {
nvdimm            196 drivers/nvdimm/security.c 	if (test_bit(NVDIMM_SECURITY_UNLOCKED, &nvdimm->sec.flags)) {
nvdimm            200 drivers/nvdimm/security.c 		return nvdimm_key_revalidate(nvdimm);
nvdimm            202 drivers/nvdimm/security.c 		data = nvdimm_get_key_payload(nvdimm, &key);
nvdimm            204 drivers/nvdimm/security.c 	rc = nvdimm->sec.ops->unlock(nvdimm, data);
nvdimm            209 drivers/nvdimm/security.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_USER);
nvdimm            215 drivers/nvdimm/security.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            219 drivers/nvdimm/security.c 	rc = __nvdimm_security_unlock(nvdimm);
nvdimm            224 drivers/nvdimm/security.c static int check_security_state(struct nvdimm *nvdimm)
nvdimm            226 drivers/nvdimm/security.c 	struct device *dev = &nvdimm->dev;
nvdimm            228 drivers/nvdimm/security.c 	if (test_bit(NVDIMM_SECURITY_FROZEN, &nvdimm->sec.flags)) {
nvdimm            230 drivers/nvdimm/security.c 				nvdimm->sec.flags);
nvdimm            234 drivers/nvdimm/security.c 	if (test_bit(NDD_SECURITY_OVERWRITE, &nvdimm->flags)) {
nvdimm            242 drivers/nvdimm/security.c static int security_disable(struct nvdimm *nvdimm, unsigned int keyid)
nvdimm            244 drivers/nvdimm/security.c 	struct device *dev = &nvdimm->dev;
nvdimm            253 drivers/nvdimm/security.c 	if (!nvdimm->sec.ops || !nvdimm->sec.ops->disable
nvdimm            254 drivers/nvdimm/security.c 			|| !nvdimm->sec.flags)
nvdimm            257 drivers/nvdimm/security.c 	rc = check_security_state(nvdimm);
nvdimm            261 drivers/nvdimm/security.c 	data = nvdimm_get_user_key_payload(nvdimm, keyid,
nvdimm            266 drivers/nvdimm/security.c 	rc = nvdimm->sec.ops->disable(nvdimm, data);
nvdimm            271 drivers/nvdimm/security.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_USER);
nvdimm            275 drivers/nvdimm/security.c static int security_update(struct nvdimm *nvdimm, unsigned int keyid,
nvdimm            279 drivers/nvdimm/security.c 	struct device *dev = &nvdimm->dev;
nvdimm            288 drivers/nvdimm/security.c 	if (!nvdimm->sec.ops || !nvdimm->sec.ops->change_key
nvdimm            289 drivers/nvdimm/security.c 			|| !nvdimm->sec.flags)
nvdimm            292 drivers/nvdimm/security.c 	rc = check_security_state(nvdimm);
nvdimm            296 drivers/nvdimm/security.c 	data = nvdimm_get_user_key_payload(nvdimm, keyid,
nvdimm            301 drivers/nvdimm/security.c 	newdata = nvdimm_get_user_key_payload(nvdimm, new_keyid,
nvdimm            308 drivers/nvdimm/security.c 	rc = nvdimm->sec.ops->change_key(nvdimm, data, newdata, pass_type);
nvdimm            317 drivers/nvdimm/security.c 		nvdimm->sec.ext_flags = nvdimm_security_flags(nvdimm,
nvdimm            320 drivers/nvdimm/security.c 		nvdimm->sec.flags = nvdimm_security_flags(nvdimm,
nvdimm            325 drivers/nvdimm/security.c static int security_erase(struct nvdimm *nvdimm, unsigned int keyid,
nvdimm            328 drivers/nvdimm/security.c 	struct device *dev = &nvdimm->dev;
nvdimm            337 drivers/nvdimm/security.c 	if (!nvdimm->sec.ops || !nvdimm->sec.ops->erase
nvdimm            338 drivers/nvdimm/security.c 			|| !nvdimm->sec.flags)
nvdimm            341 drivers/nvdimm/security.c 	rc = check_security_state(nvdimm);
nvdimm            345 drivers/nvdimm/security.c 	if (!test_bit(NVDIMM_SECURITY_UNLOCKED, &nvdimm->sec.ext_flags)
nvdimm            352 drivers/nvdimm/security.c 	data = nvdimm_get_user_key_payload(nvdimm, keyid,
nvdimm            357 drivers/nvdimm/security.c 	rc = nvdimm->sec.ops->erase(nvdimm, data, pass_type);
nvdimm            363 drivers/nvdimm/security.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_USER);
nvdimm            367 drivers/nvdimm/security.c static int security_overwrite(struct nvdimm *nvdimm, unsigned int keyid)
nvdimm            369 drivers/nvdimm/security.c 	struct device *dev = &nvdimm->dev;
nvdimm            378 drivers/nvdimm/security.c 	if (!nvdimm->sec.ops || !nvdimm->sec.ops->overwrite
nvdimm            379 drivers/nvdimm/security.c 			|| !nvdimm->sec.flags)
nvdimm            387 drivers/nvdimm/security.c 	rc = check_security_state(nvdimm);
nvdimm            391 drivers/nvdimm/security.c 	data = nvdimm_get_user_key_payload(nvdimm, keyid,
nvdimm            396 drivers/nvdimm/security.c 	rc = nvdimm->sec.ops->overwrite(nvdimm, data);
nvdimm            402 drivers/nvdimm/security.c 		set_bit(NDD_SECURITY_OVERWRITE, &nvdimm->flags);
nvdimm            403 drivers/nvdimm/security.c 		set_bit(NDD_WORK_PENDING, &nvdimm->flags);
nvdimm            404 drivers/nvdimm/security.c 		set_bit(NVDIMM_SECURITY_OVERWRITE, &nvdimm->sec.flags);
nvdimm            410 drivers/nvdimm/security.c 		queue_delayed_work(system_wq, &nvdimm->dwork, 0);
nvdimm            416 drivers/nvdimm/security.c void __nvdimm_security_overwrite_query(struct nvdimm *nvdimm)
nvdimm            418 drivers/nvdimm/security.c 	struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&nvdimm->dev);
nvdimm            429 drivers/nvdimm/security.c 	if (!test_bit(NDD_WORK_PENDING, &nvdimm->flags))
nvdimm            432 drivers/nvdimm/security.c 	tmo = nvdimm->sec.overwrite_tmo;
nvdimm            434 drivers/nvdimm/security.c 	if (!nvdimm->sec.ops || !nvdimm->sec.ops->query_overwrite
nvdimm            435 drivers/nvdimm/security.c 			|| !nvdimm->sec.flags)
nvdimm            438 drivers/nvdimm/security.c 	rc = nvdimm->sec.ops->query_overwrite(nvdimm);
nvdimm            443 drivers/nvdimm/security.c 		queue_delayed_work(system_wq, &nvdimm->dwork, tmo * HZ);
nvdimm            444 drivers/nvdimm/security.c 		nvdimm->sec.overwrite_tmo = min(15U * 60U, tmo);
nvdimm            449 drivers/nvdimm/security.c 		dev_dbg(&nvdimm->dev, "overwrite failed\n");
nvdimm            451 drivers/nvdimm/security.c 		dev_dbg(&nvdimm->dev, "overwrite completed\n");
nvdimm            453 drivers/nvdimm/security.c 	if (nvdimm->sec.overwrite_state)
nvdimm            454 drivers/nvdimm/security.c 		sysfs_notify_dirent(nvdimm->sec.overwrite_state);
nvdimm            455 drivers/nvdimm/security.c 	nvdimm->sec.overwrite_tmo = 0;
nvdimm            456 drivers/nvdimm/security.c 	clear_bit(NDD_SECURITY_OVERWRITE, &nvdimm->flags);
nvdimm            457 drivers/nvdimm/security.c 	clear_bit(NDD_WORK_PENDING, &nvdimm->flags);
nvdimm            458 drivers/nvdimm/security.c 	put_device(&nvdimm->dev);
nvdimm            459 drivers/nvdimm/security.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_USER);
nvdimm            460 drivers/nvdimm/security.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_MASTER);
nvdimm            465 drivers/nvdimm/security.c 	struct nvdimm *nvdimm =
nvdimm            466 drivers/nvdimm/security.c 		container_of(work, typeof(*nvdimm), dwork.work);
nvdimm            468 drivers/nvdimm/security.c 	nvdimm_bus_lock(&nvdimm->dev);
nvdimm            469 drivers/nvdimm/security.c 	__nvdimm_security_overwrite_query(nvdimm);
nvdimm            470 drivers/nvdimm/security.c 	nvdimm_bus_unlock(&nvdimm->dev);
nvdimm            497 drivers/nvdimm/security.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm            524 drivers/nvdimm/security.c 		rc = nvdimm_security_freeze(nvdimm);
nvdimm            527 drivers/nvdimm/security.c 		rc = security_disable(nvdimm, key);
nvdimm            530 drivers/nvdimm/security.c 		rc = security_update(nvdimm, key, newkey, i == OP_UPDATE
nvdimm            534 drivers/nvdimm/security.c 		if (atomic_read(&nvdimm->busy)) {
nvdimm            538 drivers/nvdimm/security.c 		rc = security_erase(nvdimm, key, i == OP_ERASE
nvdimm            542 drivers/nvdimm/security.c 		if (atomic_read(&nvdimm->busy)) {
nvdimm            546 drivers/nvdimm/security.c 		rc = security_overwrite(nvdimm, key);
nvdimm             75 include/linux/libnvdimm.h struct nvdimm;
nvdimm             78 include/linux/libnvdimm.h 		struct nvdimm *nvdimm, unsigned int cmd, void *buf,
nvdimm             92 include/linux/libnvdimm.h 			struct nvdimm *nvdimm, unsigned int cmd, void *data);
nvdimm            114 include/linux/libnvdimm.h 	struct nvdimm *nvdimm;
nvdimm            188 include/linux/libnvdimm.h 	unsigned long (*get_flags)(struct nvdimm *nvdimm,
nvdimm            190 include/linux/libnvdimm.h 	int (*freeze)(struct nvdimm *nvdimm);
nvdimm            191 include/linux/libnvdimm.h 	int (*change_key)(struct nvdimm *nvdimm,
nvdimm            195 include/linux/libnvdimm.h 	int (*unlock)(struct nvdimm *nvdimm,
nvdimm            197 include/linux/libnvdimm.h 	int (*disable)(struct nvdimm *nvdimm,
nvdimm            199 include/linux/libnvdimm.h 	int (*erase)(struct nvdimm *nvdimm,
nvdimm            202 include/linux/libnvdimm.h 	int (*overwrite)(struct nvdimm *nvdimm,
nvdimm            204 include/linux/libnvdimm.h 	int (*query_overwrite)(struct nvdimm *nvdimm);
nvdimm            217 include/linux/libnvdimm.h struct nvdimm_bus *nvdimm_to_bus(struct nvdimm *nvdimm);
nvdimm            218 include/linux/libnvdimm.h struct nvdimm *to_nvdimm(struct device *dev);
nvdimm            224 include/linux/libnvdimm.h const char *nvdimm_name(struct nvdimm *nvdimm);
nvdimm            225 include/linux/libnvdimm.h struct kobject *nvdimm_kobj(struct nvdimm *nvdimm);
nvdimm            226 include/linux/libnvdimm.h unsigned long nvdimm_cmd_mask(struct nvdimm *nvdimm);
nvdimm            227 include/linux/libnvdimm.h void *nvdimm_provider_data(struct nvdimm *nvdimm);
nvdimm            228 include/linux/libnvdimm.h struct nvdimm *__nvdimm_create(struct nvdimm_bus *nvdimm_bus,
nvdimm            233 include/linux/libnvdimm.h static inline struct nvdimm *nvdimm_create(struct nvdimm_bus *nvdimm_bus,
nvdimm            244 include/linux/libnvdimm.h u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd,
nvdimm            246 include/linux/libnvdimm.h u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd,
nvdimm            259 include/linux/libnvdimm.h struct nvdimm *nd_blk_region_to_dimm(struct nd_blk_region *ndbr);
nvdimm            268 include/linux/libnvdimm.h int nvdimm_in_overwrite(struct nvdimm *nvdimm);
nvdimm            271 include/linux/libnvdimm.h static inline int nvdimm_ctl(struct nvdimm *nvdimm, unsigned int cmd, void *buf,
nvdimm            274 include/linux/libnvdimm.h 	struct nvdimm_bus *nvdimm_bus = nvdimm_to_bus(nvdimm);
nvdimm            277 include/linux/libnvdimm.h 	return nd_desc->ndctl(nd_desc, nvdimm, cmd, buf, buf_len, cmd_rc);
nvdimm             15 tools/testing/nvdimm/dimm_devs.c 	struct nvdimm *nvdimm = to_nvdimm(dev);
nvdimm             21 tools/testing/nvdimm/dimm_devs.c 	nvdimm->sec.flags = nvdimm_security_flags(nvdimm, NVDIMM_USER);
nvdimm             23 tools/testing/nvdimm/dimm_devs.c 	if (test_bit(NVDIMM_SECURITY_DISABLED, &nvdimm->sec.flags))
nvdimm             25 tools/testing/nvdimm/dimm_devs.c 	if (test_bit(NVDIMM_SECURITY_UNLOCKED, &nvdimm->sec.flags))
nvdimm             27 tools/testing/nvdimm/dimm_devs.c 	if (test_bit(NVDIMM_SECURITY_LOCKED, &nvdimm->sec.flags))
nvdimm            665 tools/testing/nvdimm/test/nfit.c 	struct nvdimm *nvdimm = NULL;
nvdimm            687 tools/testing/nvdimm/test/nfit.c 	nvdimm = nd_mapping->nvdimm;
nvdimm            689 tools/testing/nvdimm/test/nfit.c 	spa->devices[0].nfit_device_handle = handle[nvdimm->id];
nvdimm           1196 tools/testing/nvdimm/test/nfit.c 		struct nvdimm *nvdimm, unsigned int cmd, void *buf,
nvdimm           1208 tools/testing/nvdimm/test/nfit.c 	if (nvdimm) {
nvdimm           1209 tools/testing/nvdimm/test/nfit.c 		struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
nvdimm           1210 tools/testing/nvdimm/test/nfit.c 		unsigned long cmd_mask = nvdimm_cmd_mask(nvdimm);
nvdimm           2695 tools/testing/nvdimm/test/nfit.c 	struct nvdimm *nvdimm;
nvdimm           2756 tools/testing/nvdimm/test/nfit.c 	nvdimm = devm_kzalloc(dev, sizeof(*nvdimm), GFP_KERNEL);
nvdimm           2757 tools/testing/nvdimm/test/nfit.c 	if (!nvdimm)
nvdimm           2759 tools/testing/nvdimm/test/nfit.c 	*nvdimm = (struct nvdimm) {
nvdimm           2778 tools/testing/nvdimm/test/nfit.c 	rc = acpi_nfit_ctl(&acpi_desc->nd_desc, nvdimm, ND_CMD_GET_CONFIG_SIZE,
nvdimm           2879 tools/testing/nvdimm/test/nfit.c 	rc = acpi_nfit_ctl(&acpi_desc->nd_desc, nvdimm, ND_CMD_GET_CONFIG_SIZE,