/kernel/linux/linux-6.6/drivers/dax/ |
H A D | bus.c | 62 struct dev_dax *dev_dax = to_dev_dax(dev); in dax_match_type() local 64 if (dev_dax->region->res.flags & IORESOURCE_DAX_KMEM) in dax_match_type() 172 bool static_dev_dax(struct dev_dax *dev_dax) in static_dev_dax() argument 174 return is_static(dev_dax->region); in static_dev_dax() 178 static u64 dev_dax_size(struct dev_dax *dev_dax) in dev_dax_size() argument 183 device_lock_assert(&dev_dax->dev); in dev_dax_size() 185 for (i = 0; i < dev_dax in dev_dax_size() 194 struct dev_dax *dev_dax = to_dev_dax(dev); dax_bus_probe() local 219 struct dev_dax *dev_dax = to_dev_dax(dev); dax_bus_remove() local 371 struct dev_dax *dev_dax = devm_create_dev_dax(&data); create_store() local 395 kill_dev_dax(struct dev_dax *dev_dax) kill_dev_dax() argument 413 trim_dev_dax_range(struct dev_dax *dev_dax) trim_dev_dax_range() argument 431 free_dev_dax_ranges(struct dev_dax *dev_dax) free_dev_dax_ranges() argument 439 struct dev_dax *dev_dax = to_dev_dax(dev); unregister_dev_dax() local 463 __free_dev_dax_id(struct dev_dax *dev_dax) __free_dev_dax_id() argument 480 free_dev_dax_id(struct dev_dax *dev_dax) free_dev_dax_id() argument 491 alloc_dev_dax_id(struct dev_dax *dev_dax) alloc_dev_dax_id() argument 509 struct dev_dax *dev_dax; delete_store() local 653 struct dev_dax *dev_dax = to_dev_dax(parent); dax_mapping_release() local 664 struct dev_dax *dev_dax = to_dev_dax(dev->parent); unregister_dax_mapping() local 680 struct dev_dax *dev_dax = to_dev_dax(dev->parent); get_dax_range() local 695 struct dev_dax *dev_dax = to_dev_dax(mapping->dev.parent); put_dax_range() local 770 devm_register_dax_mapping(struct dev_dax *dev_dax, int range_id) devm_register_dax_mapping() argument 812 alloc_dev_dax_range(struct dev_dax *dev_dax, u64 start, resource_size_t size) alloc_dev_dax_range() argument 873 adjust_dev_dax_range(struct dev_dax *dev_dax, struct resource *res, resource_size_t size) adjust_dev_dax_range() argument 907 struct dev_dax *dev_dax = to_dev_dax(dev); size_show() local 917 alloc_is_aligned(struct dev_dax *dev_dax, resource_size_t size) alloc_is_aligned() argument 926 dev_dax_shrink(struct dev_dax *dev_dax, resource_size_t size) dev_dax_shrink() argument 970 adjust_ok(struct dev_dax *dev_dax, struct resource *res) adjust_ok() argument 992 dev_dax_resize(struct dax_region *dax_region, struct dev_dax *dev_dax, resource_size_t size) dev_dax_resize() argument 1070 struct dev_dax *dev_dax = to_dev_dax(dev); size_store() local 1129 struct dev_dax *dev_dax = to_dev_dax(dev); mapping_store() local 1160 struct dev_dax *dev_dax = to_dev_dax(dev); align_show() local 1165 dev_dax_validate_align(struct dev_dax *dev_dax) dev_dax_validate_align() argument 1186 struct dev_dax *dev_dax = to_dev_dax(dev); align_store() local 1222 dev_dax_target_node(struct dev_dax *dev_dax) dev_dax_target_node() argument 1232 struct dev_dax *dev_dax = to_dev_dax(dev); target_node_show() local 1241 struct dev_dax *dev_dax = to_dev_dax(dev); resource_show() local 1275 struct dev_dax *dev_dax = to_dev_dax(dev); dev_dax_visible() local 1313 struct dev_dax *dev_dax = to_dev_dax(dev); dev_dax_release() local 1332 struct dev_dax *dev_dax; devm_create_dev_dax() local [all...] |
H A D | device.c | 17 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() 81 struct dev_dax *dev_da in dax_set_mapping() local 103 __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) __dev_dax_pte_fault() argument 136 __dev_dax_pmd_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) __dev_dax_pmd_fault() argument 180 __dev_dax_pud_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) __dev_dax_pud_fault() argument 224 __dev_dax_pud_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) __dev_dax_pud_fault() argument 236 struct dev_dax *dev_dax = filp->private_data; dev_dax_huge_fault() local 265 struct dev_dax *dev_dax = filp->private_data; dev_dax_may_split() local 275 struct dev_dax *dev_dax = filp->private_data; dev_dax_pagesize() local 289 struct dev_dax *dev_dax = filp->private_data; dax_mmap() local 315 struct dev_dax *dev_dax = filp ? filp->private_data : NULL; dax_get_unmapped_area() local 350 struct dev_dax *dev_dax = dax_get_private(dax_dev); dax_open() local 367 struct dev_dax *dev_dax = filp->private_data; dax_release() local 388 dev_dax_kill(void *dev_dax) dev_dax_kill() argument 393 dev_dax_probe(struct dev_dax *dev_dax) dev_dax_probe() argument [all...] |
H A D | kmem.c | 30 static int dax_kmem_range(struct dev_dax *dev_dax, int i, struct range *r) in dax_kmem_range() argument 32 struct dev_dax_range *dax_range = &dev_dax->ranges[i]; in dax_kmem_range() 53 static int dev_dax_kmem_probe(struct dev_dax *dev_dax) in dev_dax_kmem_probe() argument 55 struct device *dev = &dev_dax->dev; in dev_dax_kmem_probe() 67 numa_node = dev_dax->target_node; in dev_dax_kmem_probe() 74 for (i = 0; i < dev_dax->nr_range; i++) { in dev_dax_kmem_probe() 77 rc = dax_kmem_range(dev_dax, i, &range); in dev_dax_kmem_probe() 94 data = kzalloc(struct_size(data, res, dev_dax in dev_dax_kmem_probe() 175 dev_dax_kmem_remove(struct dev_dax *dev_dax) dev_dax_kmem_remove() argument 226 dev_dax_kmem_remove(struct dev_dax *dev_dax) dev_dax_kmem_remove() argument [all...] |
H A D | bus.h | 8 struct dev_dax; 28 struct dev_dax *devm_create_dev_dax(struct dev_dax_data *data); 39 int (*probe)(struct dev_dax *dev); 40 void (*remove)(struct dev_dax *dev); 48 void kill_dev_dax(struct dev_dax *dev_dax); 49 bool static_dev_dax(struct dev_dax *dev_dax);
|
H A D | dax-private.h | 50 * struct dev_dax - instance data for a subdivision of a dax region, and 54 * @target_node: effective numa node if dev_dax memory range is onlined 63 struct dev_dax { struct 88 static inline struct dev_dax *to_dev_dax(struct device *dev) in to_dev_dax() 90 return container_of(dev, struct dev_dax, dev); in to_dev_dax() 98 phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff, unsigned long size);
|
H A D | pmem.c | 10 static struct dev_dax *__dax_pmem_probe(struct device *dev) in __dax_pmem_probe()
|
/kernel/linux/linux-5.10/drivers/dax/ |
H A D | bus.c | 139 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 in dax_bus_probe() 180 struct dev_dax *dev_dax = to_dev_dax(dev); dax_bus_remove() local 336 struct dev_dax *dev_dax = devm_create_dev_dax(&data); create_store() local 360 kill_dev_dax(struct dev_dax *dev_dax) kill_dev_dax() argument 370 trim_dev_dax_range(struct dev_dax *dev_dax) trim_dev_dax_range() argument 388 free_dev_dax_ranges(struct dev_dax *dev_dax) free_dev_dax_ranges() argument 396 struct dev_dax *dev_dax = to_dev_dax(dev); unregister_dev_dax() local 421 __free_dev_dax_id(struct dev_dax *dev_dax) __free_dev_dax_id() argument 438 free_dev_dax_id(struct dev_dax *dev_dax) free_dev_dax_id() argument 449 alloc_dev_dax_id(struct dev_dax *dev_dax) alloc_dev_dax_id() argument 467 struct dev_dax *dev_dax; delete_store() local 612 struct dev_dax *dev_dax = to_dev_dax(parent); dax_mapping_release() local 623 struct dev_dax *dev_dax = to_dev_dax(dev->parent); unregister_dax_mapping() local 640 struct dev_dax *dev_dax = to_dev_dax(dev->parent); get_dax_range() local 655 struct dev_dax *dev_dax = to_dev_dax(mapping->dev.parent); put_dax_range() local 730 devm_register_dax_mapping(struct dev_dax *dev_dax, int range_id) devm_register_dax_mapping() argument 772 alloc_dev_dax_range(struct dev_dax *dev_dax, u64 start, resource_size_t size) alloc_dev_dax_range() argument 841 adjust_dev_dax_range(struct dev_dax *dev_dax, struct resource *res, resource_size_t size) adjust_dev_dax_range() argument 875 struct dev_dax *dev_dax = to_dev_dax(dev); size_show() local 885 alloc_is_aligned(struct dev_dax *dev_dax, resource_size_t size) alloc_is_aligned() argument 894 dev_dax_shrink(struct dev_dax *dev_dax, resource_size_t size) dev_dax_shrink() argument 938 adjust_ok(struct dev_dax *dev_dax, struct resource *res) adjust_ok() argument 960 dev_dax_resize(struct dax_region *dax_region, struct dev_dax *dev_dax, resource_size_t size) dev_dax_resize() argument 1038 struct dev_dax *dev_dax = to_dev_dax(dev); size_store() local 1097 struct dev_dax *dev_dax = to_dev_dax(dev); mapping_store() local 1128 struct dev_dax *dev_dax = to_dev_dax(dev); align_show() local 1133 dev_dax_validate_align(struct dev_dax *dev_dax) dev_dax_validate_align() argument 1161 struct dev_dax *dev_dax = to_dev_dax(dev); align_store() local 1197 dev_dax_target_node(struct dev_dax *dev_dax) dev_dax_target_node() argument 1207 struct dev_dax *dev_dax = to_dev_dax(dev); target_node_show() local 1216 struct dev_dax *dev_dax = to_dev_dax(dev); resource_show() local 1250 struct dev_dax *dev_dax = to_dev_dax(dev); dev_dax_visible() local 1288 struct dev_dax *dev_dax = to_dev_dax(dev); dev_dax_release() local 1307 struct dev_dax *dev_dax; devm_create_dev_dax() local [all...] |
H A D | device.c | 17 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_da argument 106 __dev_dax_pmd_fault(struct dev_dax *dev_dax, struct vm_fault *vmf, pfn_t *pfn) __dev_dax_pmd_fault() argument 147 __dev_dax_pud_fault(struct dev_dax *dev_dax, struct vm_fault *vmf, pfn_t *pfn) __dev_dax_pud_fault() argument 188 __dev_dax_pud_fault(struct dev_dax *dev_dax, struct vm_fault *vmf, pfn_t *pfn) __dev_dax_pud_fault() argument 203 struct dev_dax *dev_dax = filp->private_data; dev_dax_huge_fault() local 262 struct dev_dax *dev_dax = filp->private_data; dev_dax_split() local 272 struct dev_dax *dev_dax = filp->private_data; dev_dax_pagesize() local 286 struct dev_dax *dev_dax = filp->private_data; dax_mmap() local 312 struct dev_dax *dev_dax = filp ? filp->private_data : NULL; dax_get_unmapped_area() local 348 struct dev_dax *dev_dax = dax_get_private(dax_dev); dax_open() local 365 struct dev_dax *dev_dax = filp->private_data; dax_release() local 386 dev_dax_kill(void *dev_dax) dev_dax_kill() argument 391 dev_dax_probe(struct dev_dax *dev_dax) dev_dax_probe() argument 455 dev_dax_remove(struct dev_dax *dev_dax) dev_dax_remove() argument [all...] |
H A D | kmem.c | 22 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, in dev_dax_kmem_probe() 139 dev_dax_kmem_remove(struct dev_dax *dev_dax) dev_dax_kmem_remove() argument 183 dev_dax_kmem_remove(struct dev_dax *dev_dax) dev_dax_kmem_remove() argument [all...] |
H A D | bus.h | 8 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);
|
H A D | dax-private.h | 50 * struct dev_dax - instance data for a subdivision of a dax region, and 54 * @target_node: effective numa node if dev_dax memory range is onlined 63 struct dev_dax { struct 81 static inline struct dev_dax *to_dev_dax(struct device *dev) in to_dev_dax() 83 return container_of(dev, struct dev_dax, dev); in to_dev_dax() 91 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/ |
H A D | compat.c | 15 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 in dax_pmem_compat_probe() [all...] |
H A D | core.c | 10 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() 71 /* child dev_dax instances now own the lifetime of the dax_region */ in __dax_pmem_probe() 74 return dev_dax; in __dax_pmem_probe()
|
/kernel/linux/linux-5.10/tools/testing/nvdimm/ |
H A D | dax-dev.c | 9 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-6.6/tools/testing/nvdimm/ |
H A D | dax-dev.c | 9 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/ |
H A D | hmem.c | 17 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() 42 /* child dev_dax instances now own the lifetime of the dax_region */ in dax_hmem_probe()
|