]>
Commit | Line | Data |
---|---|---|
1f2a073c GKH |
1 | From 788d84bba47ea3eb377f7a3ae4fd1ee84b84877b Mon Sep 17 00:00:00 2001 |
2 | From: David Woodhouse <dwmw2@infradead.org> | |
3 | Date: Wed, 1 Jul 2009 18:34:52 +0100 | |
4 | Subject: Fix pci_unmap_addr() et al on i386. | |
5 | ||
6 | From: David Woodhouse <dwmw2@infradead.org> | |
7 | ||
8 | commit 788d84bba47ea3eb377f7a3ae4fd1ee84b84877b upstream. | |
9 | ||
10 | We can run a 32-bit kernel on boxes with an IOMMU, so we need | |
11 | pci_unmap_addr() etc. to work -- without it, drivers will leak mappings. | |
12 | ||
13 | To be honest, this whole thing looks like it's more pain than it's | |
14 | worth; I'm half inclined to remove the no-op #else case altogether. | |
15 | ||
16 | But this is the minimal fix, which just does the right thing if | |
17 | CONFIG_DMAR is set. | |
18 | ||
19 | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | |
20 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
22 | ||
23 | --- | |
24 | arch/x86/include/asm/pci.h | 2 +- | |
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
26 | ||
27 | --- a/arch/x86/include/asm/pci.h | |
28 | +++ b/arch/x86/include/asm/pci.h | |
29 | @@ -91,7 +91,7 @@ extern void pci_iommu_alloc(void); | |
30 | ||
31 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) | |
32 | ||
33 | -#if defined(CONFIG_X86_64) || defined(CONFIG_DMA_API_DEBUG) | |
34 | +#if defined(CONFIG_X86_64) || defined(CONFIG_DMAR) || defined(CONFIG_DMA_API_DEBUG) | |
35 | ||
36 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | |
37 | dma_addr_t ADDR_NAME; |