Skip to content

Commit c8f19bb

Browse files
committed
Merge: Rebase kernel's PCI subsystem with content from v6.15
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1388 ``` PCI updates from v6.15: "Enumeration: - Enable Configuration RRS SV, which makes device readiness visible, early instead of during child bus scanning (Bjorn Helgaas) - Log debug messages about reset methods being used (Bjorn Helgaas) - Add common pci-ep-bus.yaml schema for exporting several peripherals of a single PCI function via devicetree (Andrea della Porta) - Create DT nodes for PCI host bridges to enable loading device tree overlays to create platform devices for PCI devices that have several features that require multiple drivers (Herve Codina) Resource management: - Enlarge devres table[] to accommodate bridge windows, ROM, IOV BARs, etc., and validate BAR index in devres interfaces (Philipp Stanner) - Fix typo that repeatedly distributed resources to a bridge instead of iterating over subordinate bridges, which resulted in too little space to assign some BARs (Kai-Heng Feng) - Relax bridge window tail sizing for optional resources, e.g., IOV BARs, to avoid failures when removing and re-adding devices (Ilpo Järvinen) - Allow drivers to enable devices even if we haven't assigned optional IOV resources to them (Ilpo Järvinen) - Rework handling of optional resources (IOV BARs, ROMs) to reduce failures if we can't allocate them (Ilpo Järvinen) - Fix a NULL dereference in the SR-IOV VF creation error path (Shay Drory) - Fix s390 mmio_read/write syscalls, which didn't cause page faults in some cases, which broke vfio-pci lazy mapping on first access (Niklas Schnelle) - Add pdev->non_mappable_bars to replace CONFIG_VFIO_PCI_MMAP, which was disabled only for s390 (Niklas Schnelle) - Support mmap of PCI resources on s390 except for ISM devices (Niklas Schnelle) ASPM: - Delay pcie_link_state deallocation to avoid dangling pointers that cause invalid references during hot-unplug (Daniel Stodden) Power management: - Allow PCI bridges to go to D3Hot when suspending on all non-x86 systems (Manivannan Sadhasivam) Bandwidth control: - Add set_pcie_speed.sh to TEST_PROGS to fix issue when executing the set_pcie_cooling_state.sh test case (Yi Lai) - Avoid a NULL pointer dereference when we run out of bus numbers to assign for a bridge secondary bus (Lukas Wunner) Hotplug: - Drop superfluous pci_hotplug_slot_list, try_module_get() calls, and NULL pointer checks (Lukas Wunner) - Drop shpchp module init/exit logging, replace shpchp dbg() with ctrl_dbg(), and remove unused dbg(), err(), info(), warn() wrappers (Ilpo Järvinen) - Drop 'shpchp_debug' module parameter in favor of standard dynamic debugging (Ilpo Järvinen) - Drop unused cpcihp .get_power(), .set_power() function pointers (Guilherme Giacomo Simoes) - Disable hotplug interrupts in portdrv only when pciehp is not enabled to avoid issuing two hotplug commands too close together (Feng Tang) - Skip pciehp 'device replaced' check if the device has been removed to address a deadlock when resuming after a device was removed during system sleep (Lukas Wunner) - Don't enable pciehp hotplug interupt when resuming in poll mode (Ilpo Järvinen) Virtualization: - Fix bugs in 'pci=config_acs=' kernel command line parameter (Tushar Dave) DOE: - Expose supported DOE features via sysfs (Alistair Francis) - Allow DOE support to be enabled even if CXL isn't enabled (Alistair Francis) Endpoint framework: - Convert PCI device data so pci-epf-test works correctly on big-endian endpoint systems (Niklas Cassel) - Add BAR_RESIZABLE type to endpoint framework and add DWC core support for EPF drivers to set BAR_RESIZABLE type and size (Niklas Cassel) - Fix pci-epf-test double free that causes an oops if the host reboots and PERST# deassertion restarts endpoint BAR allocation (Christian Bruel) - Fix endpoint BAR testing so tests can skip disabled BARs instead of reporting them as failures (Niklas Cassel) - Widen endpoint test BAR size variable to accommodate BARs larger than INT_MAX (Niklas Cassel) - Remove unused tools 'pci' build target left over after moving tests to tools/testing/selftests/pci_endpoint (Jianfeng Liu) Altera PCIe controller driver: - Add DT binding and driver support for Agilex family (P-Tile, F-Tile, R-Tile) (Matthew Gerlach and D M, Sharath Kumar) Broadcom STB PCIe controller driver: - Add BCM2712 MSI-X DT binding and interrupt controller drivers and add softdep on irq_bcm2712_mip driver to ensure that it is loaded first (Stanimir Varbanov) - Expand inbound window map to 64GB so it can accommodate BCM2712 (Stanimir Varbanov) - Add BCM2712 support and DT updates (Stanimir Varbanov) - Apply link speed restriction before bringing link up, not after (Jim Quinlan) - Update Max Link Speed in Link Capabilities via the internal writable register, not the read-only config register (Jim Quinlan) - Handle regulator_bulk_get() error to avoid panic when we call regulator_bulk_free() later (Jim Quinlan) - Disable regulators only when removing the bus immediately below a Root Port because we don't support regulators deeper in the hierarchy (Jim Quinlan) - Make const read-only arrays static (Colin Ian King) Cadence PCIe endpoint driver: - Correct MSG TLP generation so endpoints can generate INTx messages (Hans Zhang) Freescale i.MX6 PCIe controller driver: - Identify the second controller on i.MX8MQ based on devicetree 'linux,pci-domain' instead of DBI 'reg' address (Richard Zhu) - Remove imx_pcie_cpu_addr_fixup() since dwc core can now derive the ATU input address (using parent_bus_offset) from devicetree (Frank Li) Freescale Layerscape PCIe controller driver: - Drop deprecated 'num-ib-windows' and 'num-ob-windows' and unnecessary 'status' from example (Krzysztof Kozlowski) - Correct the syscon_regmap_lookup_by_phandle_args("fsl,pcie-scfg") arg_count to fix probe failure on LS1043A (Ioana Ciornei) HiSilicon STB PCIe controller driver: - Call phy_exit() to clean up if histb_pcie_probe() fails (Christophe JAILLET) Intel Gateway PCIe controller driver: - Remove intel_pcie_cpu_addr() since dwc core can now derive the ATU input address (using parent_bus_offset) from devicetree (Frank Li) Intel VMD host bridge driver: - Convert vmd_dev.cfg_lock from spinlock_t to raw_spinlock_t so pci_ops.read() will never sleep, even on PREEMPT_RT where spinlock_t becomes a sleepable lock, to avoid calling a sleeping function from invalid context (Ryo Takakura) MediaTek PCIe Gen3 controller driver: - Remove leftover mac_reset assert for Airoha EN7581 SoC (Lorenzo Bianconi) - Add EN7581 PBUS controller 'mediatek,pbus-csr' DT property and program host bridge memory aperture to this syscon node (Lorenzo Bianconi) Qualcomm PCIe controller driver: - Add qcom,pcie-ipq5332 binding (Varadarajan Narayanan) - Add qcom i.MX8QM and i.MX8QXP/DXP optional DMA interrupt (Alexander Stein) - Add optional dma-coherent DT property for Qualcomm SA8775P (Dmitry Baryshkov) - Make DT iommu property required for SA8775P and prohibited for SDX55 (Dmitry Baryshkov) - Add DT IOMMU and DMA-related properties for Qualcomm SM8450 (Dmitry Baryshkov) - Add endpoint DT properties for SAR2130P and enable endpoint mode in driver (Dmitry Baryshkov) - Describe endpoint BAR0 and BAR2 as 64-bit only and BAR1 and BAR3 as RESERVED (Manivannan Sadhasivam) Rockchip DesignWare PCIe controller driver: - Describe rk3568 and rk3588 BARs as Resizable, not Fixed (Niklas Cassel) Synopsys DesignWare PCIe controller driver: - Add debugfs-based Silicon Debug, Error Injection, Statistical Counter support for DWC (Shradha Todi) - Add debugfs property to expose LTSSM status of DWC PCIe link (Hans Zhang) - Add Rockchip support for DWC debugfs features (Niklas Cassel) - Add dw_pcie_parent_bus_offset() to look up the parent bus address of a specified 'reg' property and return the offset from the CPU physical address (Frank Li) - Use dw_pcie_parent_bus_offset() to derive CPU -> ATU addr offset via 'reg[config]' for host controllers and 'reg[addr_space]' for endpoint controllers (Frank Li) - Apply struct dw_pcie.parent_bus_offset in ATU users to remove use of .cpu_addr_fixup() when programming ATU (Frank Li) TI J721E PCIe driver: - Correct the 'link down' interrupt bit for J784S4 (Siddharth Vadapalli) TI Keystone PCIe controller driver: - Describe AM65x BARs 2 and 5 as Resizable (not Fixed) and reduce alignment requirement from 1MB to 64KB (Niklas Cassel) Xilinx Versal CPM PCIe controller driver: - Free IRQ domain in probe error path to avoid leaking it (Thippeswamy Havalige) - Add DT .compatible "xlnx,versal-cpm5nc-host" and driver support for Versal Net CPM5NC Root Port controller (Thippeswamy Havalige) - Add driver support for CPM5_HOST1 (Thippeswamy Havalige) Miscellaneous: - Convert fsl,mpc83xx-pcie binding to YAML (J. Neuschäfer) - Use for_each_available_child_of_node_scoped() to simplify apple, kirin, mediatek, mt7621, tegra drivers (Zhang Zekun)" JIRA: https://issues.redhat.com/browse/RHEL-86521 Signed-off-by: Myron Stowe <mstowe@redhat.com> ``` Approved-by: John W. Linville <linville@redhat.com> Approved-by: Brian Masney <bmasney@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Scott Weaver <scweaver@redhat.com>
2 parents 00470c1 + 92db71b commit c8f19bb

