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

MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled

Don't set octeon_dma_bar_type if PCI is disabled. This avoids creation
of the MSI irqchip later on, and saves a bit of memory.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: a214720cbf50 ("Disable MSI also when pcie-octeon.pcie_disable on")
Cc: stable@vger.kernel.org # v3.3+
Cc: linux-mips@vger.kernel.org

authored by

Aaro Koskinen and committed by
Paul Burton
dcf300a6 1ca1c87f

+5 -5
+5 -5
arch/mips/pci/pci-octeon.c
··· 568 568 if (octeon_has_feature(OCTEON_FEATURE_PCIE)) 569 569 return 0; 570 570 571 + if (!octeon_is_pci_host()) { 572 + pr_notice("Not in host mode, PCI Controller not initialized\n"); 573 + return 0; 574 + } 575 + 571 576 /* Point pcibios_map_irq() to the PCI version of it */ 572 577 octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq; 573 578 ··· 583 578 octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_SMALL; 584 579 else 585 580 octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG; 586 - 587 - if (!octeon_is_pci_host()) { 588 - pr_notice("Not in host mode, PCI Controller not initialized\n"); 589 - return 0; 590 - } 591 581 592 582 /* PCI I/O and PCI MEM values */ 593 583 set_io_port_base(OCTEON_PCI_IOSPACE_BASE);