Update ia64 patch to 2.5.72-030619
[linux-flexiantxendom0-3.2.10.git] / include / asm-ia64 / pci.h
index 8ec4634..13e56cf 100644 (file)
@@ -26,11 +26,19 @@ struct pci_bus * pcibios_scan_root(void *acpi_handle, int segment, int bus);
 struct pci_dev;
 
 /*
- * The PCI address space does equal the physical memory address space.
- * The networking and block device layers use this boolean for bounce
- * buffer decisions.
+ * PCI_DMA_BUS_IS_PHYS should be set to 1 if there is _necessarily_ a direct correspondence
+ * between device bus addresses and CPU physical addresses.  Platforms with a hardware I/O
+ * MMU _must_ turn this off to suppress the bounce buffer handling code in the block and
+ * network device layers.  Platforms with separate bus address spaces _must_ turn this off
+ * and provide a device DMA mapping implementation that takes care of the necessary
+ * address translation.
+ *
+ * For now, the ia64 platforms which may have separate/multiple bus address spaces all
+ * have I/O MMUs which support the merging of physically discontiguous buffers, so we can
+ * use that as the sole factor to determine the setting of PCI_DMA_BUS_IS_PHYS.
  */
-#define PCI_DMA_BUS_IS_PHYS    (1)
+extern unsigned long ia64_max_iommu_merge_mask;
+#define PCI_DMA_BUS_IS_PHYS    (ia64_max_iommu_merge_mask == ~0UL)
 
 static inline void
 pcibios_set_master (struct pci_dev *dev)