projects/linux·commit 00937f36

Merge tag 'pci-v5.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

00937f36 · Linus Torvalds <[email protected]> · 2020-10-22 12:41:00 -07:00

Pull PCI updates from Bjorn Helgaas:
 "Enumeration:
   - Print IRQ number used by PCIe Link Bandwidth Notification (Dongdong
     Liu)
   - Add schedule point in pci_read_config() to reduce max latency
     (Jiang Biao)
   - Add Kconfig options for MPS/MRRS strategy (Jim Quinlan)

  Resource management:
   - Fix pci_iounmap() memory leak when !CONFIG_GENERIC_IOMAP (Lorenzo
     Pieralisi)

  PCIe native device hotplug:
   - Reduce noisiness on hot removal (Lukas Wunner)

  Power management:
   - Revert "PCI/PM: Apply D2 delay as milliseconds, not microseconds"
     that was done on the basis of spec typo (Bjorn Helgaas)
   - Rename pci_dev.d3_delay to d3hot_delay to remove D3hot/D3cold
     ambiguity (Krzysztof Wilczyński)
   - Remove unused pcibios_pm_ops (Vaibhav Gupta)

  IOMMU:
   - Enable Translation Blocking for external devices to harden against
     DMA attacks (Rajat Jain)

  Error handling:
   - Add an ACPI APEI notifier chain for vendor CPER records to enable
     device-specific error handling (Shiju Jose)

  ASPM:
   - Remove struct aspm_register_info to simplify code (Saheed O.
     Bolarinwa)

  Amlogic Meson PCIe controller driver:
   - Build as module by default (Kevin Hilman)

  Ampere Altra PCIe controller driver:
   - Add MCFG quirk to work around non-standard ECAM implementation
     (Tuan Phan)

  Broadcom iProc PCIe controller driver:
   - Set affinity mask on MSI interrupts (Mark Tomlinson)

  Broadcom STB PCIe controller driver:
   - Make PCIE_BRCMSTB depend on ARCH_BRCMSTB (Jim Quinlan)
   - Add DT bindings for more Brcmstb chips (Jim Quinlan)
   - Add bcm7278 register info (Jim Quinlan)
   - Add bcm7278 PERST# support (Jim Quinlan)
   - Add suspend and resume pm_ops (Jim Quinlan)
   - Add control of rescal reset (Jim Quinlan)
   - Set additional internal memory DMA viewport sizes (Jim Quinlan)
   - Accommodate MSI for older chips (Jim Quinlan)
   - Set bus max burst size by chip type (Jim Quinlan)
   - Add support for bcm7211, bcm7216, bcm7445, bcm7278 (Jim Quinlan)

  Freescale i.MX6 PCIe controller driver:
   - Use dev_err_probe() to reduce redundant messages (Anson Huang)

  Freescale Layerscape PCIe controller driver:
   - Enforce 4K DMA buffer alignment in endpoint test (Hou Zhiqiang)
   - Add DT compatible strings for ls1088a, ls2088a (Xiaowei Bao)
   - Add endpoint support for ls1088a, ls2088a (Xiaowei Bao)
   - Add endpoint test support for lS1088a (Xiaowei Bao)
   - Add MSI-X support for ls1088a (Xiaowei Bao)

  HiSilicon HIP PCIe controller driver:
   - Handle HIP-specific errors via ACPI APEI (Yicong Yang)

  HiSilicon Kirin PCIe controller driver:
   - Return -EPROBE_DEFER if the GPIO isn't ready (Bean Huo)

  Intel VMD host bridge driver:
   - Factor out physical offset, bus offset, IRQ domain, IRQ allocation
     (Jon Derrick)
   - Use generic PCI PM correctly (Jon Derrick)

  Marvell Aardvark PCIe controller driver:
   - Fix compilation on s390 (Pali Rohár)
   - Implement driver 'remove' function and allow to build it as module
     (Pali Rohár)
   - Move PCIe reset card code to advk_pcie_train_link() (Pali Rohár)
   - Convert mvebu a3700 internal SMCC firmware return codes to errno
     (Pali Rohár)
   - Fix initialization with old Marvell's Arm Trusted Firmware (Pali
     Rohár)

  Microsoft Hyper-V host bridge driver:
   - Fix hibernation in case interrupts are not re-created (Dexuan Cui)

  NVIDIA Tegra PCIe controller driver:
   - Stop checking return value of debugfs_create() functions (Greg
     Kroah-Hartman)
   - Convert to use DEFINE_SEQ_ATTRIBUTE macro (Liu Shixin)

  Qualcomm PCIe controller driver:
   - Reset PCIe to work around Qsdk U-Boot issue (Ansuel Smith)

  Renesas R-Car PCIe controller driver:
   - Add DT documentation for r8a774a1, r8a774b1, r8a774e1 endpoints
     (Lad Prabhakar)
   - Add RZ/G2M, RZ/G2N, RZ/G2H IDs to endpoint test (Lad Prabhakar)
   - Add DT support for r8a7742 (Lad Prabhakar)

  Socionext UniPhier Pro5 controller driver:
   - Add DT descriptions of iATU register (host and endpoint) (Kunihiko
     Hayashi)

  Synopsys DesignWare PCIe controller driver:
   - Add link up check in dw_child_pcie_ops.map_bus() (racy, but seems
     unavoidable) (Hou Zhiqiang)
   - Fix endpoint Header Type check so multi-function devices work (Hou
     Zhiqiang)
   - Skip PCIE_MSI_INTR0* programming if MSI is disabled (Jisheng Zhang)
   - Stop leaking MSI page in suspend/resume (Jisheng Zhang)
   - Add common iATU register support instead of keystone-specific code
     (Kunihiko Hayashi)
   - Major config space access and other cleanups in dwc core and
     drivers that use it (al, exynos, histb, imx6, intel-gw, keystone,
     kirin, meson, qcom, tegra) (Rob Herring)
   - Add multiple PFs support for endpoint (Xiaowei Bao)
   - Add MSI-X doorbell mode in endpoint mode (Xiaowei Bao)

  Miscellaneous:
   - Use fallthrough pseudo-keyword (Gustavo A. R. Silva)
   - Fix "0 used as NULL pointer" warnings (Gustavo Pimentel)
   - Fix "cast truncates bits from constant value" warnings (Gustavo
     Pimentel)
   - Remove redundant zeroing for sg_init_table() (Julia Lawall)
   - Use scnprintf(), not snprintf(), in sysfs "show" functions
     (Krzysztof Wilczyński)
   - Remove unused assignments (Krzysztof Wilczyński)
   - Fix "0 used as NULL pointer" warning (Krzysztof Wilczyński)
   - Simplify bool comparisons (Krzysztof Wilczyński)
   - Use for_each_child_of_node() and for_each_node_by_name() (Qinglang
     Miao)
   - Simplify return expressions (Qinglang Miao)"

