Skip to content

Commit

Permalink
Fix pci_unmap_addr() et al on i386.
Browse files Browse the repository at this point in the history
We can run a 32-bit kernel on boxes with an IOMMU, so we need
pci_unmap_addr() etc. to work -- without it, drivers will leak mappings.

To be honest, this whole thing looks like it's more pain than it's
worth; I'm half inclined to remove the no-op #else case altogether.

But this is the minimal fix, which just does the right thing if
CONFIG_DMAR is set.

Signed-off-by: David Woodhouse <[email protected]>
Cc: [email protected]  [ for 2.6.30 ]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dwmw2 authored and torvalds committed Jul 1, 2009
1 parent e2dbe12 commit 788d84b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extern void pci_iommu_alloc(void);

#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)

#if defined(CONFIG_X86_64) || defined(CONFIG_DMA_API_DEBUG)
#if defined(CONFIG_X86_64) || defined(CONFIG_DMAR) || defined(CONFIG_DMA_API_DEBUG)

#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
dma_addr_t ADDR_NAME;
Expand Down

0 comments on commit 788d84b

Please sign in to comment.