Lines Matching refs:nvdimm_bus
25 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(dev); in nvdimm_bus_lock() local
27 if (!nvdimm_bus) in nvdimm_bus_lock()
29 mutex_lock(&nvdimm_bus->reconfig_mutex); in nvdimm_bus_lock()
35 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(dev); in nvdimm_bus_unlock() local
37 if (!nvdimm_bus) in nvdimm_bus_unlock()
39 mutex_unlock(&nvdimm_bus->reconfig_mutex); in nvdimm_bus_unlock()
45 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(dev); in is_nvdimm_bus_locked() local
47 if (!nvdimm_bus) in is_nvdimm_bus_locked()
49 return mutex_is_locked(&nvdimm_bus->reconfig_mutex); in is_nvdimm_bus_locked()
54 struct nvdimm_bus *nvdimm_bus; member
69 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(dev); in find_nvdimm_map() local
72 list_for_each_entry(nvdimm_map, &nvdimm_bus->mapping_list, list) in find_nvdimm_map()
81 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(dev); in alloc_nvdimm_map() local
89 nvdimm_map->nvdimm_bus = nvdimm_bus; in alloc_nvdimm_map()
95 if (!request_mem_region(offset, size, dev_name(&nvdimm_bus->dev))) { in alloc_nvdimm_map()
96 dev_err(&nvdimm_bus->dev, "failed to request %pa + %zd for %s\n", in alloc_nvdimm_map()
111 list_add(&nvdimm_map->list, &nvdimm_bus->mapping_list); in alloc_nvdimm_map()
124 struct nvdimm_bus *nvdimm_bus; in nvdimm_map_release() local
128 nvdimm_bus = nvdimm_map->nvdimm_bus; in nvdimm_map_release()
130 dev_dbg(&nvdimm_bus->dev, "%pa\n", &nvdimm_map->offset); in nvdimm_map_release()
143 struct nvdimm_bus *nvdimm_bus = nvdimm_map->nvdimm_bus; in nvdimm_map_put() local
145 nvdimm_bus_lock(&nvdimm_bus->dev); in nvdimm_map_put()
147 nvdimm_bus_unlock(&nvdimm_bus->dev); in nvdimm_map_put()
196 struct nvdimm_bus_descriptor *to_nd_desc(struct nvdimm_bus *nvdimm_bus) in to_nd_desc() argument
199 return nvdimm_bus->nd_desc; in to_nd_desc()
203 struct device *to_nvdimm_bus_dev(struct nvdimm_bus *nvdimm_bus) in to_nvdimm_bus_dev() argument
206 return &nvdimm_bus->dev; in to_nvdimm_bus_dev()
317 struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev); in commands_show() local
318 struct nvdimm_bus_descriptor *nd_desc = nvdimm_bus->nd_desc; in commands_show()
327 static const char *nvdimm_bus_provider(struct nvdimm_bus *nvdimm_bus) in nvdimm_bus_provider() argument
329 struct nvdimm_bus_descriptor *nd_desc = nvdimm_bus->nd_desc; in nvdimm_bus_provider()
330 struct device *parent = nvdimm_bus->dev.parent; in nvdimm_bus_provider()
343 struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev); in provider_show() local
345 return sprintf(buf, "%s\n", nvdimm_bus_provider(nvdimm_bus)); in provider_show()
367 struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev); in wait_probe_show() local
368 struct nvdimm_bus_descriptor *nd_desc = nvdimm_bus->nd_desc; in wait_probe_show()
396 struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev); in capability_show() local
397 struct nvdimm_bus_descriptor *nd_desc = nvdimm_bus->nd_desc; in capability_show()
422 struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev); in activate_show() local
423 struct nvdimm_bus_descriptor *nd_desc = nvdimm_bus->nd_desc; in activate_show()
462 struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev); in activate_store() local
463 struct nvdimm_bus_descriptor *nd_desc = nvdimm_bus->nd_desc; in activate_store()
508 struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev); in nvdimm_bus_firmware_visible() local
509 struct nvdimm_bus_descriptor *nd_desc = nvdimm_bus->nd_desc; in nvdimm_bus_firmware_visible()
546 int nvdimm_bus_add_badrange(struct nvdimm_bus *nvdimm_bus, u64 addr, u64 length) in nvdimm_bus_add_badrange() argument
548 return badrange_add(&nvdimm_bus->badrange, addr, length); in nvdimm_bus_add_badrange()