• Home
  • Raw
  • Download

Lines Matching refs:dev

72 	struct device    *dev;  member
182 static bool driver_filter(struct device *dev) in driver_filter() argument
193 if (current_driver && dev && dev->driver == current_driver) in driver_filter()
197 if (!dev) in driver_filter()
204 drv = dev->driver; in driver_filter()
223 #define err_printk(dev, entry, format, arg...) do { \ argument
225 if (driver_filter(dev) && \
228 dev ? dev_driver_string(dev) : "NULL", \
229 dev ? dev_name(dev) : "NULL", ## arg); \
279 (a->dev == b->dev)) ? true : false; in exact_match()
285 if (a->dev != b->dev) in containing_match()
359 unsigned int max_range = dma_get_max_seg_size(ref->dev); in bucket_find_contain()
406 void debug_dma_dump_mappings(struct device *dev) in debug_dma_dump_mappings() argument
418 if (!dev || dev == entry->dev) { in debug_dma_dump_mappings()
419 dev_info(entry->dev, in debug_dma_dump_mappings()
603 err_printk(entry->dev, entry, in debug_dma_assert_idle()
930 static int device_dma_allocations(struct device *dev, struct dma_debug_entry **out_entry) in device_dma_allocations() argument
941 if (entry->dev == dev) { in device_dma_allocations()
956 struct device *dev = data; in dma_debug_device_change() local
965 count = device_dma_allocations(dev, &entry); in dma_debug_device_change()
968 err_printk(dev, entry, "DMA-API: device driver has pending " in dma_debug_device_change()
1088 if (dma_mapping_error(ref->dev, ref->dev_addr)) { in check_unmap()
1089 err_printk(ref->dev, NULL, in check_unmap()
1093 err_printk(ref->dev, NULL, in check_unmap()
1103 err_printk(ref->dev, entry, "DMA-API: device driver frees " in check_unmap()
1111 err_printk(ref->dev, entry, "DMA-API: device driver frees " in check_unmap()
1119 err_printk(ref->dev, entry, "DMA-API: device driver frees " in check_unmap()
1131 err_printk(ref->dev, entry, "DMA-API: device driver frees " in check_unmap()
1142 err_printk(ref->dev, entry, "DMA-API: device driver frees " in check_unmap()
1152 err_printk(ref->dev, entry, in check_unmap()
1166 static void check_for_stack(struct device *dev, void *addr) in check_for_stack() argument
1169 err_printk(dev, NULL, "DMA-API: device driver maps memory from " in check_for_stack()
1183 static void check_for_illegal_area(struct device *dev, void *addr, unsigned long len) in check_for_illegal_area() argument
1187 …err_printk(dev, NULL, "DMA-API: device driver maps memory from kernel text or rodata [addr=%p] [le… in check_for_illegal_area()
1190 static void check_sync(struct device *dev, in check_sync() argument
1203 err_printk(dev, NULL, "DMA-API: device driver tries " in check_sync()
1211 err_printk(dev, entry, "DMA-API: device driver syncs" in check_sync()
1224 err_printk(dev, entry, "DMA-API: device driver syncs " in check_sync()
1235 err_printk(dev, entry, "DMA-API: device driver syncs " in check_sync()
1245 err_printk(dev, entry, "DMA-API: device driver syncs " in check_sync()
1255 err_printk(ref->dev, entry, "DMA-API: device driver syncs " in check_sync()
1265 void debug_dma_map_page(struct device *dev, struct page *page, size_t offset, in debug_dma_map_page() argument
1274 if (dma_mapping_error(dev, dma_addr)) in debug_dma_map_page()
1281 entry->dev = dev; in debug_dma_map_page()
1296 check_for_stack(dev, addr); in debug_dma_map_page()
1297 check_for_illegal_area(dev, addr, size); in debug_dma_map_page()
1304 void debug_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) in debug_dma_mapping_error() argument
1314 ref.dev = dev; in debug_dma_mapping_error()
1342 void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, in debug_dma_unmap_page() argument
1347 .dev = dev, in debug_dma_unmap_page()
1363 void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, in debug_dma_map_sg() argument
1379 entry->dev = dev; in debug_dma_map_sg()
1389 check_for_stack(dev, sg_virt(s)); in debug_dma_map_sg()
1390 check_for_illegal_area(dev, sg_virt(s), sg_dma_len(s)); in debug_dma_map_sg()
1398 static int get_nr_mapped_entries(struct device *dev, in get_nr_mapped_entries() argument
1417 void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, in debug_dma_unmap_sg() argument
1430 .dev = dev, in debug_dma_unmap_sg()
1443 mapped_ents = get_nr_mapped_entries(dev, &ref); in debug_dma_unmap_sg()
1450 void debug_dma_alloc_coherent(struct device *dev, size_t size, in debug_dma_alloc_coherent() argument
1466 entry->dev = dev; in debug_dma_alloc_coherent()
1477 void debug_dma_free_coherent(struct device *dev, size_t size, in debug_dma_free_coherent() argument
1482 .dev = dev, in debug_dma_free_coherent()
1497 void debug_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, in debug_dma_sync_single_for_cpu() argument
1506 ref.dev = dev; in debug_dma_sync_single_for_cpu()
1512 check_sync(dev, &ref, true); in debug_dma_sync_single_for_cpu()
1516 void debug_dma_sync_single_for_device(struct device *dev, in debug_dma_sync_single_for_device() argument
1526 ref.dev = dev; in debug_dma_sync_single_for_device()
1532 check_sync(dev, &ref, false); in debug_dma_sync_single_for_device()
1536 void debug_dma_sync_single_range_for_cpu(struct device *dev, in debug_dma_sync_single_range_for_cpu() argument
1547 ref.dev = dev; in debug_dma_sync_single_range_for_cpu()
1553 check_sync(dev, &ref, true); in debug_dma_sync_single_range_for_cpu()
1557 void debug_dma_sync_single_range_for_device(struct device *dev, in debug_dma_sync_single_range_for_device() argument
1568 ref.dev = dev; in debug_dma_sync_single_range_for_device()
1574 check_sync(dev, &ref, false); in debug_dma_sync_single_range_for_device()
1578 void debug_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, in debug_dma_sync_sg_for_cpu() argument
1591 .dev = dev, in debug_dma_sync_sg_for_cpu()
1601 mapped_ents = get_nr_mapped_entries(dev, &ref); in debug_dma_sync_sg_for_cpu()
1606 check_sync(dev, &ref, true); in debug_dma_sync_sg_for_cpu()
1611 void debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, in debug_dma_sync_sg_for_device() argument
1624 .dev = dev, in debug_dma_sync_sg_for_device()
1633 mapped_ents = get_nr_mapped_entries(dev, &ref); in debug_dma_sync_sg_for_device()
1638 check_sync(dev, &ref, false); in debug_dma_sync_sg_for_device()