diff options
| -rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 6 | ||||
| -rw-r--r-- | arch/x86/kernel/pci-gart_64.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 7f225a4b2a26..097794ff6b79 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h | |||
| @@ -71,15 +71,13 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev) | |||
| 71 | /* Make sure we keep the same behaviour */ | 71 | /* Make sure we keep the same behaviour */ |
| 72 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | 72 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
| 73 | { | 73 | { |
| 74 | #ifdef CONFIG_X86_32 | 74 | #ifdef CONFIG_X86_64 |
| 75 | return 0; | ||
| 76 | #else | ||
| 77 | struct dma_mapping_ops *ops = get_dma_ops(dev); | 75 | struct dma_mapping_ops *ops = get_dma_ops(dev); |
| 78 | if (ops->mapping_error) | 76 | if (ops->mapping_error) |
| 79 | return ops->mapping_error(dev, dma_addr); | 77 | return ops->mapping_error(dev, dma_addr); |
| 80 | 78 | ||
| 81 | return (dma_addr == bad_dma_address); | ||
| 82 | #endif | 79 | #endif |
| 80 | return (dma_addr == bad_dma_address); | ||
| 83 | } | 81 | } |
| 84 | 82 | ||
| 85 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 83 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index a42b02b4df68..ba7ad83e20a8 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
| @@ -123,6 +123,8 @@ static void free_iommu(unsigned long offset, int size) | |||
| 123 | 123 | ||
| 124 | spin_lock_irqsave(&iommu_bitmap_lock, flags); | 124 | spin_lock_irqsave(&iommu_bitmap_lock, flags); |
| 125 | iommu_area_free(iommu_gart_bitmap, offset, size); | 125 | iommu_area_free(iommu_gart_bitmap, offset, size); |
| 126 | if (offset >= next_bit) | ||
| 127 | next_bit = offset + size; | ||
| 126 | spin_unlock_irqrestore(&iommu_bitmap_lock, flags); | 128 | spin_unlock_irqrestore(&iommu_bitmap_lock, flags); |
| 127 | } | 129 | } |
| 128 | 130 | ||