* tag 'pci-v5.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (147 commits)
  PCI: vmd: Update VMD PM to correctly use generic PCI PM
  PCI: vmd: Create IRQ allocation helper
  PCI: vmd: Create IRQ Domain configuration helper
  PCI: vmd: Create bus offset configuration helper
  PCI: vmd: Create physical offset helper
  PCI: v3-semi: Remove unneeded break
  PCI: dwc: Add link up check in dw_child_pcie_ops.map_bus()
  PCI/ASPM: Remove struct pcie_link_state.l1ss
  PCI/ASPM: Remove struct aspm_register_info.l1ss_cap
  PCI/ASPM: Pass L1SS Capabilities value, not struct aspm_register_info
  PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl1
  PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl2 (unused)
  PCI/ASPM: Remove struct aspm_register_info.l1ss_cap_ptr
  PCI/ASPM: Remove struct aspm_register_info.latency_encoding
  PCI/ASPM: Remove struct aspm_register_info.enabled
  PCI/ASPM: Remove struct aspm_register_info.support
  PCI/ASPM: Use 'parent' and 'child' for readability
  PCI/ASPM: Move LTR path check to where it's used
  PCI/ASPM: Move pci_clear_and_set_dword() earlier
  PCI: dwc: Fix MSI page leakage in suspend/resume
  ...
Commit
00937f36b09e89c74e4a059dbb8acbf4b971d5eb
Parents
96485e44 · 28e34e75

Merge commit. Changes below are compared with the first parent: 96485e44.

Changes

85 files changed · +2549 −1790