File tree

101 files changed

+2903
-1423
lines changed

Some content is hidden

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

101 files changed

+2903
-1423
lines changed

Documentation/ABI/testing/sysfs-bus-pci

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,3 +583,32 @@ Description:
583583
enclosure-specific indications "specific0" to "specific7",
584584
hence the corresponding led class devices are unavailable if
585585
the DSM interface is used.
586+
587+
What: /sys/bus/pci/devices/.../doe_features
588+
Date: March 2025
589+
Contact: Linux PCI developers <linux-pci@vger.kernel.org>
590+
Description:
591+
This directory contains a list of the supported Data Object
592+
Exchange (DOE) features. The features are the file name.
593+
The contents of each file is the raw Vendor ID and data
594+
object feature values.
595+
596+
The value comes from the device and specifies the vendor and
597+
data object type supported. The lower (RHS of the colon) is
598+
the data object type in hex. The upper (LHS of the colon)
599+
is the vendor ID.
600+
601+
As all DOE devices must support the DOE discovery feature,
602+
if DOE is supported you will at least see the doe_discovery
603+
file, with this contents:
604+
605+
# cat doe_features/doe_discovery
606+
0001:00
607+
608+
If the device supports other features you will see other
609+
files as well. For example if CMA/SPDM and secure CMA/SPDM
610+
are supported the doe_features directory will look like
611+
this:
612+
613+
# ls doe_features
614+
0001:01 0001:02 doe_discovery

