Home
last modified time | relevance | path

Searched refs:dev_dax (Results 1 – 9 of 9) sorted by relevance

/kernel/linux/linux-5.10/drivers/dax/
Dbus.c139 static u64 dev_dax_size(struct dev_dax *dev_dax) in dev_dax_size() argument
144 device_lock_assert(&dev_dax->dev); in dev_dax_size()
146 for (i = 0; i < dev_dax->nr_range; i++) in dev_dax_size()
147 size += range_len(&dev_dax->ranges[i].range); in dev_dax_size()
155 struct dev_dax *dev_dax = to_dev_dax(dev); in dax_bus_probe() local
156 struct dax_region *dax_region = dev_dax->region; in dax_bus_probe()
159 if (dev_dax_size(dev_dax) == 0 || dev_dax->id < 0) in dax_bus_probe()
162 rc = dax_drv->probe(dev_dax); in dax_bus_probe()
180 struct dev_dax *dev_dax = to_dev_dax(dev); in dax_bus_remove() local
182 return dax_drv->remove(dev_dax); in dax_bus_remove()
[all …]
Ddevice.c17 static int check_vma(struct dev_dax *dev_dax, struct vm_area_struct *vma, in check_vma() argument
20 struct device *dev = &dev_dax->dev; in check_vma()
23 if (!dax_alive(dev_dax->dax_dev)) in check_vma()
34 mask = dev_dax->align - 1; in check_vma()
54 __weak phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff, in dax_pgoff_to_phys() argument
59 for (i = 0; i < dev_dax->nr_range; i++) { in dax_pgoff_to_phys()
60 struct dev_dax_range *dax_range = &dev_dax->ranges[i]; in dax_pgoff_to_phys()
76 static vm_fault_t __dev_dax_pte_fault(struct dev_dax *dev_dax, in __dev_dax_pte_fault() argument
79 struct device *dev = &dev_dax->dev; in __dev_dax_pte_fault()
83 if (check_vma(dev_dax, vmf->vma, __func__)) in __dev_dax_pte_fault()
[all …]
Dkmem.c22 static int dax_kmem_range(struct dev_dax *dev_dax, int i, struct range *r) in dax_kmem_range() argument
24 struct dev_dax_range *dax_range = &dev_dax->ranges[i]; in dax_kmem_range()
43 static int dev_dax_kmem_probe(struct dev_dax *dev_dax) in dev_dax_kmem_probe() argument
45 struct device *dev = &dev_dax->dev; in dev_dax_kmem_probe()
57 numa_node = dev_dax->target_node; in dev_dax_kmem_probe()
64 data = kzalloc(sizeof(*data) + sizeof(struct resource *) * dev_dax->nr_range, GFP_KERNEL); in dev_dax_kmem_probe()
72 for (i = 0; i < dev_dax->nr_range; i++) { in dev_dax_kmem_probe()
76 rc = dax_kmem_range(dev_dax, i, &range); in dev_dax_kmem_probe()
139 static int dev_dax_kmem_remove(struct dev_dax *dev_dax) in dev_dax_kmem_remove() argument
142 struct device *dev = &dev_dax->dev; in dev_dax_kmem_remove()
[all …]
Dbus.h8 struct dev_dax;
32 struct dev_dax *devm_create_dev_dax(struct dev_dax_data *data);
35 struct dev_dax *__dax_pmem_probe(struct device *dev, enum dev_dax_subsys subsys);
41 int (*probe)(struct dev_dax *dev);
42 int (*remove)(struct dev_dax *dev);
50 void kill_dev_dax(struct dev_dax *dev_dax);
53 int dev_dax_probe(struct dev_dax *dev_dax);
Ddax-private.h62 struct dev_dax { struct
79 static inline struct dev_dax *to_dev_dax(struct device *dev) in to_dev_dax() argument
81 return container_of(dev, struct dev_dax, dev); in to_dev_dax()
89 phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff, unsigned long size);
/kernel/linux/linux-5.10/drivers/dax/pmem/
Dcompat.c15 struct dev_dax *dev_dax = __dax_pmem_probe(dev, DEV_DAX_CLASS); in dax_pmem_compat_probe() local
18 if (IS_ERR(dev_dax)) in dax_pmem_compat_probe()
19 return PTR_ERR(dev_dax); in dax_pmem_compat_probe()
21 if (!devres_open_group(&dev_dax->dev, dev_dax, GFP_KERNEL)) in dax_pmem_compat_probe()
24 device_lock(&dev_dax->dev); in dax_pmem_compat_probe()
25 rc = dev_dax_probe(dev_dax); in dax_pmem_compat_probe()
26 device_unlock(&dev_dax->dev); in dax_pmem_compat_probe()
28 devres_close_group(&dev_dax->dev, dev_dax); in dax_pmem_compat_probe()
30 devres_release_group(&dev_dax->dev, dev_dax); in dax_pmem_compat_probe()
Dcore.c10 struct dev_dax *__dax_pmem_probe(struct device *dev, enum dev_dax_subsys subsys) in __dax_pmem_probe()
16 struct dev_dax *dev_dax; in __dax_pmem_probe() local
69 dev_dax = devm_create_dev_dax(&data); in __dax_pmem_probe()
74 return dev_dax; in __dax_pmem_probe()
/kernel/linux/linux-5.10/tools/testing/nvdimm/
Ddax-dev.c9 phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff, in dax_pgoff_to_phys() argument
14 for (i = 0; i < dev_dax->nr_range; i++) { in dax_pgoff_to_phys()
15 struct dev_dax_range *dax_range = &dev_dax->ranges[i]; in dax_pgoff_to_phys()
28 if (dev_dax->region->align > PAGE_SIZE) in dax_pgoff_to_phys()
/kernel/linux/linux-5.10/drivers/dax/hmem/
Dhmem.c17 struct dev_dax *dev_dax; in dax_hmem_probe() local
38 dev_dax = devm_create_dev_dax(&data); in dax_hmem_probe()
39 if (IS_ERR(dev_dax)) in dax_hmem_probe()
40 return PTR_ERR(dev_dax); in dax_hmem_probe()