FileStatusAddDelContent
Documentation/devicetree/bindings/pci/brcm,stb-pcie.yamlmodified+49−7View file
Documentation/devicetree/bindings/pci/layerscape-pci.txtmodified+2−0View file
Documentation/devicetree/bindings/pci/rcar-pci-ep.yamlmodified+6−2View file
Documentation/devicetree/bindings/pci/rcar-pci.txtmodified+2−1View file
Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yamlmodified+14−6View file
Documentation/devicetree/bindings/pci/uniphier-pcie.txtmodified+1−0View file
Documentation/power/pci.rstmodified+1−1View file
arch/arm/include/asm/mach/pci.hmodified+0−7View file
arch/arm/kernel/bios32.cmodified+2−14View file
arch/sparc/include/asm/io_32.hmodified+7−10View file
arch/x86/pci/fixup.cmodified+1−1View file
arch/x86/pci/intel_mid_pci.cmodified+2−1View file
drivers/acpi/apei/ghes.cmodified+63−0View file
drivers/acpi/pci_mcfg.cmodified+21−1View file
drivers/hid/intel-ish-hid/ipc/ipc.cmodified+1−1View file
drivers/misc/pci_endpoint_test.cmodified+14−3View file
drivers/net/ethernet/marvell/sky2.cmodified+1−1View file
drivers/pci/Kconfigmodified+62−0View file
drivers/pci/controller/Kconfigmodified+10−2View file
drivers/pci/controller/Makefilemodified+1−0View file
drivers/pci/controller/cadence/pcie-cadence-ep.cmodified+0−1View file
drivers/pci/controller/cadence/pcie-cadence-host.cmodified+2−6View file
drivers/pci/controller/dwc/Kconfigmodified+2−1View file
drivers/pci/controller/dwc/pci-dra7xx.cmodified+17−29View file
drivers/pci/controller/dwc/pci-exynos.cmodified+25−20View file
drivers/pci/controller/dwc/pci-imx6.cmodified+33−54View file
drivers/pci/controller/dwc/pci-keystone.cmodified+38−108View file
drivers/pci/controller/dwc/pci-layerscape-ep.cmodified+75−25View file
drivers/pci/controller/dwc/pci-meson.cmodified+44−120View file
drivers/pci/controller/dwc/pcie-al.cmodified+17−53View file
drivers/pci/controller/dwc/pcie-artpec6.cmodified+5−43View file
drivers/pci/controller/dwc/pcie-designware-ep.cmodified+207−50View file
drivers/pci/controller/dwc/pcie-designware-host.cmodified+138−224View file
drivers/pci/controller/dwc/pcie-designware-plat.cmodified+1−3View file
drivers/pci/controller/dwc/pcie-designware.cmodified+98−72View file
drivers/pci/controller/dwc/pcie-designware.hmodified+65−45View file
drivers/pci/controller/dwc/pcie-histb.cmodified+24−21View file
drivers/pci/controller/dwc/pcie-intel-gw.cmodified+12−53View file
drivers/pci/controller/dwc/pcie-kirin.cmodified+27−22View file
drivers/pci/controller/dwc/pcie-qcom.cmodified+22−24View file
drivers/pci/controller/dwc/pcie-spear13xx.cmodified+6−33View file
drivers/pci/controller/dwc/pcie-tegra194.cmodified+38−102View file
drivers/pci/controller/dwc/pcie-uniphier.cmodified+1−2View file
drivers/pci/controller/mobiveil/pcie-mobiveil-host.cmodified+1−6View file
drivers/pci/controller/pci-aardvark.cmodified+69−39View file
drivers/pci/controller/pci-hyperv.cmodified+47−3View file
drivers/pci/controller/pci-loongson.cmodified+1−6View file
drivers/pci/controller/pci-mvebu.cmodified+0−3View file
drivers/pci/controller/pci-tegra.cmodified+7−44View file
drivers/pci/controller/pci-v3-semi.cmodified+0−1View file
drivers/pci/controller/pci-xgene-msi.cmodified+2−2View file
drivers/pci/controller/pcie-brcmstb.cmodified+381−63View file
drivers/pci/controller/pcie-hisi-error.cadded+327−0View file
drivers/pci/controller/pcie-iproc-bcma.cmodified+1−12View file
drivers/pci/controller/pcie-iproc-msi.cmodified+9−4View file
drivers/pci/controller/pcie-iproc-platform.cmodified+1−1View file
drivers/pci/controller/pcie-xilinx-cpm.cmodified+0−4View file
drivers/pci/controller/vmd.cmodified+181−125View file
drivers/pci/ecam.cmodified+10−0View file
drivers/pci/hotplug/pciehp_ctrl.cmodified+1−3View file
drivers/pci/hotplug/pciehp_hpc.cmodified+9−6View file
drivers/pci/hotplug/rpadlpar_core.cmodified+4−4View file
drivers/pci/hotplug/shpchp_ctrl.cmodified+0−1View file
drivers/pci/p2pdma.cmodified+5−5View file
drivers/pci/pci-acpi.cmodified+3−3View file
drivers/pci/pci-bridge-emul.cmodified+4−0View file
drivers/pci/pci-driver.cmodified+0−26View file
drivers/pci/pci-pf-stub.cmodified+1−13View file
drivers/pci/pci-sysfs.cmodified+4−3View file
drivers/pci/pci.cmodified+30−24View file
drivers/pci/pci.hmodified+4−5View file
drivers/pci/pcie/aspm.cmodified+143−151View file
drivers/pci/pcie/bw_notification.cmodified+3−0View file
drivers/pci/pcie/dpc.cmodified+5−2View file
drivers/pci/probe.cmodified+16−1View file
drivers/pci/quirks.cmodified+44−34View file
drivers/phy/marvell/phy-mvebu-a3700-comphy.cmodified+11−3View file
drivers/phy/marvell/phy-mvebu-cp110-comphy.cmodified+11−3View file
drivers/staging/media/atomisp/pci/atomisp_v4l2.cmodified+1−1View file
include/acpi/ghes.hmodified+18−0View file
include/asm-generic/io.hmodified+27−12View file
include/linux/pci-ecam.hmodified+1−0View file
include/linux/pci-ep-cfs.hmodified+2−2View file
include/linux/pci.hmodified+3−5View file
include/uapi/linux/pci_regs.hmodified+5−1View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml

