Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-15 10:23:48 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-15 10:24:04 +0100
commitad48c1830c8b377edbc80fa0d29df6890fa42b5f (patch)
tree28310505b77e77e8155a0a080147907667d9a147
parent0454872a2c6c822d239e8165b156addfa3268627 (diff)
MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled
-rw-r--r--patches.kernel.org/4.20.9-025-MIPS-OCTEON-don-t-set-octeon_dma_bar_type-if-P.patch55
-rw-r--r--series.conf1
2 files changed, 56 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.9-025-MIPS-OCTEON-don-t-set-octeon_dma_bar_type-if-P.patch b/patches.kernel.org/4.20.9-025-MIPS-OCTEON-don-t-set-octeon_dma_bar_type-if-P.patch
new file mode 100644
index 0000000000..c9e1884bc9
--- /dev/null
+++ b/patches.kernel.org/4.20.9-025-MIPS-OCTEON-don-t-set-octeon_dma_bar_type-if-P.patch
@@ -0,0 +1,55 @@
+From: Aaro Koskinen <aaro.koskinen@iki.fi>
+Date: Sun, 27 Jan 2019 23:28:33 +0200
+Subject: [PATCH] MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is
+ disabled
+References: bnc#1012628
+Patch-mainline: 4.20.9
+Git-commit: dcf300a69ac307053dfb35c2e33972e754a98bce
+
+commit dcf300a69ac307053dfb35c2e33972e754a98bce upstream.
+
+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
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/mips/pci/pci-octeon.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c
+index 5017d5843c5a..fc29b85cfa92 100644
+--- a/arch/mips/pci/pci-octeon.c
++++ b/arch/mips/pci/pci-octeon.c
+@@ -568,6 +568,11 @@ static int __init octeon_pci_setup(void)
+ if (octeon_has_feature(OCTEON_FEATURE_PCIE))
+ return 0;
+
++ if (!octeon_is_pci_host()) {
++ pr_notice("Not in host mode, PCI Controller not initialized\n");
++ return 0;
++ }
++
+ /* Point pcibios_map_irq() to the PCI version of it */
+ octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq;
+
+@@ -579,11 +584,6 @@ static int __init octeon_pci_setup(void)
+ else
+ octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG;
+
+- if (!octeon_is_pci_host()) {
+- pr_notice("Not in host mode, PCI Controller not initialized\n");
+- return 0;
+- }
+-
+ /* PCI I/O and PCI MEM values */
+ set_io_port_base(OCTEON_PCI_IOSPACE_BASE);
+ ioport_resource.start = 0;
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index ad7d526d68..a7ea897683 100644
--- a/series.conf
+++ b/series.conf
@@ -1107,6 +1107,7 @@
patches.kernel.org/4.20.9-022-tracing-uprobes-Fix-typo-in-pr_fmt-string.patch
patches.kernel.org/4.20.9-023-mips-cm-reprime-error-cause.patch
patches.kernel.org/4.20.9-024-MIPS-Use-lower-case-for-addresses-in-nexys4ddr.patch
+ patches.kernel.org/4.20.9-025-MIPS-OCTEON-don-t-set-octeon_dma_bar_type-if-P.patch
########################################################
# Build fixes that apply to the vanilla kernel too.