On Tue, Feb 04, 2020 at 03:14:06PM +0000, Robin Murphy wrote:
>> @@ -371,7 +359,10 @@ dma_addr_t dma_direct_map_page(struct device *dev, 
>> struct page *page,
>>              if (swiotlb_force != SWIOTLB_NO_FORCE)
>>                      return swiotlb_map(dev, phys, size, dir, attrs);
>>   -          report_addr(dev, dma_addr, size);
>> +            dev_err_once(dev,
>> +                         "DMA addr %pad+%zu overflow (mask %llx, bus limit 
>> %llx).\n",
>> +                         &dma_addr, size, *dev->dma_mask, 
>> dev->bus_dma_limit);
>> +            WARN_ON_ONCE(1);
>
> Or even dev_WARN_ONCE() to make them even simpler?

It looks like dev_WARN_ONCE supports format strings (unlike
WARN_ON_ONCE), so that sounds fine.  If there are no other comments
coming in I'll apply the patches with that change.
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to