enable kexec
[linux-2.6.git] / include / asm-sparc / pci.h
index 623c068..d200a25 100644 (file)
@@ -87,12 +87,6 @@ extern dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page,
 extern void pci_unmap_page(struct pci_dev *hwdev,
                        dma_addr_t dma_address, size_t size, int direction);
 
-/* map_page and map_single cannot fail */
-static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
-{
-       return 0;
-}
-
 /* Map a set of buffers described by scatterlist in streaming
  * mode for DMA.  This is the scather-gather version of the
  * above pci_map_single interface.  Here the scatter gather list
@@ -154,6 +148,13 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev)
 {
 }
 
+#define PCI_DMA_ERROR_CODE      (~(dma_addr_t)0x0)
+
+static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
+{
+        return (dma_addr == PCI_DMA_ERROR_CODE);
+}
+
 #endif /* __KERNEL__ */
 
 /* generic pci stuff */