Lines Matching +full:uuid +full:- +full:dev

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
20 * support and is an input to the geometry/on-disk-format of a
29 struct device *dev; member
42 if (ndd->cxl) in nsl_ref_name()
43 return nd_label->cxl.name; in nsl_ref_name()
44 return nd_label->efi.name; in nsl_ref_name()
50 if (ndd->cxl) in nsl_get_name()
51 return memcpy(name, nd_label->cxl.name, NSLABEL_NAME_LEN); in nsl_get_name()
52 return memcpy(name, nd_label->efi.name, NSLABEL_NAME_LEN); in nsl_get_name()
60 if (ndd->cxl) in nsl_set_name()
61 return memcpy(nd_label->cxl.name, name, NSLABEL_NAME_LEN); in nsl_set_name()
62 return memcpy(nd_label->efi.name, name, NSLABEL_NAME_LEN); in nsl_set_name()
68 if (ndd->cxl) in nsl_get_slot()
69 return __le32_to_cpu(nd_label->cxl.slot); in nsl_get_slot()
70 return __le32_to_cpu(nd_label->efi.slot); in nsl_get_slot()
76 if (ndd->cxl) in nsl_set_slot()
77 nd_label->cxl.slot = __cpu_to_le32(slot); in nsl_set_slot()
79 nd_label->efi.slot = __cpu_to_le32(slot); in nsl_set_slot()
85 if (ndd->cxl) in nsl_get_checksum()
86 return __le64_to_cpu(nd_label->cxl.checksum); in nsl_get_checksum()
87 return __le64_to_cpu(nd_label->efi.checksum); in nsl_get_checksum()
94 if (ndd->cxl) in nsl_set_checksum()
95 nd_label->cxl.checksum = __cpu_to_le64(checksum); in nsl_set_checksum()
97 nd_label->efi.checksum = __cpu_to_le64(checksum); in nsl_set_checksum()
103 if (ndd->cxl) in nsl_get_flags()
104 return __le32_to_cpu(nd_label->cxl.flags); in nsl_get_flags()
105 return __le32_to_cpu(nd_label->efi.flags); in nsl_get_flags()
111 if (ndd->cxl) in nsl_set_flags()
112 nd_label->cxl.flags = __cpu_to_le32(flags); in nsl_set_flags()
114 nd_label->efi.flags = __cpu_to_le32(flags); in nsl_set_flags()
120 if (ndd->cxl) in nsl_get_dpa()
121 return __le64_to_cpu(nd_label->cxl.dpa); in nsl_get_dpa()
122 return __le64_to_cpu(nd_label->efi.dpa); in nsl_get_dpa()
128 if (ndd->cxl) in nsl_set_dpa()
129 nd_label->cxl.dpa = __cpu_to_le64(dpa); in nsl_set_dpa()
131 nd_label->efi.dpa = __cpu_to_le64(dpa); in nsl_set_dpa()
137 if (ndd->cxl) in nsl_get_rawsize()
138 return __le64_to_cpu(nd_label->cxl.rawsize); in nsl_get_rawsize()
139 return __le64_to_cpu(nd_label->efi.rawsize); in nsl_get_rawsize()
146 if (ndd->cxl) in nsl_set_rawsize()
147 nd_label->cxl.rawsize = __cpu_to_le64(rawsize); in nsl_set_rawsize()
149 nd_label->efi.rawsize = __cpu_to_le64(rawsize); in nsl_set_rawsize()
156 if (dev_WARN_ONCE(ndd->dev, ndd->cxl, in nsl_get_isetcookie()
159 return __le64_to_cpu(nd_label->efi.isetcookie); in nsl_get_isetcookie()
166 if (!ndd->cxl) in nsl_set_isetcookie()
167 nd_label->efi.isetcookie = __cpu_to_le64(isetcookie); in nsl_set_isetcookie()
178 if (ndd->cxl) in nsl_validate_isetcookie()
180 return cookie == __le64_to_cpu(nd_label->efi.isetcookie); in nsl_validate_isetcookie()
186 if (ndd->cxl) in nsl_get_position()
187 return __le16_to_cpu(nd_label->cxl.position); in nsl_get_position()
188 return __le16_to_cpu(nd_label->efi.position); in nsl_get_position()
195 if (ndd->cxl) in nsl_set_position()
196 nd_label->cxl.position = __cpu_to_le16(position); in nsl_set_position()
198 nd_label->efi.position = __cpu_to_le16(position); in nsl_set_position()
204 if (ndd->cxl) in nsl_get_nlabel()
206 return __le16_to_cpu(nd_label->efi.nlabel); in nsl_get_nlabel()
213 if (!ndd->cxl) in nsl_set_nlabel()
214 nd_label->efi.nlabel = __cpu_to_le16(nlabel); in nsl_set_nlabel()
220 if (ndd->cxl) in nsl_get_nrange()
221 return __le16_to_cpu(nd_label->cxl.nrange); in nsl_get_nrange()
229 if (ndd->cxl) in nsl_set_nrange()
230 nd_label->cxl.nrange = __cpu_to_le16(nrange); in nsl_set_nrange()
237 * Yes, for some reason the EFI labels convey a massive 64-bit in nsl_get_lbasize()
240 if (ndd->cxl) in nsl_get_lbasize()
241 return __le16_to_cpu(nd_label->cxl.lbasize); in nsl_get_lbasize()
242 return __le64_to_cpu(nd_label->efi.lbasize); in nsl_get_lbasize()
249 if (ndd->cxl) in nsl_set_lbasize()
250 nd_label->cxl.lbasize = __cpu_to_le16(lbasize); in nsl_set_lbasize()
252 nd_label->efi.lbasize = __cpu_to_le64(lbasize); in nsl_set_lbasize()
257 uuid_t *uuid) in nsl_get_uuid() argument
259 if (ndd->cxl) in nsl_get_uuid()
260 import_uuid(uuid, nd_label->cxl.uuid); in nsl_get_uuid()
262 import_uuid(uuid, nd_label->efi.uuid); in nsl_get_uuid()
263 return uuid; in nsl_get_uuid()
268 const uuid_t *uuid) in nsl_set_uuid() argument
270 if (ndd->cxl) in nsl_set_uuid()
271 export_uuid(nd_label->cxl.uuid, uuid); in nsl_set_uuid()
273 export_uuid(nd_label->efi.uuid, uuid); in nsl_set_uuid()
274 return uuid; in nsl_set_uuid()
279 const uuid_t *uuid) in nsl_uuid_equal() argument
283 if (ndd->cxl) in nsl_uuid_equal()
284 import_uuid(&tmp, nd_label->cxl.uuid); in nsl_uuid_equal()
286 import_uuid(&tmp, nd_label->efi.uuid); in nsl_uuid_equal()
287 return uuid_equal(&tmp, uuid); in nsl_uuid_equal()
293 if (ndd->cxl) in nsl_uuid_raw()
294 return nd_label->cxl.uuid; in nsl_uuid_raw()
295 return nd_label->efi.uuid; in nsl_uuid_raw()
313 unsigned int num = 1 << ndrd->hints_shift; in ndrd_get_flush_wpq()
314 unsigned int mask = num - 1; in ndrd_get_flush_wpq()
316 return ndrd->flush_wpq[dimm * num + (hint & mask)]; in ndrd_get_flush_wpq()
322 unsigned int num = 1 << ndrd->hints_shift; in ndrd_set_flush_wpq()
323 unsigned int mask = num - 1; in ndrd_set_flush_wpq()
325 ndrd->flush_wpq[dimm * num + (hint & mask)] = flush; in ndrd_set_flush_wpq()
334 return ndd->data + sizeof_namespace_index(ndd) * i; in to_namespace_index()
340 return to_namespace_index(ndd, ndd->ns_current); in to_current_namespace_index()
346 return to_namespace_index(ndd, ndd->ns_next); in to_next_namespace_index()
352 (!ndd->cxl && offsetof(struct nvdimm_efi_label, field) \
356 dev_dbg((r) ? &(r)->dev : (d)->dev, "%s: %.13s: %#llx @ %#llx " fmt, \
357 (r) ? dev_name((d)->dev) : "", res ? res->name : "null", \
359 (unsigned long long) (res ? res->start : 0), ##arg)
362 for (res = (ndd)->dpa.child; res; res = res->sibling)
365 for (res = (ndd)->dpa.child, next = res ? res->sibling : NULL; \
366 res; res = next, next = next ? next->sibling : NULL)
404 struct device dev; member
432 if (ndd->cxl) in nsl_validate_nlabel()
434 return nsl_get_nlabel(ndd, nd_label) == nd_region->ndr_mappings; in nsl_validate_nlabel()
449 struct device dev; member
454 uuid_t *uuid; member
469 uuid_t *uuid; member
470 struct device dev; member
493 void wait_nvdimm_bus_probe_idle(struct device *dev);
494 void nd_device_register(struct device *dev);
495 void nd_device_unregister(struct device *dev, enum nd_async_mode mode);
496 void nd_device_notify(struct device *dev, enum nvdimm_event event);
497 int nd_uuid_store(struct device *dev, uuid_t **uuid_out, const char *buf,
501 ssize_t nd_size_select_store(struct device *dev, const char *buf,
513 int nvdimm_check_config_data(struct device *dev);
520 long nvdimm_clear_poison(struct device *dev, phys_addr_t phys,
522 void nvdimm_set_labeling(struct device *dev);
523 void nvdimm_set_locked(struct device *dev);
524 void nvdimm_clear_locked(struct device *dev);
525 int nvdimm_security_setup_events(struct device *dev);
527 int nvdimm_security_unlock(struct device *dev);
529 static inline int nvdimm_security_unlock(struct device *dev) in nvdimm_security_unlock() argument
534 struct nd_btt *to_nd_btt(struct device *dev);
537 char reserved[SZ_4K - 8];
543 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns);
544 bool is_nd_btt(struct device *dev);
547 static inline int nd_btt_probe(struct device *dev, in nd_btt_probe() argument
550 return -ENODEV; in nd_btt_probe()
553 static inline bool is_nd_btt(struct device *dev) in is_nd_btt() argument
564 struct nd_pfn *to_nd_pfn(struct device *dev);
569 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns);
570 bool is_nd_pfn(struct device *dev);
577 static inline int nd_pfn_probe(struct device *dev, in nd_pfn_probe() argument
580 return -ENODEV; in nd_pfn_probe()
583 static inline bool is_nd_pfn(struct device *dev) in is_nd_pfn() argument
595 return -ENODEV; in nd_pfn_validate()
599 struct nd_dax *to_nd_dax(struct device *dev);
601 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns);
602 bool is_nd_dax(const struct device *dev);
609 return nd_pfn_devinit(&nd_dax->nd_pfn, ndns); in nd_dax_devinit()
612 static inline int nd_dax_probe(struct device *dev, in nd_dax_probe() argument
615 return -ENODEV; in nd_dax_probe()
618 static inline bool is_nd_dax(const struct device *dev) in is_nd_dax() argument
634 void nvdimm_bus_lock(struct device *dev);
635 void nvdimm_bus_unlock(struct device *dev);
636 bool is_nvdimm_bus_locked(struct device *dev);
647 struct nd_namespace_common *nvdimm_namespace_common_probe(struct device *dev);
656 int devm_namespace_enable(struct device *dev, struct nd_namespace_common *ndns,
658 void devm_namespace_disable(struct device *dev,
668 return -ENXIO; in nvdimm_setup_pfn()
675 if (bb->count) { in is_bad_pmem()
685 const uuid_t *nd_dev_to_uuid(struct device *dev);
686 bool pmem_should_map_pages(struct device *dev);