mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
have a useful line reporting when IOMMU_BUG_ON trigger
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
This commit is contained in:
1 parent
9a0d977633
commit
206e4c4033
1 file changed
+7
-7
@@ -24,13 +24,13 @@ struct dma_coherent_mem {
|
||||
unsigned long *bitmap;
|
||||
};
|
||||
|
||||
static void iommu_bug(void)
|
||||
{
|
||||
printk(KERN_ALERT "Fatal DMA error! Please use 'swiotlb=force'\n");
|
||||
BUG();
|
||||
}
|
||||
|
||||
#define IOMMU_BUG_ON(test) do { if (unlikely(test)) iommu_bug(); } while(0)
|
||||
#define IOMMU_BUG_ON(test) \
|
||||
do { \
|
||||
if (unlikely(test)) { \
|
||||
printk(KERN_ALERT "Fatal DMA error! Please use 'swiotlb=force'\n"); \
|
||||
BUG(); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
int
|
||||
dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents,
|
||||
|
||||