/drivers/nvdimm/ |
D | region_devs.c | 71 int nd_region_activate(struct nd_region *nd_region) in nd_region_activate() argument 75 struct device *dev = &nd_region->dev; in nd_region_activate() 78 nvdimm_bus_lock(&nd_region->dev); in nd_region_activate() 79 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_region_activate() 80 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in nd_region_activate() 90 nvdimm_bus_unlock(&nd_region->dev); in nd_region_activate() 101 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_region_activate() 102 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in nd_region_activate() 104 int rc = nvdimm_map_flush(&nd_region->dev, nvdimm, i, ndrd); in nd_region_activate() 114 for (i = 0; i < nd_region->ndr_mappings - 1; i++) { in nd_region_activate() [all …]
|
D | namespace_devs.c | 33 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_pmem_release() local 36 ida_simple_remove(&nd_region->ns_ida, nspm->id); in namespace_pmem_release() 45 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_blk_release() local 48 ida_simple_remove(&nd_region->ns_ida, nsblk->id); in namespace_blk_release() 140 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_should_map_pages() local 146 if (!test_bit(ND_REGION_PAGEMAP, &nd_region->flags)) in pmem_should_map_pages() 169 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() local 186 sprintf(name, "pmem%d.%d%s", nd_region->id, nsidx, in nvdimm_namespace_disk_name() 189 sprintf(name, "pmem%d%s", nd_region->id, in nvdimm_namespace_disk_name() 195 sprintf(name, "ndblk%d.%d%s", nd_region->id, nsblk->id, in nvdimm_namespace_disk_name() [all …]
|
D | region.c | 24 struct nd_region *nd_region = to_nd_region(dev); in nd_region_probe() local 26 if (nd_region->num_lanes > num_online_cpus() in nd_region_probe() 27 && nd_region->num_lanes < num_possible_cpus() in nd_region_probe() 30 num_online_cpus(), nd_region->num_lanes, in nd_region_probe() 33 nd_region->num_lanes); in nd_region_probe() 36 rc = nd_region_activate(nd_region); in nd_region_probe() 40 rc = nd_blk_region_init(nd_region); in nd_region_probe() 44 rc = nd_region_register_namespaces(nd_region, &err); in nd_region_probe() 55 nd_region->btt_seed = nd_btt_create(nd_region); in nd_region_probe() 56 nd_region->pfn_seed = nd_pfn_create(nd_region); in nd_region_probe() [all …]
|
D | nd-core.h | 73 struct nd_region; 74 void nd_region_create_ns_seed(struct nd_region *nd_region); 75 void nd_region_create_btt_seed(struct nd_region *nd_region); 76 void nd_region_create_pfn_seed(struct nd_region *nd_region); 77 void nd_region_create_dax_seed(struct nd_region *nd_region); 90 struct nd_region; 94 resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region, 96 resource_size_t nd_blk_available_dpa(struct nd_region *nd_region); 97 resource_size_t nd_region_available_dpa(struct nd_region *nd_region); 101 struct resource *nsblk_add_resource(struct nd_region *nd_region,
|
D | nd.h | 141 struct nd_region { struct 167 struct nd_region nd_region; argument 252 struct device *nd_btt_create(struct nd_region *nd_region); 265 static inline struct device *nd_btt_create(struct nd_region *nd_region) in nd_btt_create() argument 275 struct device *nd_pfn_create(struct nd_region *nd_region); 292 static inline struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument 307 struct device *nd_dax_create(struct nd_region *nd_region); 320 static inline struct device *nd_dax_create(struct nd_region *nd_region) in nd_dax_create() argument 326 struct nd_region *to_nd_region(struct device *dev); 327 int nd_region_to_nstype(struct nd_region *nd_region); [all …]
|
D | dax_devs.c | 23 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_dax_release() local 29 ida_simple_remove(&nd_region->dax_ida, nd_pfn->id); in nd_dax_release() 61 static struct nd_dax *nd_dax_alloc(struct nd_region *nd_region) in nd_dax_alloc() argument 72 nd_pfn->id = ida_simple_get(&nd_region->dax_ida, 0, 0, GFP_KERNEL); in nd_dax_alloc() 79 dev_set_name(dev, "dax%d.%d", nd_region->id, nd_pfn->id); in nd_dax_alloc() 82 dev->parent = &nd_region->dev; in nd_dax_alloc() 87 struct device *nd_dax_create(struct nd_region *nd_region) in nd_dax_create() argument 92 if (!is_nd_pmem(&nd_region->dev)) in nd_dax_create() 95 nd_dax = nd_dax_alloc(nd_region); in nd_dax_create() 109 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_dax_probe() local [all …]
|
D | btt_devs.c | 26 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_btt_release() local 31 ida_simple_remove(&nd_region->btt_ida, nd_btt->id); in nd_btt_release() 181 static struct device *__nd_btt_create(struct nd_region *nd_region, in __nd_btt_create() argument 192 nd_btt->id = ida_simple_get(&nd_region->btt_ida, 0, 0, GFP_KERNEL); in __nd_btt_create() 203 dev_set_name(dev, "btt%d.%d", nd_region->id, nd_btt->id); in __nd_btt_create() 204 dev->parent = &nd_region->dev; in __nd_btt_create() 217 struct device *nd_btt_create(struct nd_region *nd_region) in nd_btt_create() argument 219 struct device *dev = __nd_btt_create(nd_region, 0, NULL, NULL); in nd_btt_create() 300 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_btt_probe() local 306 btt_dev = __nd_btt_create(nd_region, 0, NULL, ndns); in nd_btt_probe()
|
D | pmem.c | 45 static struct nd_region *to_region(struct pmem_device *pmem) in to_region() 153 struct nd_region *nd_region = to_region(pmem); in pmem_make_request() local 156 nvdimm_flush(nd_region); in pmem_make_request() 172 nvdimm_flush(nd_region); in pmem_make_request() 241 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_attach_disk() local 271 if (nvdimm_has_flush(nd_region) < 0) in pmem_attach_disk() 334 nvdimm_badblocks_populate(nd_region, &pmem->bb, res); in pmem_attach_disk() 388 struct nd_region *nd_region; in nd_pmem_notify() local 402 nd_region = to_nd_region(ndns->dev.parent); in nd_pmem_notify() 408 nd_region = to_region(pmem); in nd_pmem_notify() [all …]
|
D | dimm_devs.c | 216 struct nd_region *nd_region = &ndbr->nd_region; in nd_blk_region_to_dimm() local 217 struct nd_mapping *nd_mapping = &nd_region->mapping[0]; in nd_blk_region_to_dimm() 394 struct nd_region *nd_region; in alias_dpa_busy() local 402 nd_region = to_nd_region(dev); in alias_dpa_busy() 403 for (i = 0; i < nd_region->ndr_mappings; i++) { in alias_dpa_busy() 404 nd_mapping = &nd_region->mapping[i]; in alias_dpa_busy() 409 if (i >= nd_region->ndr_mappings) in alias_dpa_busy() 469 resource_size_t nd_blk_available_dpa(struct nd_region *nd_region) in nd_blk_available_dpa() argument 471 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&nd_region->dev); in nd_blk_available_dpa() 472 struct nd_mapping *nd_mapping = &nd_region->mapping[0]; in nd_blk_available_dpa() [all …]
|
D | pfn_devs.c | 27 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pfn_release() local 32 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id); in nd_pfn_release() 313 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region) in nd_pfn_alloc() argument 322 nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL); in nd_pfn_alloc() 329 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id); in nd_pfn_alloc() 332 dev->parent = &nd_region->dev; in nd_pfn_alloc() 337 struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument 342 if (!is_nd_pmem(&nd_region->dev)) in nd_pfn_create() 345 nd_pfn = nd_pfn_alloc(nd_region); in nd_pfn_create() 478 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe() local [all …]
|
D | label.h | 134 struct nd_region; 137 int nd_pmem_namespace_label_update(struct nd_region *nd_region, 139 int nd_blk_namespace_label_update(struct nd_region *nd_region,
|
D | label.c | 296 struct nd_region *nd_region = NULL; in nd_label_reserve_dpa() local 313 nd_dbg_dpa(nd_region, ndd, res, "reserve\n"); in nd_label_reserve_dpa() 493 static int __pmem_label_update(struct nd_region *nd_region, in __pmem_label_update() argument 497 u64 cookie = nd_region_interleave_set_cookie(nd_region); in __pmem_label_update() 534 nd_label->nlabel = __cpu_to_le16(nd_region->ndr_mappings); in __pmem_label_update() 540 nd_dbg_dpa(nd_region, ndd, res, "%s\n", __func__); in __pmem_label_update() 622 static int __blk_label_update(struct nd_region *nd_region, in __blk_label_update() argument 700 if (!nsblk_add_resource(nd_region, ndd, nsblk, res->start)) { in __blk_label_update() 922 int nd_pmem_namespace_label_update(struct nd_region *nd_region, in nd_pmem_namespace_label_update() argument 927 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_pmem_namespace_label_update() [all …]
|
D | blk.c | 62 struct nd_region *nd_region; in to_ndbr() local 66 nd_region = container_of(parent, struct nd_region, dev); in to_ndbr() 67 return container_of(nd_region, struct nd_blk_region, nd_region); in to_ndbr()
|
D | claim.c | 81 struct nd_region *nd_region = to_nd_region(dev->parent); in is_idle() local 85 seed = nd_region->btt_seed; in is_idle() 87 seed = nd_region->pfn_seed; in is_idle() 89 seed = nd_region->dax_seed; in is_idle()
|
D | btt.c | 1104 lane = nd_region_acquire_lane(btt->nd_region); in btt_read_pg() 1163 nd_region_release_lane(btt->nd_region, lane); in btt_read_pg() 1175 nd_region_release_lane(btt->nd_region, lane); in btt_read_pg() 1192 lane = nd_region_acquire_lane(btt->nd_region); in btt_write_pg() 1251 nd_region_release_lane(btt->nd_region, lane); in btt_write_pg() 1263 nd_region_release_lane(btt->nd_region, lane); in btt_write_pg() 1438 u32 lbasize, u8 *uuid, struct nd_region *nd_region) in btt_init() argument 1454 btt->nd_region = nd_region; in btt_init() 1462 if (btt->init_state != INIT_READY && nd_region->ro) { in btt_init() 1464 dev_name(&nd_region->dev)); in btt_init() [all …]
|
D | bus.c | 162 void nvdimm_region_notify(struct nd_region *nd_region, enum nvdimm_event event) in nvdimm_region_notify() argument 164 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&nd_region->dev); in nvdimm_region_notify() 170 nd_device_notify(&nd_region->dev, event); in nvdimm_region_notify() 507 struct nd_region *nd_region = to_nd_region(dev->parent); in nvdimm_revalidate_disk() local 508 const char *pol = nd_region->ro ? "only" : "write"; in nvdimm_revalidate_disk() 510 if (nd_region->ro == get_disk_ro(disk)) in nvdimm_revalidate_disk() 514 dev_name(&nd_region->dev), pol, disk->disk_name, pol); in nvdimm_revalidate_disk() 515 set_disk_ro(disk, nd_region->ro); in nvdimm_revalidate_disk()
|
D | btt.h | 223 struct nd_region *nd_region; member
|
D | core.c | 531 void nvdimm_badblocks_populate(struct nd_region *nd_region, in nvdimm_badblocks_populate() argument 537 if (!is_nd_pmem(&nd_region->dev)) { in nvdimm_badblocks_populate() 538 dev_WARN_ONCE(&nd_region->dev, 1, in nvdimm_badblocks_populate() 542 nvdimm_bus = walk_to_nvdimm_bus(&nd_region->dev); in nvdimm_badblocks_populate()
|
/drivers/acpi/nfit/ |
D | nfit.h | 91 struct nd_region *nd_region; member 200 struct nd_region *nd_region; member
|
D | core.c | 1578 struct nd_region *nd_region = to_nd_region(dev); in range_index_show() local 1579 struct nfit_spa *nfit_spa = nd_region_provider_data(nd_region); in range_index_show() 1757 nvdimm_flush(nfit_blk->nd_region); in write_blk_ctl() 1808 nvdimm_flush(nfit_blk->nd_region); in acpi_nfit_blk_single_io() 1819 struct nd_region *nd_region = nfit_blk->nd_region; in acpi_nfit_blk_region_do_io() local 1823 lane = nd_region_acquire_lane(nd_region); in acpi_nfit_blk_region_do_io() 1835 nd_region_release_lane(nd_region, lane); in acpi_nfit_blk_region_do_io() 1902 nfit_blk->nd_region = to_nd_region(dev); in acpi_nfit_blk_region_enable() 1956 if (nvdimm_has_flush(nfit_blk->nd_region) < 0) in acpi_nfit_blk_region_enable() 2162 nfit_spa->nd_region = nvdimm_blk_region_create(acpi_desc->nvdimm_bus, in acpi_nfit_init_mapping() [all …]
|
D | mce.c | 73 nvdimm_region_notify(nfit_spa->nd_region, in nfit_handle_mce()
|