]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.30.2/fix-pci_unmap_addr-et-al-on-i386.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 2.6.30.2 / fix-pci_unmap_addr-et-al-on-i386.patch
CommitLineData
1f2a073c
GKH
1From 788d84bba47ea3eb377f7a3ae4fd1ee84b84877b Mon Sep 17 00:00:00 2001
2From: David Woodhouse <dwmw2@infradead.org>
3Date: Wed, 1 Jul 2009 18:34:52 +0100
4Subject: Fix pci_unmap_addr() et al on i386.
5
6From: David Woodhouse <dwmw2@infradead.org>
7
8commit 788d84bba47ea3eb377f7a3ae4fd1ee84b84877b upstream.
9
10We can run a 32-bit kernel on boxes with an IOMMU, so we need
11pci_unmap_addr() etc. to work -- without it, drivers will leak mappings.
12
13To be honest, this whole thing looks like it's more pain than it's
14worth; I'm half inclined to remove the no-op #else case altogether.
15
16But this is the minimal fix, which just does the right thing if
17CONFIG_DMAR is set.
18
19Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
20Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
21Signed-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;