Documentation/PCI/endpoint/pci-endpoint.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ by the PCI controller driver.
5757
The PCI controller driver can then create a new EPC device by invoking
5858
devm_pci_epc_create()/pci_epc_create().
5959

60-
* devm_pci_epc_destroy()/pci_epc_destroy()
60+
* pci_epc_destroy()
6161

62-
The PCI controller driver can destroy the EPC device created by either
63-
devm_pci_epc_create() or pci_epc_create() using devm_pci_epc_destroy() or
64-
pci_epc_destroy().
62+
The PCI controller driver can destroy the EPC device created by
63+
pci_epc_create() using pci_epc_destroy().
6564

6665
* pci_epc_linkup()
6766

Documentation/admin-guide/perf/dwc_pcie_pmu.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ description of available events and configuration options in sysfs, see
6060
The "format" directory describes format of the config fields of the
6161
perf_event_attr structure. The "events" directory provides configuration
6262
templates for all documented events. For example,
63-
"Rx_PCIe_TLP_Data_Payload" is an equivalent of "eventid=0x22,type=0x1".
63+
"rx_pcie_tlp_data_payload" is an equivalent of "eventid=0x21,type=0x0".
6464

6565
The "perf list" command shall list the available events from sysfs, e.g.::
6666

@@ -79,8 +79,8 @@ Example usage of counting PCIe RX TLP data payload (Units of bytes)::
7979

