Skip to content

Commit 00937f3

Browse files
committed
Merge tag 'pci-v5.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
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 ...
2 parents 96485e4 + 28e34e7 commit 00937f3

85 files changed

Lines changed: 2549 additions & 1790 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ title: Brcmstb PCIe Host Controller Device Tree Bindings
99
maintainers:
1010
- Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
1111

12-
allOf:
13-
- $ref: /schemas/pci/pci-bus.yaml#
14-
1512
properties:
1613
compatible:
17-
const: brcm,bcm2711-pcie # The Raspberry Pi 4
14+
items:
15+
- enum:
16+
- brcm,bcm2711-pcie # The Raspberry Pi 4
17+
- brcm,bcm7211-pcie # Broadcom STB version of RPi4
18+
- brcm,bcm7278-pcie # Broadcom 7278 Arm
19+
- brcm,bcm7216-pcie # Broadcom 7216 Arm
20+
- brcm,bcm7445-pcie # Broadcom 7445 Arm
1821

1922
reg:
2023
maxItems: 1
@@ -34,10 +37,12 @@ properties:
3437
- const: msi
3538

3639
ranges:
37-
maxItems: 1
40+
minItems: 1
41+
maxItems: 4
3842

3943
dma-ranges:
40-
maxItems: 1
44+
minItems: 1
45+
maxItems: 6
4146

4247
clocks:
4348
maxItems: 1
@@ -58,8 +63,31 @@ properties:
5863

5964
aspm-no-l0s: true
6065

66+
resets:
67+
description: for "brcm,bcm7216-pcie", must be a valid reset
68+
phandle pointing to the RESCAL reset controller provider node.
69+
$ref: "/schemas/types.yaml#/definitions/phandle"
70+
71+
reset-names:
72+
items:
73+
- const: rescal
74+
75+
brcm,scb-sizes:
76+
description: u64 giving the 64bit PCIe memory
77+
viewport size of a memory controller. There may be up to
78+
three controllers, and each size must be a power of two
79+
with a size greater or equal to the amount of memory the
80+
controller supports. Note that each memory controller
81+
may have two component regions -- base and extended -- so
82+
this information cannot be deduced from the dma-ranges.
83+
$ref: /schemas/types.yaml#/definitions/uint64-array
84+
items:
85+
minItems: 1
86+
maxItems: 3
87+
6188
required:
6289
- reg
90+
- ranges
6391
- dma-ranges
6492
- "#interrupt-cells"
6593
- interrupts
@@ -68,6 +96,18 @@ required:
6896
- interrupt-map
6997
- msi-controller
7098

99+
allOf:
100+
- $ref: /schemas/pci/pci-bus.yaml#
101+
- if:
102+
properties:
103+
compatible:
104+
contains:
105+
const: brcm,bcm7216-pcie
106+
then:
107+
required:
108+
- resets
109+
- reset-names
110+
71111
unevaluatedProperties: false
72112

73113
examples:
@@ -93,7 +133,9 @@ examples:
93133
msi-parent = <&pcie0>;
94134
msi-controller;
95135
ranges = <0x02000000 0x0 0xf8000000 0x6 0x00000000 0x0 0x04000000>;
96-
dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>;
136+
dma-ranges = <0x42000000 0x1 0x00000000 0x0 0x40000000 0x0 0x80000000>,
137+
<0x42000000 0x1 0x80000000 0x3 0x00000000 0x0 0x80000000>;
97138
brcm,enable-ssc;
139+
brcm,scb-sizes = <0x0000000080000000 0x0000000080000000>;
98140
};
99141
};

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Required properties:
2424
"fsl,ls1028a-pcie"
2525
EP mode:
2626
"fsl,ls1046a-pcie-ep", "fsl,ls-pcie-ep"
27+
"fsl,ls1088a-pcie-ep", "fsl,ls-pcie-ep"
28+
"fsl,ls2088a-pcie-ep", "fsl,ls-pcie-ep"
2729
- reg: base addresses and lengths of the PCIe controller register blocks.
2830
- interrupts: A list of interrupt outputs of the controller. Must contain an
2931
entry for each entry in the interrupt-names property.

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ maintainers:
1414
properties:
1515
compatible:
1616
items:
17-
- const: renesas,r8a774c0-pcie-ep
18-
- const: renesas,rcar-gen3-pcie-ep
17+
- enum:
18+
- renesas,r8a774a1-pcie-ep # RZ/G2M
19+
- renesas,r8a774b1-pcie-ep # RZ/G2N
20+
- renesas,r8a774c0-pcie-ep # RZ/G2E
21+
- renesas,r8a774e1-pcie-ep # RZ/G2H
22+
- const: renesas,rcar-gen3-pcie-ep # R-Car Gen3 and RZ/G2
1923

2024
reg:
2125
maxItems: 5

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
* Renesas R-Car PCIe interface
22

33
Required properties:
4-
compatible: "renesas,pcie-r8a7743" for the R8A7743 SoC;
4+
compatible: "renesas,pcie-r8a7742" for the R8A7742 SoC;
5+
"renesas,pcie-r8a7743" for the R8A7743 SoC;
56
"renesas,pcie-r8a7744" for the R8A7744 SoC;
67
"renesas,pcie-r8a774a1" for the R8A774A1 SoC;
78
"renesas,pcie-r8a774b1" for the R8A774B1 SoC;

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,22 @@ properties:
2323
const: socionext,uniphier-pro5-pcie-ep
2424