View file
diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
index 8680a0f..807694b 100644
--- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
@@ -9,12 +9,15 @@ title: Brcmstb PCIe Host Controller Device Tree Bindings
maintainers:
- Nicolas Saenz Julienne <[email protected]>
-allOf:
- - $ref: /schemas/pci/pci-bus.yaml#
-
properties:
compatible:
- const: brcm,bcm2711-pcie # The Raspberry Pi 4
+ items:
+ - enum:
+ - brcm,bcm2711-pcie # The Raspberry Pi 4
+ - brcm,bcm7211-pcie # Broadcom STB version of RPi4
+ - brcm,bcm7278-pcie # Broadcom 7278 Arm
+ - brcm,bcm7216-pcie # Broadcom 7216 Arm
+ - brcm,bcm7445-pcie # Broadcom 7445 Arm
reg:
maxItems: 1
@@ -34,10 +37,12 @@ properties:
- const: msi
ranges:
- maxItems: 1
+ minItems: 1
+ maxItems: 4
dma-ranges:
- maxItems: 1
+ minItems: 1
+ maxItems: 6
clocks:
maxItems: 1
@@ -58,8 +63,31 @@ properties:
aspm-no-l0s: true
+ resets:
+ description: for "brcm,bcm7216-pcie", must be a valid reset
+ phandle pointing to the RESCAL reset controller provider node.
+ $ref: "/schemas/types.yaml#/definitions/phandle"
+
+ reset-names:
+ items:
+ - const: rescal
+
+ brcm,scb-sizes:
+ description: u64 giving the 64bit PCIe memory
+ viewport size of a memory controller. There may be up to
+ three controllers, and each size must be a power of two
+ with a size greater or equal to the amount of memory the
+ controller supports. Note that each memory controller
+ may have two component regions -- base and extended -- so
+ this information cannot be deduced from the dma-ranges.
+ $ref: /schemas/types.yaml#/definitions/uint64-array
+ items:
+ minItems: 1
+ maxItems: 3
+
required:
- reg
+ - ranges
- dma-ranges
- "#interrupt-cells"
- interrupts
@@ -68,6 +96,18 @@ required:
- interrupt-map
- msi-controller
+allOf:
+ - $ref: /schemas/pci/pci-bus.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm7216-pcie
+ then:
+ required:
+ - resets
+ - reset-names
+
unevaluatedProperties: false
examples:
@@ -93,7 +133,9 @@ examples:
msi-parent = <&pcie0>;
msi-controller;
ranges = <0x02000000 0x0 0xf8000000 0x6 0x00000000 0x0 0x04000000>;
- dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>;
+ dma-ranges = <0x42000000 0x1 0x00000000 0x0 0x40000000 0x0 0x80000000>,
+ <0x42000000 0x1 0x80000000 0x3 0x00000000 0x0 0x80000000>;
brcm,enable-ssc;
+ brcm,scb-sizes = <0x0000000080000000 0x0000000080000000>;
};
};

Documentation/devicetree/bindings/pci/layerscape-pci.txt

View file
diff --git a/Documentation/devicetree/bindings/pci/layerscape-pci.txt b/Documentation/devicetree/bindings/pci/layerscape-pci.txt
index 99a386e..daa99f7 100644
--- a/Documentation/devicetree/bindings/pci/layerscape-pci.txt
+++ b/Documentation/devicetree/bindings/pci/layerscape-pci.txt
@@ -24,6 +24,8 @@ Required properties:
"fsl,ls1028a-pcie"
EP mode:
"fsl,ls1046a-pcie-ep", "fsl,ls-pcie-ep"
+ "fsl,ls1088a-pcie-ep", "fsl,ls-pcie-ep"
+ "fsl,ls2088a-pcie-ep", "fsl,ls-pcie-ep"
- reg: base addresses and lengths of the PCIe controller register blocks.
- interrupts: A list of interrupt outputs of the controller. Must contain an
entry for each entry in the interrupt-names property.

Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml

View file
diff --git a/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml b/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
index 53d5952..84eeb7f 100644
--- a/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
@@ -14,8 +14,12 @@ maintainers:
properties:
compatible:
items:
- - const: renesas,r8a774c0-pcie-ep
- - const: renesas,rcar-gen3-pcie-ep
+ - enum:
+ - renesas,r8a774a1-pcie-ep # RZ/G2M
+ - renesas,r8a774b1-pcie-ep # RZ/G2N
+ - renesas,r8a774c0-pcie-ep # RZ/G2E
+ - renesas,r8a774e1-pcie-ep # RZ/G2H
+ - const: renesas,rcar-gen3-pcie-ep # R-Car Gen3 and RZ/G2
reg:
maxItems: 5

Documentation/devicetree/bindings/pci/rcar-pci.txt