8080
The average RX/TX bandwidth can be calculated using the following formula:
8181

82-
PCIe RX Bandwidth = Rx_PCIe_TLP_Data_Payload / Measure_Time_Window
83-
PCIe TX Bandwidth = Tx_PCIe_TLP_Data_Payload / Measure_Time_Window
82+
PCIe RX Bandwidth = rx_pcie_tlp_data_payload / Measure_Time_Window
83+
PCIe TX Bandwidth = tx_pcie_tlp_data_payload / Measure_Time_Window
8484

8585
Lane Event Usage
8686
-------------------------------

Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,19 @@ maintainers:
1212

1313
properties:
1414
compatible:
15+
description: Each family of socfpga has its own implementation of the
16+
PCI controller. The altr,pcie-root-port-1.0 is used for the Cyclone5
17+
family of chips. The Stratix10 family of chips is supported by the
18+
altr,pcie-root-port-2.0. The Agilex family of chips has three,
19+
non-register compatible, variants of PCIe Hard IP referred to as the
20+
F-Tile, P-Tile, and R-Tile, depending on the specific chip instance.
21+
1522
enum:
1623
- altr,pcie-root-port-1.0
1724
- altr,pcie-root-port-2.0
25+
- altr,pcie-root-port-3.0-f-tile
26+
- altr,pcie-root-port-3.0-p-tile
27+
- altr,pcie-root-port-3.0-r-tile
1828

1929
reg:
2030
items:

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ properties:
1414
items:
1515
- enum:
1616
- brcm,bcm2711-pcie # The Raspberry Pi 4
17+
- brcm,bcm2712-pcie # Raspberry Pi 5
1718
- brcm,bcm4908-pcie
1819
- brcm,bcm7211-pcie # Broadcom STB version of RPi4
1920
- brcm,bcm7216-pcie # Broadcom 7216 Arm
@@ -102,7 +103,10 @@ properties:
102103

103104
reset-names:
104105
minItems: 1
105-
maxItems: 3
106+
items:
107+
- enum: [perst, rescal]
108+
- const: bridge
109+
- const: swinit
106110

107111
required:
108112
- compatible

Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,16 @@ properties:
4747
maxItems: 5
4848

4949
interrupts:
50+
minItems: 1
5051
items:
5152
- description: builtin MSI controller.
53+
- description: builtin DMA controller.
5254

5355
interrupt-names:
56+
minItems: 1
5457
items:
5558
- const: msi
59+
- const: dma
5660