2525
reg:
26-
maxItems: 4
26+
minItems: 4
27+
maxItems: 5
2728

2829
reg-names:
29-
items:
30-
- const: dbi
31-
- const: dbi2
32-
- const: link
33-
- const: addr_space
30+
oneOf:
31+
- items:
32+
- const: dbi
33+
- const: dbi2
34+
- const: link
35+
- const: addr_space
36+
- items:
37+
- const: dbi
38+
- const: dbi2
39+
- const: link
40+
- const: addr_space
41+
- const: atu
3442

3543
clocks:
3644
maxItems: 2

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Required properties:
1616
"dbi" - controller configuration registers
1717
"link" - SoC-specific glue layer registers
1818
"config" - PCIe configuration space
19+
"atu" - iATU registers for DWC version 4.80 or later
1920
- clocks: A phandle to the clock gate for PCIe glue layer including
2021
the host controller.
2122
- resets: A phandle to the reset line for PCIe glue layer including

‎Documentation/power/pci.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ that these callbacks operate on::
320320
unsigned int d2_support:1; /* Low power state D2 is supported */
321321
unsigned int no_d1d2:1; /* D1 and D2 are forbidden */
322322
unsigned int wakeup_prepared:1; /* Device prepared for wake up */
323-
unsigned int d3_delay; /* D3->D0 transition time in ms */
323+
unsigned int d3hot_delay; /* D3hot->D0 transition time in ms */
324324
...
325325
};
326326

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,15 @@ struct pci_host_bridge;
1717
struct device;
1818

1919
struct hw_pci {
20-
struct msi_controller *msi_ctrl;
2120
struct pci_ops *ops;
2221
int nr_controllers;
23-
unsigned int io_optional:1;
2422
void **private_data;
2523
int (*setup)(int nr, struct pci_sys_data *);
2624
int (*scan)(int nr, struct pci_host_bridge *);
2725
void (*preinit)(void);
2826
void (*postinit)(void);
2927
u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
3028
int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
31-
resource_size_t (*align_resource)(struct pci_dev *dev,
32-
const struct resource *res,
33-
resource_size_t start,
34-
resource_size_t size,
35-
resource_size_t align);
3629
};
3730

3831
/*

‎arch/arm/kernel/bios32.c‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
394394
return irq;
395395
}
396396

397-
static int pcibios_init_resource(int busnr, struct pci_sys_data *sys,
398-
int io_optional)
397+
static int pcibios_init_resource(int busnr, struct pci_sys_data *sys)
399398
{
400399
int ret;
401400
struct resource_entry *window;
@@ -405,14 +404,6 @@ static int pcibios_init_resource(int busnr, struct pci_sys_data *sys,
405404
&iomem_resource, sys->mem_offset);
406405
}
407406

408-
/*
409-
* If a platform says I/O port support is optional, we don't add
410-
* the default I/O space. The platform is responsible for adding
411-
* any I/O space it needs.
412-
*/
413-
if (io_optional)
414-
return 0;
415-
416407
resource_list_for_each_entry(window, &sys->resources)
417408
if (resource_type(window->res) == IORESOURCE_IO)
418409
return 0;
@@ -462,7 +453,7 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
462453

463454
if (ret > 0) {
464455

465-
ret = pcibios_init_resource(nr, sys, hw->io_optional);
456+
ret = pcibios_init_resource(nr, sys);
466457
if (ret) {
467458
pci_free_host_bridge(bridge);
468459
break;
@@ -480,9 +471,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
480471
bridge->sysdata = sys;
481472
bridge->busnr = sys->busnr;
482473
bridge->ops = hw->ops;
483-
bridge->msi = hw->msi_ctrl;
484-
bridge->align_resource =
485-
hw->align_resource;
486474

487475
ret = pci_scan_root_bus_bridge(bridge);
488476
}

‎arch/sparc/include/asm/io_32.h‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
#define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz)
1212
#define memcpy_toio(d,s,sz) _memcpy_toio(d,s,sz)
1313

14+
/*
15+
* Bus number may be embedded in the higher bits of the physical address.
16+
* This is why we have no bus number argument to ioremap().
17+
*/
18+
void __iomem *ioremap(phys_addr_t offset, size_t size);
19+
void iounmap(volatile void __iomem *addr);
20+
1421
#include <asm-generic/io.h>
1522

1623
static inline void _memset_io(volatile void __iomem *dst,
@@ -121,14 +128,6 @@ static inline void sbus_memcpy_toio(volatile void __iomem *dst,
121128
}
122129
}
123130

124-
#ifdef __KERNEL__
125-
126-
/*
127-
* Bus number may be embedded in the higher bits of the physical address.
128-
* This is why we have no bus number argument to ioremap().
129-
*/
130-
void __iomem *ioremap(phys_addr_t offset, size_t size);
131-
void iounmap(volatile void __iomem *addr);
132131
/* Create a virtual mapping cookie for an IO port range */
133132
void __iomem *ioport_map(unsigned long port, unsigned int nr);
134133
void ioport_unmap(void __iomem *);
@@ -148,8 +147,6 @@ static inline int sbus_can_burst64(void)
148147
struct device;
149148
void sbus_set_sbus64(struct device *, int);
150149

151-
#endif
152-
153150
#define __ARCH_HAS_NO_PAGE_ZERO_MAPPED 1
154151

155152

0 commit comments

Comments
 (0)