View file
diff --git a/Documentation/devicetree/bindings/pci/rcar-pci.txt b/Documentation/devicetree/bindings/pci/rcar-pci.txt
index 1041c44..14d307d 100644
--- a/Documentation/devicetree/bindings/pci/rcar-pci.txt
+++ b/Documentation/devicetree/bindings/pci/rcar-pci.txt
@@ -1,7 +1,8 @@
* Renesas R-Car PCIe interface
Required properties:
-compatible: "renesas,pcie-r8a7743" for the R8A7743 SoC;
+compatible: "renesas,pcie-r8a7742" for the R8A7742 SoC;
+ "renesas,pcie-r8a7743" for the R8A7743 SoC;
"renesas,pcie-r8a7744" for the R8A7744 SoC;
"renesas,pcie-r8a774a1" for the R8A774A1 SoC;
"renesas,pcie-r8a774b1" for the R8A774B1 SoC;

Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml

View file
diff --git a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
index f0558b9..f4292d2 100644
--- a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
@@ -23,14 +23,22 @@ properties:
const: socionext,uniphier-pro5-pcie-ep
reg:
- maxItems: 4
+ minItems: 4
+ maxItems: 5
reg-names:
- items:
- - const: dbi
- - const: dbi2
- - const: link
- - const: addr_space
+ oneOf:
+ - items:
+ - const: dbi
+ - const: dbi2
+ - const: link
+ - const: addr_space
+ - items:
+ - const: dbi
+ - const: dbi2
+ - const: link
+ - const: addr_space
+ - const: atu
clocks:
maxItems: 2

Documentation/devicetree/bindings/pci/uniphier-pcie.txt

View file
diff --git a/Documentation/devicetree/bindings/pci/uniphier-pcie.txt b/Documentation/devicetree/bindings/pci/uniphier-pcie.txt
index 1fa2c59..c4b7381 100644
--- a/Documentation/devicetree/bindings/pci/uniphier-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/uniphier-pcie.txt
@@ -16,6 +16,7 @@ Required properties:
"dbi" - controller configuration registers
"link" - SoC-specific glue layer registers
"config" - PCIe configuration space
+ "atu" - iATU registers for DWC version 4.80 or later
- clocks: A phandle to the clock gate for PCIe glue layer including
the host controller.
- resets: A phandle to the reset line for PCIe glue layer including

Documentation/power/pci.rst

View file
diff --git a/Documentation/power/pci.rst b/Documentation/power/pci.rst
index 1831e43..b04fb18 100644
--- a/Documentation/power/pci.rst
+++ b/Documentation/power/pci.rst
@@ -320,7 +320,7 @@ that these callbacks operate on::
unsigned int d2_support:1; /* Low power state D2 is supported */
unsigned int no_d1d2:1; /* D1 and D2 are forbidden */
unsigned int wakeup_prepared:1; /* Device prepared for wake up */
- unsigned int d3_delay; /* D3->D0 transition time in ms */
+ unsigned int d3hot_delay; /* D3hot->D0 transition time in ms */
...
};

arch/arm/include/asm/mach/pci.h