5761
reset-gpio:
5862
description: Should specify the GPIO for controlling the PCI bus device

Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ examples:
9494
reg-names = "regs", "addr_space";
9595
interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* PME interrupt */
9696
interrupt-names = "pme";
97-
num-ib-windows = <6>;
98-
num-ob-windows = <8>;
99-
status = "disabled";
10097
};
10198
};
10299
...
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
5+
$id: http://devicetree.org/schemas/pci/fsl,mpc8xxx-pci.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Freescale MPC83xx PCI/PCI-X/PCIe controllers
9+
10+
description:
11+
Binding for the PCI/PCI-X/PCIe host bridges on MPC8xxx SoCs
12+
13+
maintainers:
14+
- J. Neuschäfer <j.neuschaefer@gmx.net>
15+
16+
allOf:
17+
- $ref: /schemas/pci/pci-host-bridge.yaml#
18+
19+
properties:
20+
compatible:
21+
oneOf:
22+
- enum:
23+
- fsl,mpc8314-pcie
24+
- fsl,mpc8349-pci
25+
- fsl,mpc8540-pci
26+
- fsl,mpc8548-pcie
27+
- fsl,mpc8641-pcie
28+
- items:
29+
- enum:
30+
- fsl,mpc8308-pcie
31+
- fsl,mpc8315-pcie
32+
- fsl,mpc8377-pcie
33+
- fsl,mpc8378-pcie
34+
- const: fsl,mpc8314-pcie
35+
- items:
36+
- const: fsl,mpc8360-pci
37+
- const: fsl,mpc8349-pci
38+
- items:
39+
- const: fsl,mpc8540-pcix
40+
- const: fsl,mpc8540-pci
41+
42+
reg:
43+
minItems: 1
44+
items:
45+
- description: internal registers
46+
- description: config space access registers
47+
48+
clock-frequency: true
49+
50+
interrupts:
51+
items:
52+
- description: Consolidated PCI interrupt
53+
54+
fsl,pci-agent-force-enum:
55+
type: boolean
56+
description:
57+
Typically any Freescale PCI-X bridge hardware strapped into Agent mode is
58+
prevented from enumerating the bus. The PrPMC form-factor requires all
59+
mezzanines to be PCI-X Agents, but one per system may still enumerate the
60+
bus.
61+
62+
This property allows a PCI-X bridge to be used for bus enumeration
63+
despite being strapped into Agent mode.
64+
65+
required:
66+
- reg
67+
- compatible
68+
69+
unevaluatedProperties: false
70+
71+
examples:
72+
- |
73+
#include <dt-bindings/interrupt-controller/irq.h>
74+
75+
pcie@e0009000 {
76+
compatible = "fsl,mpc8315-pcie", "fsl,mpc8314-pcie";
77+
reg = <0xe0009000 0x00001000>;
78+
ranges = <0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
79+
0x01000000 0 0x00000000 0xb1000000 0 0x00800000>;
80+
#address-cells = <3>;
81+
#size-cells = <2>;
82+
#interrupt-cells = <1>;
83+
device_type = "pci";
84+
bus-range = <0 255>;
85+
interrupt-map-mask = <0xf800 0 0 7>;
86+
interrupt-map = <0 0 0 1 &ipic 1 IRQ_TYPE_LEVEL_LOW
87+
0 0 0 2 &ipic 1 IRQ_TYPE_LEVEL_LOW
88+
0 0 0 3 &ipic 1 IRQ_TYPE_LEVEL_LOW
89+
0 0 0 4 &ipic 1 IRQ_TYPE_LEVEL_LOW>;
90+
clock-frequency = <0>;
91+
};
92+
93+
- |
94+
pci@ef008000 {
95+
compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
96+
reg = <0xef008000 0x1000>;
97+
ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000
98+
0x01000000 0 0x00000000 0xd0000000 0 0x01000000>;
99+
#interrupt-cells = <1>;
100+
#size-cells = <2>;
101+
#address-cells = <3>;
102+
device_type = "pci";
103+
clock-frequency = <33333333>;
104+
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
105+
interrupt-map = </* IDSEL */
106+
0xe000 0 0 1 &mpic 2 1
107+
0xe000 0 0 2 &mpic 3 1>;
108+
interrupts-extended = <&mpic 24 2>;
109+
bus-range = <0 0>;
110+
fsl,pci-agent-force-enum;
111+
};
112+
113+
...

Documentation/devicetree/bindings/pci/fsl,pci.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ properties:
109109
power-domains:
110110
maxItems: 1
111111

112+
mediatek,pbus-csr:
113+
$ref: /schemas/types.yaml#/definitions/phandle-array
114+
items:
115+
- items:
116+
- description: phandle to pbus-csr syscon
117+
- description: offset of pbus-csr base address register
118+
- description: offset of pbus-csr base address mask register
119+
description:
120+
Phandle with two arguments to the syscon node used to detect if
121+
a given address is accessible on PCIe controller.
122+
112123
'#interrupt-cells':
113124
const: 1
114125

@@ -168,6 +179,8 @@ allOf:
168179
minItems: 1
169180
maxItems: 2
170181

182+
mediatek,pbus-csr: false
183+
171184
- if:
172185
properties:
173186
compatible:
@@ -197,6 +210,8 @@ allOf:
197210
minItems: 1
198211
maxItems: 2
199212

213+
mediatek,pbus-csr: false
214+
200215
- if:
201216
properties:
202217
compatible:
@@ -224,6 +239,8 @@ allOf:
224239
minItems: 1
225240
maxItems: 2
226241

242+
mediatek,pbus-csr: false
243+
227244
- if:
228245
properties:
229246
compatible:

0 commit comments

Comments
 (0)