/openbmc/linux/drivers/nvdimm/ |
H A D | claim.c | 256 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in nsio_rw_bytes() local 264 if (unlikely(offset + size > nsio->size)) { in nsio_rw_bytes() 270 if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) in nsio_rw_bytes() 272 if (copy_mc_to_kernel(buf, nsio->addr + offset, size) != 0) in nsio_rw_bytes() 277 if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) { in nsio_rw_bytes() 284 nsio->res.start + offset, size); in nsio_rw_bytes() 289 badblocks_clear(&nsio->bb, sector, cleared); in nsio_rw_bytes() 291 arch_invalidate_pmem(nsio->addr + offset, size); in nsio_rw_bytes() 296 memcpy_flushcache(nsio->addr + offset, buf, size); in nsio_rw_bytes() 304 int devm_nsio_enable(struct device *dev, struct nd_namespace_io *nsio, in devm_nsio_enable() argument [all …]
|
H A D | pfn_devs.c | 210 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show() local 212 rc = sprintf(buf, "%#llx\n", (unsigned long long) nsio->res.start in resource_show() 237 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show() local 240 resource_size(&nsio->res) - start_pad in size_show() 372 struct nd_namespace_io *nsio; in nd_pfn_clear_memmap_errors() local 377 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_clear_memmap_errors() 400 + (first_bad << 9)) - nsio->res.start, in nd_pfn_clear_memmap_errors() 456 struct nd_namespace_io *nsio; in nd_pfn_validate() local 587 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_validate() 588 res = &nsio->res; in nd_pfn_validate() [all …]
|
H A D | namespace_devs.c | 19 struct nd_namespace_io *nsio = to_nd_namespace_io(dev); in namespace_io_release() local 21 kfree(nsio); in namespace_io_release() 92 struct nd_namespace_io *nsio; in pmem_should_map_pages() local 106 nsio = to_nd_namespace_io(dev); in pmem_should_map_pages() 107 if (region_intersects(nsio->res.start, resource_size(&nsio->res), in pmem_should_map_pages() 247 resource_size_t size = resource_size(&nspm->nsio.res); in nd_namespace_label_update() 695 struct resource *res = &nspm->nsio.res; in nd_namespace_pmem_set_resource() 876 return resource_size(&nspm->nsio.res); in __nvdimm_namespace_capacity() 878 struct nd_namespace_io *nsio = to_nd_namespace_io(dev); in __nvdimm_namespace_capacity() local 880 return resource_size(&nsio->res); in __nvdimm_namespace_capacity() [all …]
|
H A D | nd-core.h | 150 int devm_nsio_enable(struct device *dev, struct nd_namespace_io *nsio, 152 void devm_nsio_disable(struct device *dev, struct nd_namespace_io *nsio); 155 struct nd_namespace_io *nsio, resource_size_t size) in devm_nsio_enable() argument 161 struct nd_namespace_io *nsio) in devm_nsio_disable() argument
|
H A D | pmem.c | 452 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in pmem_attach_disk() local 455 struct resource *res = &nsio->res; in pmem_attach_disk() 678 struct nd_namespace_io *nsio; in pmem_revalidate_poison() local 688 nsio = to_nd_namespace_io(&ndns->dev); in pmem_revalidate_poison() 689 bb = &nsio->bb; in pmem_revalidate_poison() 710 nsio = to_nd_namespace_io(&ndns->dev); in pmem_revalidate_poison() 713 range.start = nsio->res.start + offset; in pmem_revalidate_poison() 714 range.end = nsio->res.end - end_trunc; in pmem_revalidate_poison()
|
H A D | bus.c | 956 struct nd_namespace_io *nsio; in nd_pmem_forget_poison_check() local 978 nsio = to_nd_namespace_io(&ndns->dev); in nd_pmem_forget_poison_check() 979 pstart = nsio->res.start + offset; in nd_pmem_forget_poison_check() 980 pend = nsio->res.end - end_trunc; in nd_pmem_forget_poison_check()
|
H A D | btt.c | 1570 struct nd_namespace_io *nsio; in btt_init() local 1584 nsio = to_nd_namespace_io(&nd_btt->ndns->dev); in btt_init() 1585 btt->phys_bb = &nsio->bb; in btt_init()
|
H A D | label.c | 877 struct nd_namespace_common *ndns = &nspm->nsio.common; in __pmem_label_update() 956 dev_WARN_ONCE(&nspm->nsio.common.dev, nd_label, in __pmem_label_update()
|
/openbmc/linux/include/linux/ |
H A D | nd.h | 140 struct nd_namespace_io nsio; member 154 struct nd_namespace_io *nsio = to_nd_namespace_io(dev); in to_nd_namespace_pmem() local 156 return container_of(nsio, struct nd_namespace_pmem, nsio); in to_nd_namespace_pmem()
|
/openbmc/linux/drivers/dax/ |
H A D | pmem.c | 17 struct nd_namespace_io *nsio; in __dax_pmem_probe() local 41 nsio = to_nd_namespace_io(&ndns->dev); in __dax_pmem_probe() 42 if (!devm_request_mem_region(dev, nsio->res.start, offset, in __dax_pmem_probe()
|