View file
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index 83d3407..ea9bd08 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -17,10 +17,8 @@ struct pci_host_bridge;
struct device;
struct hw_pci {
- struct msi_controller *msi_ctrl;
struct pci_ops *ops;
int nr_controllers;
- unsigned int io_optional:1;
void **private_data;
int (*setup)(int nr, struct pci_sys_data *);
int (*scan)(int nr, struct pci_host_bridge *);
@@ -28,11 +26,6 @@ struct hw_pci {
void (*postinit)(void);
u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
- resource_size_t (*align_resource)(struct pci_dev *dev,
- const struct resource *res,
- resource_size_t start,
- resource_size_t size,
- resource_size_t align);
};
/*

arch/arm/kernel/bios32.c

View file
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index eecec16..e7ef2b5 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -394,8 +394,7 @@ static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
return irq;
}
-static int pcibios_init_resource(int busnr, struct pci_sys_data *sys,
- int io_optional)
+static int pcibios_init_resource(int busnr, struct pci_sys_data *sys)
{
int ret;
struct resource_entry *window;
@@ -405,14 +404,6 @@ static int pcibios_init_resource(int busnr, struct pci_sys_data *sys,
&iomem_resource, sys->mem_offset);
}
- /*
- * If a platform says I/O port support is optional, we don't add
- * the default I/O space. The platform is responsible for adding
- * any I/O space it needs.
- */
- if (io_optional)
- return 0;
-
resource_list_for_each_entry(window, &sys->resources)
if (resource_type(window->res) == IORESOURCE_IO)
return 0;
@@ -462,7 +453,7 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
if (ret > 0) {
- ret = pcibios_init_resource(nr, sys, hw->io_optional);
+ ret = pcibios_init_resource(nr, sys);
if (ret) {
pci_free_host_bridge(bridge);
break;
@@ -480,9 +471,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
bridge->sysdata = sys;
bridge->busnr = sys->busnr;
bridge->ops = hw->ops;
- bridge->msi = hw->msi_ctrl;
- bridge->align_resource =
- hw->align_resource;
ret = pci_scan_root_bus_bridge(bridge);
}

arch/sparc/include/asm/io_32.h

View file
diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h
index 9a52d95..549f0a7 100644
--- a/arch/sparc/include/asm/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
@@ -11,6 +11,13 @@
#define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz)
#define memcpy_toio(d,s,sz) _memcpy_toio(d,s,sz)
+/*
+ * Bus number may be embedded in the higher bits of the physical address.
+ * This is why we have no bus number argument to ioremap().
+ */
+void __iomem *ioremap(phys_addr_t offset, size_t size);
+void iounmap(volatile void __iomem *addr);
+
#include <asm-generic/io.h>
static inline void _memset_io(volatile void __iomem *dst,
@@ -121,14 +128,6 @@ static inline void sbus_memcpy_toio(volatile void __iomem *dst,
}
}
-#ifdef __KERNEL__
-
-/*
- * Bus number may be embedded in the higher bits of the physical address.
- * This is why we have no bus number argument to ioremap().
- */
-void __iomem *ioremap(phys_addr_t offset, size_t size);
-void iounmap(volatile void __iomem *addr);
/* Create a virtual mapping cookie for an IO port range */
void __iomem *ioport_map(unsigned long port, unsigned int nr);
void ioport_unmap(void __iomem *);
@@ -148,8 +147,6 @@ static inline int sbus_can_burst64(void)
struct device;
void sbus_set_sbus64(struct device *, int);
-#endif
-
#define __ARCH_HAS_NO_PAGE_ZERO_MAPPED 1

arch/x86/pci/fixup.c

View file
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index b8c9a5b..0a0e168 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -587,7 +587,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0xa26d, pci_invalid_bar);
static void pci_fixup_amd_ehci_pme(struct pci_dev *dev)
{
dev_info(&dev->dev, "PME# does not work under D3, disabling it\n");
- dev->pme_support &= ~((PCI_PM_CAP_PME_D3 | PCI_PM_CAP_PME_D3cold)
+ dev->pme_support &= ~((PCI_PM_CAP_PME_D3hot | PCI_PM_CAP_PME_D3cold)
>> PCI_PM_CAP_PME_SHIFT);
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7808, pci_fixup_amd_ehci_pme);

arch/x86/pci/intel_mid_pci.c

View file
diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
index 00c6211..24ca4ee 100644
--- a/arch/x86/pci/intel_mid_pci.c
+++ b/arch/x86/pci/intel_mid_pci.c
@@ -33,6 +33,7 @@
#include <asm/hw_irq.h>
#include <asm/io_apic.h>
#include <asm/intel-mid.h>
+#include <asm/acpi.h>
#define PCIE_CAP_OFFSET 0x100
@@ -322,7 +323,7 @@ static void pci_d3delay_fixup(struct pci_dev *dev)
*/
if (type1_access_ok(dev->bus->number, dev->devfn, PCI_DEVICE_ID))
return;
- dev->d3_delay = 0;
+ dev->d3hot_delay = 0;
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup);

drivers/acpi/apei/ghes.c

View file
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 81bf71b..99df00f 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -79,6 +79,12 @@
((struct acpi_hest_generic_status *) \
((struct ghes_estatus_node *)(estatus_node) + 1))
+#define GHES_VENDOR_ENTRY_LEN(gdata_len) \
+ (sizeof(struct ghes_vendor_record_entry) + (gdata_len))
+#define GHES_GDATA_FROM_VENDOR_ENTRY(vendor_entry) \
+ ((struct acpi_hest_generic_data *) \
+ ((struct ghes_vendor_record_entry *)(vendor_entry) + 1))
+
/*
* NMI-like notifications vary by architecture, before the compiler can prune
* unused static functions it needs a value for these enums.
@@ -123,6 +129,12 @@ static DEFINE_MUTEX(ghes_list_mutex);
*/
static DEFINE_SPINLOCK(ghes_notify_lock_irq);
+struct ghes_vendor_record_entry {
+ struct work_struct work;
+ int error_severity;
+ char vendor_record[];
+};
+
static struct gen_pool *ghes_estatus_pool;
static unsigned long ghes_estatus_pool_size_request;
@@ -511,6 +523,56 @@ static void ghes_handle_aer(struct acpi_hest_generic_data *gdata)
#endif
}
+static BLOCKING_NOTIFIER_HEAD(vendor_record_notify_list);
+
+int ghes_register_vendor_record_notifier(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_register(&vendor_record_notify_list, nb);
+}
+EXPORT_SYMBOL_GPL(ghes_register_vendor_record_notifier);
+
+void ghes_unregister_vendor_record_notifier(struct notifier_block *nb)
+{
+ blocking_notifier_chain_unregister(&vendor_record_notify_list, nb);
+}
+EXPORT_SYMBOL_GPL(ghes_unregister_vendor_record_notifier);
+
+static void ghes_vendor_record_work_func(struct work_struct *work)
+{
+ struct ghes_vendor_record_entry *entry;
+ struct acpi_hest_generic_data *gdata;
+ u32 len;
+
+ entry = container_of(work, struct ghes_vendor_record_entry, work);
+ gdata = GHES_GDATA_FROM_VENDOR_ENTRY(entry);
+
+ blocking_notifier_call_chain(&vendor_record_notify_list,
+ entry->error_severity, gdata);
+
+ len = GHES_VENDOR_ENTRY_LEN(acpi_hest_get_record_size(gdata));
+ gen_pool_free(ghes_estatus_pool, (unsigned long)entry, len);
+}
+
+static void ghes_defer_non_standard_event(struct acpi_hest_generic_data *gdata,
+ int sev)
+{
+ struct acpi_hest_generic_data *copied_gdata;
+ struct ghes_vendor_record_entry *entry;
+ u32 len;
+
+ len = GHES_VENDOR_ENTRY_LEN(acpi_hest_get_record_size(gdata));
+ entry = (void *)gen_pool_alloc(ghes_estatus_pool, len);
+ if (!entry)
+ return;
+
+ copied_gdata = GHES_GDATA_FROM_VENDOR_ENTRY(entry);
+ memcpy(copied_gdata, gdata, acpi_hest_get_record_size(gdata));
+ entry->error_severity = sev;
+
+ INIT_WORK(&entry->work, ghes_vendor_record_work_func);
+ schedule_work(&entry->work);
+}
+
static bool ghes_do_proc(struct ghes *ghes,
const struct acpi_hest_generic_status *estatus)
{
@@ -549,6 +611,7 @@ static bool ghes_do_proc(struct ghes *ghes,
} else {
void *err = acpi_hest_get_payload(gdata);
+ ghes_defer_non_standard_event(gdata, sev);
log_non_standard_event(sec_type, fru_id, fru_text,
sec_sev, err,
gdata->error_data_length);

drivers/acpi/pci_mcfg.c

View file
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
index 54b36b7..7ddd57a 100644
--- a/drivers/acpi/pci_mcfg.c
+++ b/drivers/acpi/pci_mcfg.c
@@ -142,6 +142,26 @@ static struct mcfg_fixup mcfg_quirks[] = {
XGENE_V2_ECAM_MCFG(4, 0),
XGENE_V2_ECAM_MCFG(4, 1),
XGENE_V2_ECAM_MCFG(4, 2),
+
+#define ALTRA_ECAM_QUIRK(rev, seg) \
+ { "Ampere", "Altra ", rev, seg, MCFG_BUS_ANY, &pci_32b_read_ops }
+
+ ALTRA_ECAM_QUIRK(1, 0),
+ ALTRA_ECAM_QUIRK(1, 1),
+ ALTRA_ECAM_QUIRK(1, 2),
+ ALTRA_ECAM_QUIRK(1, 3),
+ ALTRA_ECAM_QUIRK(1, 4),
+ ALTRA_ECAM_QUIRK(1, 5),
+ ALTRA_ECAM_QUIRK(1, 6),
+ ALTRA_ECAM_QUIRK(1, 7),
+ ALTRA_ECAM_QUIRK(1, 8),
+ ALTRA_ECAM_QUIRK(1, 9),
+ ALTRA_ECAM_QUIRK(1, 10),
+ ALTRA_ECAM_QUIRK(1, 11),
+ ALTRA_ECAM_QUIRK(1, 12),
+ ALTRA_ECAM_QUIRK(1, 13),
+ ALTRA_ECAM_QUIRK(1, 14),
+ ALTRA_ECAM_QUIRK(1, 15),
};
static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
@@ -280,5 +300,5 @@ void __init pci_mmcfg_late_init(void)
{
int err = acpi_table_parse(ACPI_SIG_MCFG, pci_mcfg_parse);
if (err)
- pr_err("Failed to parse MCFG (%d)\n", err);
+ pr_debug("Failed to parse MCFG (%d)\n", err);
}

drivers/hid/intel-ish-hid/ipc/ipc.c

View file
diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c
index 8f8dfdf..a45ac7f 100644
--- a/drivers/hid/intel-ish-hid/ipc/ipc.c
+++ b/drivers/hid/intel-ish-hid/ipc/ipc.c
@@ -755,7 +755,7 @@ static int _ish_hw_reset(struct ishtp_device *dev)
csr |= PCI_D3hot;
pci_write_config_word(pdev, pdev->pm_cap + PCI_PM_CTRL, csr);
- mdelay(pdev->d3_delay);
+ mdelay(pdev->d3hot_delay);
csr &= ~PCI_PM_CTRL_STATE_MASK;
csr |= PCI_D0;

drivers/misc/pci_endpoint_test.c

View file
diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index e060796..146ca6f 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -70,11 +70,15 @@
#define PCI_DEVICE_ID_TI_J721E 0xb00d
#define PCI_DEVICE_ID_TI_AM654 0xb00c
+#define PCI_DEVICE_ID_LS1088A 0x80c0
#define is_am654_pci_dev(pdev) \
((pdev)->device == PCI_DEVICE_ID_TI_AM654)
+#define PCI_DEVICE_ID_RENESAS_R8A774A1 0x0028
+#define PCI_DEVICE_ID_RENESAS_R8A774B1 0x002b
#define PCI_DEVICE_ID_RENESAS_R8A774C0 0x002d
+#define PCI_DEVICE_ID_RENESAS_R8A774E1 0x0025
static DEFINE_IDA(pci_endpoint_test_ida);
@@ -945,13 +949,20 @@ static const struct pci_device_id pci_endpoint_test_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA72x),
.driver_data = (kernel_ulong_t)&default_data,
},
- { PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, 0x81c0) },
+ { PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, 0x81c0),
+ .driver_data = (kernel_ulong_t)&default_data,
+ },
+ { PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, PCI_DEVICE_ID_LS1088A),
+ .driver_data = (kernel_ulong_t)&default_data,
+ },
{ PCI_DEVICE_DATA(SYNOPSYS, EDDA, NULL) },
{ PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_AM654),
.driver_data = (kernel_ulong_t)&am654_data
},
- { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774C0),
- },
+ { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774A1),},
+ { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774B1),},
+ { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774C0),},
+ { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774E1),},
{ PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_J721E),
.driver_data = (kernel_ulong_t)&j721e_data,
},

