Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: make PCI_DMA_BUS_IS_PHYS=1 constant

No one of supported MIPS machines has an IOMMU unit, so we can safely define
PCI_DMA_BUS_IS_PHYS = 1. Also remove iommu flag from the pci controller
structure, since it is useless.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Cc: Linux MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/7604/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Sergey Ryazanov and committed by
Ralf Baechle
e8b5325c 1e321fa9

+4 -20
+4 -6
arch/mips/include/asm/pci.h
··· 43 43 and XFree86. Eventually will be removed. */ 44 44 unsigned int need_domain_info; 45 45 46 - int iommu; 47 - 48 46 /* Optional access methods for reading/writing the bus number 49 47 of the PCI controller */ 50 48 int (*get_busno)(void); ··· 104 106 struct pci_dev; 105 107 106 108 /* 107 - * The PCI address space does equal the physical memory address space. The 108 - * networking and block device layers use this boolean for bounce buffer 109 - * decisions. This is set if any hose does not have an IOMMU. 109 + * The PCI address space does equal the physical memory address space. 110 + * The networking and block device layers use this boolean for bounce 111 + * buffer decisions. 110 112 */ 111 - extern unsigned int PCI_DMA_BUS_IS_PHYS; 113 + #define PCI_DMA_BUS_IS_PHYS (1) 112 114 113 115 #ifdef CONFIG_PCI_DOMAINS 114 116 #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
-7
arch/mips/kernel/setup.c
··· 52 52 #endif 53 53 54 54 /* 55 - * Despite it's name this variable is even if we don't have PCI 56 - */ 57 - unsigned int PCI_DMA_BUS_IS_PHYS; 58 - 59 - EXPORT_SYMBOL(PCI_DMA_BUS_IS_PHYS); 60 - 61 - /* 62 55 * Setup information 63 56 * 64 57 * These are initialized so they are in the .data section
-1
arch/mips/pci/pci-ip32.c
··· 116 116 .pci_ops = &mace_pci_ops, 117 117 .mem_resource = &mace_pci_mem_resource, 118 118 .io_resource = &mace_pci_io_resource, 119 - .iommu = 0, 120 119 .mem_offset = MACE_PCI_MEM_OFFSET, 121 120 .io_offset = 0, 122 121 .io_map_base = CKSEG1ADDR(MACEPCI_LOW_IO),
-3
arch/mips/pci/pci.c
··· 83 83 LIST_HEAD(resources); 84 84 struct pci_bus *bus; 85 85 86 - if (!hose->iommu) 87 - PCI_DMA_BUS_IS_PHYS = 1; 88 - 89 86 if (hose->get_busno && pci_has_flag(PCI_PROBE_ONLY)) 90 87 next_busno = (*hose->get_busno)(); 91 88
-3
arch/mips/pnx833x/common/setup.c
··· 38 38 39 39 int __init plat_mem_setup(void) 40 40 { 41 - /* fake pci bus to avoid bounce buffers */ 42 - PCI_DMA_BUS_IS_PHYS = 1; 43 - 44 41 /* set mips clock to 320MHz */ 45 42 #if defined(CONFIG_SOC_PNX8335) 46 43 PNX8335_WRITEFIELD(0x17, CLOCK_PLL_CPU_CTL, FREQ);