Lines Matching refs:nd_label

282 		struct nd_namespace_label *nd_label)  in to_slot()  argument
286 label = (unsigned long) nd_label; in to_slot()
358 struct nd_namespace_label *nd_label) in nsl_validate_checksum() argument
365 sum_save = nsl_get_checksum(ndd, nd_label); in nsl_validate_checksum()
366 nsl_set_checksum(ndd, nd_label, 0); in nsl_validate_checksum()
367 sum = nd_fletcher64(nd_label, sizeof_namespace_label(ndd), 1); in nsl_validate_checksum()
368 nsl_set_checksum(ndd, nd_label, sum_save); in nsl_validate_checksum()
373 struct nd_namespace_label *nd_label) in nsl_calculate_checksum() argument
379 nsl_set_checksum(ndd, nd_label, 0); in nsl_calculate_checksum()
380 sum = nd_fletcher64(nd_label, sizeof_namespace_label(ndd), 1); in nsl_calculate_checksum()
381 nsl_set_checksum(ndd, nd_label, sum); in nsl_calculate_checksum()
385 struct nd_namespace_label *nd_label, u32 slot) in slot_valid() argument
390 if (slot != nsl_get_slot(ndd, nd_label)) in slot_valid()
392 valid = nsl_validate_checksum(ndd, nd_label); in slot_valid()
408 struct nd_namespace_label *nd_label; in nd_label_reserve_dpa() local
415 nd_label = to_label(ndd, slot); in nd_label_reserve_dpa()
417 if (!slot_valid(ndd, nd_label, slot)) in nd_label_reserve_dpa()
420 nsl_get_uuid(ndd, nd_label, &label_uuid); in nd_label_reserve_dpa()
421 flags = nsl_get_flags(ndd, nd_label); in nd_label_reserve_dpa()
424 nsl_get_dpa(ndd, nd_label), in nd_label_reserve_dpa()
425 nsl_get_rawsize(ndd, nd_label)); in nd_label_reserve_dpa()
567 struct nd_namespace_label *nd_label; in nd_label_active_count() local
569 nd_label = to_label(ndd, slot); in nd_label_active_count()
571 if (!slot_valid(ndd, nd_label, slot)) { in nd_label_active_count()
572 u32 label_slot = nsl_get_slot(ndd, nd_label); in nd_label_active_count()
573 u64 size = nsl_get_rawsize(ndd, nd_label); in nd_label_active_count()
574 u64 dpa = nsl_get_dpa(ndd, nd_label); in nd_label_active_count()
596 struct nd_namespace_label *nd_label; in nd_label_active() local
598 nd_label = to_label(ndd, slot); in nd_label_active()
599 if (!slot_valid(ndd, nd_label, slot)) in nd_label_active()
726 struct nd_namespace_label *nd_label) in nd_label_offset() argument
728 return (unsigned long) nd_label in nd_label_offset()
820 struct nd_namespace_label *nd_label, guid_t *guid) in nsl_set_type_guid() argument
823 guid_copy(&nd_label->efi.type_guid, guid); in nsl_set_type_guid()
827 struct nd_namespace_label *nd_label, guid_t *guid) in nsl_validate_type_guid() argument
831 if (!guid_equal(&nd_label->efi.type_guid, guid)) { in nsl_validate_type_guid()
833 &nd_label->efi.type_guid); in nsl_validate_type_guid()
840 struct nd_namespace_label *nd_label, in nsl_set_claim_class() argument
846 import_uuid(&uuid, nd_label->cxl.abstraction_uuid); in nsl_set_claim_class()
847 export_uuid(nd_label->cxl.abstraction_uuid, in nsl_set_claim_class()
854 guid_copy(&nd_label->efi.abstraction_guid, in nsl_set_claim_class()
856 &nd_label->efi.abstraction_guid)); in nsl_set_claim_class()
860 struct nd_namespace_label *nd_label) in nsl_get_claim_class() argument
865 import_uuid(&uuid, nd_label->cxl.abstraction_uuid); in nsl_get_claim_class()
870 return guid_to_nvdimm_cclass(&nd_label->efi.abstraction_guid); in nsl_get_claim_class()
880 struct nd_namespace_label *nd_label; in __pmem_label_update() local
911 nd_label = to_label(ndd, slot); in __pmem_label_update()
912 memset(nd_label, 0, sizeof_namespace_label(ndd)); in __pmem_label_update()
913 nsl_set_uuid(ndd, nd_label, nspm->uuid); in __pmem_label_update()
914 nsl_set_name(ndd, nd_label, nspm->alt_name); in __pmem_label_update()
915 nsl_set_flags(ndd, nd_label, flags); in __pmem_label_update()
916 nsl_set_nlabel(ndd, nd_label, nd_region->ndr_mappings); in __pmem_label_update()
917 nsl_set_nrange(ndd, nd_label, 1); in __pmem_label_update()
918 nsl_set_position(ndd, nd_label, pos); in __pmem_label_update()
919 nsl_set_isetcookie(ndd, nd_label, cookie); in __pmem_label_update()
920 nsl_set_rawsize(ndd, nd_label, resource_size(res)); in __pmem_label_update()
921 nsl_set_lbasize(ndd, nd_label, nspm->lbasize); in __pmem_label_update()
922 nsl_set_dpa(ndd, nd_label, res->start); in __pmem_label_update()
923 nsl_set_slot(ndd, nd_label, slot); in __pmem_label_update()
924 nsl_set_type_guid(ndd, nd_label, &nd_set->type_guid); in __pmem_label_update()
925 nsl_set_claim_class(ndd, nd_label, ndns->claim_class); in __pmem_label_update()
926 nsl_calculate_checksum(ndd, nd_label); in __pmem_label_update()
930 offset = nd_label_offset(ndd, nd_label); in __pmem_label_update()
931 rc = nvdimm_set_config_data(ndd, offset, nd_label, in __pmem_label_update()
952 label_ent->label = nd_label; in __pmem_label_update()
953 nd_label = NULL; in __pmem_label_update()
956 dev_WARN_ONCE(&nspm->nsio.common.dev, nd_label, in __pmem_label_update()
958 to_slot(ndd, nd_label)); in __pmem_label_update()
959 if (nd_label) in __pmem_label_update()
1030 struct nd_namespace_label *nd_label = label_ent->label; in del_labels() local
1032 if (!nd_label) in del_labels()
1035 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in del_labels()
1038 slot = to_slot(ndd, nd_label); in del_labels()