drivers/net/ethernet/marvell/sky2.c

View file
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 3448642..25981a7 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -5105,7 +5105,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
INIT_WORK(&hw->restart_work, sky2_restart);
pci_set_drvdata(pdev, hw);
- pdev->d3_delay = 300;
+ pdev->d3hot_delay = 300;
return 0;

drivers/pci/Kconfig

View file
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 438a792..0c473d7 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -190,6 +190,68 @@ config PCI_HYPERV
The PCI device frontend driver allows the kernel to import arbitrary
PCI devices from a PCI backend to support PCI driver domains.
+choice
+ prompt "PCI Express hierarchy optimization setting"
+ default PCIE_BUS_DEFAULT
+ depends on PCI && EXPERT
+ help
+ MPS (Max Payload Size) and MRRS (Max Read Request Size) are PCIe
+ device parameters that affect performance and the ability to
+ support hotplug and peer-to-peer DMA.
+
+ The following choices set the MPS and MRRS optimization strategy
+ at compile-time. The choices are the same as those offered for
+ the kernel command-line parameter 'pci', i.e.,
+ 'pci=pcie_bus_tune_off', 'pci=pcie_bus_safe',
+ 'pci=pcie_bus_perf', and 'pci=pcie_bus_peer2peer'.
+
+ This is a compile-time setting and can be overridden by the above
+ command-line parameters. If unsure, choose PCIE_BUS_DEFAULT.
+
+config PCIE_BUS_TUNE_OFF
+ bool "Tune Off"
+ depends on PCI
+ help
+ Use the BIOS defaults; don't touch MPS at all. This is the same
+ as booting with 'pci=pcie_bus_tune_off'.
+
+config PCIE_BUS_DEFAULT
+ bool "Default"
+ depends on PCI
+ help
+ Default choice; ensure that the MPS matches upstream bridge.
+
+config PCIE_BUS_SAFE
+ bool "Safe"

