Initial support for Socionext Synquacer platform

This commit is contained in:
Peter Robinson 2017-10-06 17:00:52 +01:00
parent 1d26b74c88
commit d12373bff7
27 changed files with 3161 additions and 0 deletions

View File

@ -0,0 +1,55 @@
From patchwork Mon Oct 2 14:08:40 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: PCI: aspm: deal with missing root ports in link state handling
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
X-Patchwork-Id: 9980861
Message-Id: <20171002140840.7767-1-ard.biesheuvel@linaro.org>
To: linux-pci@vger.kernel.org, bhelgaas@google.com
Cc: graeme.gregory@linaro.org, leif.lindholm@linaro.org,
daniel.thompson@Linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>
Date: Mon, 2 Oct 2017 15:08:40 +0100
Even though it is unconventional, some PCIe host implementations omit
the root ports entirely, and simply consist of a host bridge (which
is not modeled as a device in the PCI hierarchy) and a link.
When the downstream device is an endpoint, our current code does not
seem to mind this unusual configuration. However, when PCIe switches
are involved, the ASPM code assumes that any downstream switch port
has a parent, and blindly derefences the bus->parent->self field of
the pci_dev struct to chain the downstream link state to the link
state of the root port. Given that the root port is missing, the link
is not modeled at all, and nor is the link state, and attempting to
access it results in a NULL pointer dereference and a crash.
So let's avoid this by allowing the link state chain to terminate at
the downstream port if no root port exists.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
drivers/pci/pcie/aspm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 1dfa10cc566b..0bea8498b5a5 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -802,10 +802,14 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
/*
* Root Ports and PCI/PCI-X to PCIe Bridges are roots of PCIe
- * hierarchies.
+ * hierarchies. Note that some PCIe host implementations omit
+ * the root ports entirely, in which case a downstream port on
+ * a switch may become the root of the link state chain for all
+ * its subordinate endpoints.
*/
if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT ||
- pci_pcie_type(pdev) == PCI_EXP_TYPE_PCIE_BRIDGE) {
+ pci_pcie_type(pdev) == PCI_EXP_TYPE_PCIE_BRIDGE ||
+ !pdev->bus->parent->self) {
link->root = link;
} else {
struct pcie_link_state *parent;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
# CONFIG_NET_VENDOR_SNI is not set

View File

@ -0,0 +1 @@
# CONFIG_PCIE_DW_HOST_ECAM is not set

View File

@ -0,0 +1 @@
CONFIG_NET_VENDOR_SNI=y

View File

@ -0,0 +1 @@
CONFIG_PCIE_DW_HOST_ECAM=y

View File

@ -0,0 +1 @@
CONFIG_SNI_NETSEC=m

View File

@ -0,0 +1 @@
CONFIG_SOCIONEXT_SYNQUACER_PREITS=y

View File

@ -3598,6 +3598,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
CONFIG_NET_VENDOR_SNI=y
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
# CONFIG_NET_VENDOR_SUN is not set
@ -3976,6 +3977,7 @@ CONFIG_PCIE_ARMADA_8K=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
CONFIG_PCIE_DW_HOST_ECAM=y
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_DW=y
@ -5385,8 +5387,10 @@ CONFIG_SND_VIRMIDI=m
CONFIG_SND_VIRTUOSO=m
CONFIG_SND_VX222=m
CONFIG_SND_YMFPCI=m
CONFIG_SNI_NETSEC=m
# CONFIG_SOC_BRCMSTB is not set
# CONFIG_SOC_CAMERA is not set
CONFIG_SOCIONEXT_SYNQUACER_PREITS=y
CONFIG_SOC_TEGRA_FLOWCTRL=y
# CONFIG_SOC_TI is not set
# CONFIG_SOC_ZTE is not set

View File

@ -3577,6 +3577,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
CONFIG_NET_VENDOR_SNI=y
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
# CONFIG_NET_VENDOR_SUN is not set
@ -3955,6 +3956,7 @@ CONFIG_PCIE_ARMADA_8K=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
CONFIG_PCIE_DW_HOST_ECAM=y
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_DW=y
@ -5362,8 +5364,10 @@ CONFIG_SND_VIRMIDI=m
CONFIG_SND_VIRTUOSO=m
CONFIG_SND_VX222=m
CONFIG_SND_YMFPCI=m
CONFIG_SNI_NETSEC=m
# CONFIG_SOC_BRCMSTB is not set
# CONFIG_SOC_CAMERA is not set
CONFIG_SOCIONEXT_SYNQUACER_PREITS=y
CONFIG_SOC_TEGRA_FLOWCTRL=y
# CONFIG_SOC_TI is not set
# CONFIG_SOC_ZTE is not set

View File

@ -3846,6 +3846,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
# CONFIG_NET_VENDOR_SUN is not set
@ -4267,6 +4268,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_DW=y

View File

@ -3669,6 +3669,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
# CONFIG_NET_VENDOR_SUN is not set
@ -4048,6 +4049,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_DW=y

View File

@ -3648,6 +3648,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
# CONFIG_NET_VENDOR_SUN is not set
@ -4027,6 +4028,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_DW=y

View File

@ -3825,6 +3825,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
# CONFIG_NET_VENDOR_SUN is not set
@ -4246,6 +4247,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_DW=y

View File

@ -3459,6 +3459,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
CONFIG_NET_VENDOR_SOLARFLARE=y
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3842,6 +3843,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3479,6 +3479,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
CONFIG_NET_VENDOR_SOLARFLARE=y
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3862,6 +3863,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3479,6 +3479,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
CONFIG_NET_VENDOR_SOLARFLARE=y
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3862,6 +3863,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3459,6 +3459,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
CONFIG_NET_VENDOR_SOLARFLARE=y
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3842,6 +3843,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3304,6 +3304,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3663,6 +3664,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3282,6 +3282,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3641,6 +3642,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3248,6 +3248,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3605,6 +3606,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3226,6 +3226,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3583,6 +3584,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3183,6 +3183,7 @@ CONFIG_NET_VENDOR_AQUANTIA=y
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
@ -3536,6 +3537,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3161,6 +3161,7 @@ CONFIG_NET_VENDOR_AQUANTIA=y
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SNI is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
@ -3514,6 +3515,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3521,6 +3521,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
CONFIG_NET_VENDOR_SOLARFLARE=y
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3910,6 +3911,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -3501,6 +3501,7 @@ CONFIG_NET_VENDOR_ROCKER=y
CONFIG_NET_VENDOR_SILAN=y
CONFIG_NET_VENDOR_SIS=y
CONFIG_NET_VENDOR_SMSC=y
# CONFIG_NET_VENDOR_SNI is not set
CONFIG_NET_VENDOR_SOLARFLARE=y
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_NET_VENDOR_SUN=y
@ -3890,6 +3891,7 @@ CONFIG_PCIEAER=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_DW_HOST_ECAM is not set
# CONFIG_PCIE_DW_PLAT is not set
CONFIG_PCIE_ECRC=y
# CONFIG_PCI_ENDPOINT is not set

View File

@ -617,6 +617,13 @@ Patch321: bcm283x-dma-mapping-skip-USB-devices-when-configuring-DMA-during-probe
#
Patch323: bcm2837-bluetooth-support.patch
# Generic fixes and enablement for Socionext SoC and 96board
# https://patchwork.kernel.org/patch/9980861/
Patch331: PCI-aspm-deal-with-missing-root-ports-in-link-state-handling.patch
# https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=synquacer-netsec
Patch332: arm64-socionext-96b-enablement.patch
# 400 - IBM (ppc/s390x) patches
# 500 - Temp fixes/CVEs etc
@ -2190,6 +2197,9 @@ fi
#
#
%changelog
* Fri Oct 6 2017 Peter Robinson <pbrobinson@fedoraproject.org>
- Initial support for Socionext Synquacer platform
* Thu Oct 05 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.14.0-0.rc3.git3.1
- Linux v4.14-rc3-315-g0f380715e51f