bad:
spin_unlock_irqrestore(&iommu->lock, flags);
- BUG();
- return 0;
+ return PCI_DMA_ERROR_CODE;
}
/* Unmap a single streaming mode DMA translation. */
bad:
spin_unlock_irqrestore(&iommu->lock, flags);
- BUG();
- return 0;
+ return PCI_DMA_ERROR_CODE;
}
/* Unmap a set of streaming mode DMA translations. */
*/
}
+#define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0)
+
+static inline int pci_dma_error(dma_addr_t dma_addr)
+{
+ return (dma_addr == PCI_DMA_ERROR_CODE);
+}
+
/* Return the index of the PCI controller for device PDEV. */
extern int pci_domain_nr(struct pci_bus *bus);