diff options
author | vh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk> | 2005-08-17 15:09:31 +0000 |
---|---|---|
committer | vh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk> | 2005-08-17 15:09:31 +0000 |
commit | 206e4c40331f96941aa4074ac1dbfe73bc1159bd (patch) | |
tree | ff9b964791a1b2fa409fed871dd5361710807b90 | |
parent | 9a0d977633132530791b16d00bcffe04125849e2 (diff) | |
download | xen-206e4c40331f96941aa4074ac1dbfe73bc1159bd.tar.gz xen-206e4c40331f96941aa4074ac1dbfe73bc1159bd.tar.bz2 xen-206e4c40331f96941aa4074ac1dbfe73bc1159bd.zip |
have a useful line reporting when IOMMU_BUG_ON trigger
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
-rw-r--r-- | linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c b/linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c index 481b61bc27..c9ade99d64 100644 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c @@ -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, |