This diff is incomplete. Download the complete patch.

drivers/pci/controller/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/cadence/pcie-cadence-ep.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/cadence/pcie-cadence-host.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pci-dra7xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pci-exynos.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pci-imx6.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pci-keystone.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pci-layerscape-ep.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pci-meson.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-al.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-artpec6.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-designware-ep.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-designware-host.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-designware-plat.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-designware.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-designware.h

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-histb.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-intel-gw.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-kirin.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-qcom.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-spear13xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-tegra194.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-uniphier.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/mobiveil/pcie-mobiveil-host.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pci-aardvark.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pci-hyperv.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pci-loongson.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pci-mvebu.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pci-tegra.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pci-v3-semi.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pci-xgene-msi.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pcie-brcmstb.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pcie-hisi-error.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pcie-iproc-bcma.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pcie-iproc-msi.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pcie-iproc-platform.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/pcie-xilinx-cpm.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/vmd.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/ecam.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug/pciehp_ctrl.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug/pciehp_hpc.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug/rpadlpar_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug/shpchp_ctrl.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/p2pdma.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci-acpi.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci-bridge-emul.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci-driver.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci-pf-stub.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci-sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci.h

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pcie/aspm.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pcie/bw_notification.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pcie/dpc.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/probe.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/quirks.c

View file

This diff is incomplete. Download the complete patch.

drivers/phy/marvell/phy-mvebu-a3700-comphy.c

View file

This diff is incomplete. Download the complete patch.

drivers/phy/marvell/phy-mvebu-cp110-comphy.c

View file

This diff is incomplete. Download the complete patch.

drivers/staging/media/atomisp/pci/atomisp_v4l2.c

View file

This diff is incomplete. Download the complete patch.

include/acpi/ghes.h

View file

This diff is incomplete. Download the complete patch.

include/asm-generic/io.h

View file

This diff is incomplete. Download the complete patch.

include/linux/pci-ecam.h

View file

This diff is incomplete. Download the complete patch.

include/linux/pci-ep-cfs.h

View file

This diff is incomplete. Download the complete patch.

include/linux/pci.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/pci_regs.h

View file

This diff is incomplete. Download the complete patch.