• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revision478fa857d1b94e9af904ee86be15fe5592c972d6 (tree)
Zeit2005-07-01 08:02:16
AutorAndi Kleen <ak@suse...>
CommiterMarcelo Tosatti

Log Message

[PATCH] x86-64: Fix build with !CONFIG_SWIOTLB

Allow compilation without CONFIG_SWIOTLB

Pointed out by Tymm Twillman. I did the patch slightly differently
than his version.

Signed-off-by: Andi Kleen <ak@suse.de>

Ändern Zusammenfassung

Diff

--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -47,6 +47,10 @@ int iommu_fullflush = 1;
4747 extern int fallback_aper_order;
4848 extern int fallback_aper_force;
4949
50+#ifdef CONFIG_SWIOTLB
51+extern char *io_tlb_start, *io_tlb_end;
52+#endif
53+
5054 /* Allocation bitmap for the remapping area */
5155 static spinlock_t iommu_bitmap_lock = SPIN_LOCK_UNLOCKED;
5256 static unsigned long *iommu_gart_bitmap; /* guarded by iommu_bitmap_lock */
@@ -234,10 +238,10 @@ void pci_free_consistent(struct pci_dev *hwdev, size_t size,
234238 void *vaddr, dma_addr_t bus)
235239 {
236240 unsigned long iommu_page;
237- extern char *io_tlb_start, *io_tlb_end;
238-
241+
239242 size = round_up(size, PAGE_SIZE);
240243 #ifdef CONFIG_SWIOTLB
244+ /* Overlap should not happen */
241245 if (swiotlb && vaddr >= (void *)io_tlb_start &&
242246 vaddr < (void *)io_tlb_end) {
243247 swiotlb_unmap_single (hwdev, bus, size, PCI_DMA_TODEVICE);
--- a/include/asm-x86_64/pci.h
+++ b/include/asm-x86_64/pci.h
@@ -65,8 +65,9 @@ extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
6565 extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
6666 void *vaddr, dma_addr_t dma_handle);
6767
68-#ifdef CONFIG_SWIOTLB
6968 extern int swiotlb;
69+
70+#ifdef CONFIG_SWIOTLB
7071 extern dma_addr_t swiotlb_map_single (struct pci_dev *hwdev, void *ptr, size_t size,
7172 int dir);
7273 extern void swiotlb_unmap_single (struct pci_dev *hwdev, dma_addr_t dev_addr,
Show on old repository browser