1. 08 Dec, 2020 2 commits
  2. 07 Dec, 2020 5 commits
  3. 01 Dec, 2020 3 commits
  4. 23 Nov, 2020 4 commits
  5. 19 Nov, 2020 15 commits
    • Rob Herring's avatar
      PCI: dwc: Detect number of iATU windows · 281f1f99
      Rob Herring authored
      Currently the number of inbound and outbound iATU windows are determined
      from DT properties. Unfortunately, there's 'num-viewport' for RC mode
      and 'num-ib-windows' and 'num-ob-windows' for EP mode, yet the number of
      windows is not mode dependent. Also, 'num-viewport' is not clear whether
      that's inbound, outbound or both. We can probably assume it's outbound
      windows as that's all RC mode uses.
      
      However, using DT properties isn't really needed as the number of
      regions can be detected at runtime by poking the iATU registers. The
      basic algorithm is just writing a target address and reading back what
      we wrote. In the unrolled ATU case, we have to take care not to go
      past the mapped region.
      
      With this, we can drop num_viewport in favor of num_ob_windows instead.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-17-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Jingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: linux-tegra@vger.kernel.org
      281f1f99
    • Rob Herring's avatar
      PCI: dwc: Move inbound and outbound windows to common struct · 9ca17af5
      Rob Herring authored
      The number of inbound and outbound windows are defined by the h/w and
      apply to both RC and EP modes, so move them to the appropriate struct.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-16-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Jingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      9ca17af5
    • Rob Herring's avatar
      Revert "PCI: dwc/keystone: Drop duplicated 'num-viewport'" · fcde3974
      Rob Herring authored
      This reverts commit 421063ef.
      
      In preparation to detect the number of iATU regions instead of using DT
      properties, we need to keep reading 'num-viewport' for the Keystone
      driver which doesn't use the iATU in older versions of the IP.
      
      However, note that Keystone has been broken for some time with upstream
      dts files which don't set 'num-viewports'. The reverted commit did
      make the property optional, but now it's mandatory again.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-15-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      fcde3974
    • Rob Herring's avatar
      PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() · 60f5b73f
      Rob Herring authored
      Many calls to dw_pcie_host_init() are in a wrapper function with
      nothing else now. Let's remove the pointless extra layer.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-14-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Richard Zhu <hongxing.zhu@nxp.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Yue Wang <yue.wang@Amlogic.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Jonathan Chocron <jonnyc@amazon.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Xiaowei Song <songxiaowei@hisilicon.com>
      Cc: Binghui Wang <wangbinghui@hisilicon.com>
      Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-arm-kernel@axis.com
      60f5b73f
    • Rob Herring's avatar
      PCI: dwc: Move dw_pcie_setup_rc() to DWC common code · b9ac0f9d
      Rob Herring authored
      All RC complex drivers must call dw_pcie_setup_rc(). The ordering of the
      call shouldn't be too important other than being after any RC resets.
      
      There's a few calls of dw_pcie_setup_rc() left as drivers implementing
      suspend/resume need it.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-13-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Richard Zhu <hongxing.zhu@nxp.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Yue Wang <yue.wang@Amlogic.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Xiaowei Song <songxiaowei@hisilicon.com>
      Cc: Binghui Wang <wangbinghui@hisilicon.com>
      Cc: Andy Gross <agross@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
      Cc: Pratyush Anand <pratyush.anand@gmail.com>
      Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: linux-omap@vger.kernel.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-arm-kernel@axis.com
      Cc: linux-arm-msm@vger.kernel.org
      b9ac0f9d
    • Rob Herring's avatar
      PCI: dwc: Move dw_pcie_msi_init() into core · 59fbab1a
      Rob Herring authored
      The host drivers which call dw_pcie_msi_init() are all the ones using
      the built-in MSI controller, so let's move it into the common DWC code.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-12-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Richard Zhu <hongxing.zhu@nxp.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Yue Wang <yue.wang@Amlogic.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Xiaowei Song <songxiaowei@hisilicon.com>
      Cc: Binghui Wang <wangbinghui@hisilicon.com>
      Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
      Cc: Andy Gross <agross@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Pratyush Anand <pratyush.anand@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: linux-omap@vger.kernel.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-arm-kernel@axis.com
      Cc: linux-arm-msm@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      59fbab1a
    • Rob Herring's avatar
      PCI: dwc: Move link handling into common code · 886a9c13
      Rob Herring authored
      All the DWC drivers do link setup and checks at roughly the same time.
      Let's use the existing .start_link() hook (currently only used in EP
      mode) and move the link handling to the core code.
      
      The behavior for a link down was inconsistent as some drivers would fail
      probe in that case while others succeed. Let's standardize this to
      succeed as there are usecases where devices (and the link) appear later
      even without hotplug. For example, a reconfigured FPGA device.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-11-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Richard Zhu <hongxing.zhu@nxp.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Yue Wang <yue.wang@Amlogic.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Xiaowei Song <songxiaowei@hisilicon.com>
      Cc: Binghui Wang <wangbinghui@hisilicon.com>
      Cc: Andy Gross <agross@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
      Cc: Pratyush Anand <pratyush.anand@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: linux-omap@vger.kernel.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-arm-kernel@axis.com
      Cc: linux-arm-msm@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      886a9c13
    • Rob Herring's avatar
      PCI: dwc: Rework MSI initialization · f78f0263
      Rob Herring authored
      There are 3 possible MSI implementations for the DWC host. The first is
      using the built-in DWC MSI controller. The 2nd is a custom MSI
      controller as part of the PCI host (keystone only). The 3rd is an
      external MSI controller (typically GICv3 ITS). Currently, the last 2
      are distinguished with a .msi_host_init() hook with the 3rd option using
      an empty function. However we can detect the 3rd case with the presence
      of 'msi-parent' or 'msi-map' properties, so let's do that instead and
      remove the empty functions.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-10-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      f78f0263
    • Rob Herring's avatar
      PCI: dwc: Move MSI interrupt setup into DWC common code · 5bcb1757
      Rob Herring authored
      Platforms using the built-in DWC MSI controller all have a dedicated
      interrupt with "msi" name or at index 0, so let's move setting up the
      interrupt to the common DWC code.
      
      spear13xx and dra7xx are the 2 oddballs with muxed interrupts, so
      we need to prevent configuring the MSI interrupt by setting msi_irq
      to negative.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-9-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Richard Zhu <hongxing.zhu@nxp.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Yue Wang <yue.wang@Amlogic.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Xiaowei Song <songxiaowei@hisilicon.com>
      Cc: Binghui Wang <wangbinghui@hisilicon.com>
      Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
      Cc: Andy Gross <agross@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Pratyush Anand <pratyush.anand@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-arm-kernel@axis.com
      Cc: linux-arm-msm@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      5bcb1757
    • Rob Herring's avatar
      PCI: dwc: Drop the .set_num_vectors() host op · 331e9bce
      Rob Herring authored
      There's no reason for the .set_num_vectors() host op. Drivers needing a
      non-default value can just initialize pcie_port.num_vectors directly.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-8-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: linux-tegra@vger.kernel.org
      331e9bce
    • Rob Herring's avatar
      PCI: dwc/dra7xx: Use the common MSI irq_chip · 7f170d35
      Rob Herring authored
      The dra7xx MSI irq_chip implementation is identical to the default DWC one.
      The only difference is the interrupt handler as the MSI interrupt is muxed
      with other interrupts, but that doesn't affect the irq_chip part of it.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-7-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: linux-omap@vger.kernel.org
      7f170d35
    • Rob Herring's avatar
      PCI: dwc: Ensure all outbound ATU windows are reset · 458ad06c
      Rob Herring authored
      The Layerscape driver clears the ATU registers which may have been
      configured by the bootloader. Any driver could have the same issue
      and doing it for all drivers doesn't hurt, so let's move it into the
      common DWC code.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-6-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Jingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      458ad06c
    • Rob Herring's avatar
      PCI: dwc/intel-gw: Remove some unneeded function wrappers · 1cc9a559
      Rob Herring authored
      Remove some of the pointless levels of functions that just wrap or group
      a series of other functions.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-5-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      1cc9a559
    • Rob Herring's avatar
      PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code · a0fd361d
      Rob Herring authored
      Most DWC drivers use the common register resource names "dbi", "dbi2", and
      "addr_space", so let's move their setup into the DWC common code.
      
      This means 'dbi_base' in particular is setup later, but it looks like no
      drivers touch DBI registers before dw_pcie_host_init or dw_pcie_ep_init.
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-4-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Minghuan Lian <minghuan.Lian@nxp.com>
      Cc: Mingkai Hu <mingkai.hu@nxp.com>
      Cc: Roy Zang <roy.zang@nxp.com>
      Cc: Jonathan Chocron <jonnyc@amazon.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Xiaowei Song <songxiaowei@hisilicon.com>
      Cc: Binghui Wang <wangbinghui@hisilicon.com>
      Cc: Andy Gross <agross@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
      Cc: Pratyush Anand <pratyush.anand@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: linux-omap@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-arm-kernel@axis.com
      Cc: linux-arm-msm@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      a0fd361d
    • Rob Herring's avatar
      PCI: dwc/intel-gw: Move ATU offset out of driver match data · 1d567aac
      Rob Herring authored
      The ATU offset should be a register range in DT called 'atu', not driver
      match data. Any future platforms with a different ATU offset should add
      it to their DT.
      
      This is also in preparation to do DBI resource setup in the core DWC
      code, so let's move setting atu_base later in intel_pcie_rc_setup().
      
      Link: https://lore.kernel.org/r/20201105211159.1814485-3-robh@kernel.orgTested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      1d567aac
  6. 18 Nov, 2020 3 commits
  7. 09 Nov, 2020 1 commit
  8. 08 Nov, 2020 7 commits
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.10-rc3' of... · 15f5d201
      Linus Torvalds authored
      Merge tag 'driver-core-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core documentation fixes from Greg KH:
       "Some small Documentation fixes that were fallout from the larger
        documentation update we did in 5.10-rc2.
      
        Nothing major here at all, but all of these have been in linux-next
        and resolve build warnings when building the documentation files"
      
      * tag 'driver-core-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Documentation: remove mic/index from misc-devices/index.rst
        scripts: get_api.pl: Add sub-titles to ABI output
        scripts: get_abi.pl: Don't let ABI files to create subtitles
        docs: leds: index.rst: add a missing file
        docs: ABI: sysfs-class-net: fix a typo
        docs: ABI: sysfs-driver-dma-ioatdma: what starts with /sys
      15f5d201
    • Linus Torvalds's avatar
      Merge tag 'tty-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · bbc82184
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are a small number of small tty and serial fixes for some
        reported problems for the tty core, vt code, and some serial drivers.
      
        They include fixes for:
      
         - a buggy and obsolete vt font ioctl removal
      
         - 8250_mtk serial baudrate runtime warnings
      
         - imx serial earlycon build configuration fix
      
         - txx9 serial driver error path cleanup issues
      
         - tty core fix in release_tty that can be triggered by trying to bind
           an invalid serial port name to a speakup console device
      
        Almost all of these have been in linux-next without any problems, the
        only one that hasn't, just deletes code :)"
      
      * tag 'tty-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        vt: Disable KD_FONT_OP_COPY
        tty: fix crash in release_tty if tty->port is not set
        serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init
        tty: serial: imx: enable earlycon by default if IMX_SERIAL_CONSOLE is enabled
        serial: 8250_mtk: Fix uart_get_baud_rate warning
      bbc82184
    • Linus Torvalds's avatar
      Merge tag 'usb-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · df53b815
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes and new device ids:
      
         - USB gadget fixes for some reported issues
      
         - Fixes for the ever-troublesome apple fastcharge driver, hopefully
           we finally have it right.
      
         - More USB core quirks for odd devices
      
         - USB serial driver fixes for some long-standing issues that were
           recently found
      
         - some new USB serial driver device ids
      
        All have been in linux-next with no reported issues"
      
      * tag 'usb-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: apple-mfi-fastcharge: fix reference leak in apple_mfi_fc_set_property
        usb: mtu3: fix panic in mtu3_gadget_stop()
        USB: serial: option: add Telit FN980 composition 0x1055
        USB: serial: option: add LE910Cx compositions 0x1203, 0x1230, 0x1231
        USB: serial: cyberjack: fix write-URB completion race
        USB: Add NO_LPM quirk for Kingston flash drive
        USB: serial: option: add Quectel EC200T module support
        usb: raw-gadget: fix memory leak in gadget_setup
        usb: dwc2: Avoid leaving the error_debugfs label unused
        usb: dwc3: ep0: Fix delay status handling
        usb: gadget: fsl: fix null pointer checking
        usb: gadget: goku_udc: fix potential crashes in probe
        usb: dwc3: pci: add support for the Intel Alder Lake-S
      df53b815
    • Eddy Wu's avatar
      fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent · b4e00444
      Eddy Wu authored
      current->group_leader->exit_signal may change during copy_process() if
      current->real_parent exits.
      
      Move the assignment inside tasklist_lock to avoid the race.
      Signed-off-by: default avatarEddy Wu <eddy_wu@trendmicro.com>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b4e00444
    • Daniel Vetter's avatar
      vt: Disable KD_FONT_OP_COPY · 3c4e0dff
      Daniel Vetter authored
      It's buggy:
      
      On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
      > We recently discovered a slab-out-of-bounds read in fbcon in the latest
      > kernel ( v5.10-rc2 for now ).  The root cause of this vulnerability is that
      > "fbcon_do_set_font" did not handle "vc->vc_font.data" and
      > "vc->vc_font.height" correctly, and the patch
      > <https://lkml.org/lkml/2020/9/27/223> for VT_RESIZEX can't handle this
      > issue.
      >
      > Specifically, we use KD_FONT_OP_SET to set a small font.data for tty6, and
      > use  KD_FONT_OP_SET again to set a large font.height for tty1. After that,
      > we use KD_FONT_OP_COPY to assign tty6's vc_font.data to tty1's vc_font.data
      > in "fbcon_do_set_font", while tty1 retains the original larger
      > height. Obviously, this will cause an out-of-bounds read, because we can
      > access a smaller vc_font.data with a larger vc_font.height.
      
      Further there was only one user ever.
      - Android's loadfont, busybox and console-tools only ever use OP_GET
        and OP_SET
      - fbset documentation only mentions the kernel cmdline font: option,
        not anything else.
      - systemd used OP_COPY before release 232 published in Nov 2016
      
      Now unfortunately the crucial report seems to have gone down with
      gmane, and the commit message doesn't say much. But the pull request
      hints at OP_COPY being broken
      
      https://github.com/systemd/systemd/pull/3651
      
      So in other words, this never worked, and the only project which
      foolishly every tried to use it, realized that rather quickly too.
      
      Instead of trying to fix security issues here on dead code by adding
      missing checks, fix the entire thing by removing the functionality.
      
      Note that systemd code using the OP_COPY function ignored the return
      value, so it doesn't matter what we're doing here really - just in
      case a lone server somewhere happens to be extremely unlucky and
      running an affected old version of systemd. The relevant code from
      font_copy_to_all_vcs() in systemd was:
      
      	/* copy font from active VT, where the font was uploaded to */
      	cfo.op = KD_FONT_OP_COPY;
      	cfo.height = vcs.v_active-1; /* tty1 == index 0 */
      	(void) ioctl(vcfd, KDFONTOP, &cfo);
      
      Note this just disables the ioctl, garbage collecting the now unused
      callbacks is left for -next.
      
      v2: Tetsuo found the old mail, which allowed me to find it on another
      archive. Add the link too.
      Acked-by: default avatarPeilin Ye <yepeilin.cs@gmail.com>
      Reported-by: default avatarMinh Yuan <yuanmingbuaa@gmail.com>
      References: https://lists.freedesktop.org/archives/systemd-devel/2016-June/036935.html
      References: https://github.com/systemd/systemd/pull/3651
      Cc: Greg KH <greg@kroah.com>
      Cc: Peilin Ye <yepeilin.cs@gmail.com>
      Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://lore.kernel.org/r/20201108153806.3140315-1-daniel.vetter@ffwll.chSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3c4e0dff
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.10-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 9dbc1c03
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
      
       - Fix an uninitialized struct problem
      
       - Fix an iomap problem zeroing unwritten EOF blocks
      
       - Fix some clumsy error handling when writeback fails on filesystems
         with blocksize < pagesize
      
       - Fix a retry loop not resetting loop variables properly
      
       - Fix scrub flagging rtinherit inodes on a non-rt fs, since the kernel
         actually does permit that combination
      
       - Fix excessive page cache flushing when unsharing part of a file
      
      * tag 'xfs-5.10-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: only flush the unshared range in xfs_reflink_unshare
        xfs: fix scrub flagging rtinherit even if there is no rt device
        xfs: fix missing CoW blocks writeback conversion retry
        iomap: clean up writeback state logic on writepage error
        iomap: support partial page discard on writeback block mapping failure
        xfs: flush new eof page on truncate to avoid post-eof corruption
        xfs: set xefi_discard when creating a deferred agfl free log intent item
      9dbc1c03
    • Linus Torvalds's avatar
      Merge branch 'hch' (patches from Christoph) · 6b2c4d52
      Linus Torvalds authored
      Merge procfs splice read fixes from Christoph Hellwig:
       "Greg reported a problem due to the fact that Android tests use procfs
        files to test splice, which stopped working with the changes for
        set_fs() removal.
      
        This series adds read_iter support for seq_file, and uses those for
        various proc files using seq_file to restore splice read support"
      
      [ Side note: Christoph initially had a scripted "move everything over"
        patch, which looks fine, but I personally would prefer us to actively
        discourage splice() on random files.  So this does just the minimal
        basic core set of proc file op conversions.
      
        For completeness, and in case people care, that script was
      
           sed -i -e 's/\.proc_read\(\s*=\s*\)seq_read/\.proc_read_iter\1seq_read_iter/g'
      
        but I'll wait and see if somebody has a strong argument for using
        splice on random small /proc files before I'd run it on the whole
        kernel.   - Linus ]
      
      * emailed patches from Christoph Hellwig <hch@lst.de>:
        proc "seq files": switch to ->read_iter
        proc "single files": switch to ->read_iter
        proc/stat: switch to ->read_iter
        proc/cpuinfo: switch to ->read_iter
        proc: wire up generic_file_splice_read for iter ops
        seq_file: add seq_read_iter
      6b2c4d52