Skip to content

Commit 7d06015

Browse files
committed
Merge tag 'pci-v6.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci updates from Bjorn Helgaas: "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) - Avoid reset when it has been disabled via sysfs (Nishanth Aravamudan) - 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) Power control: - Create pwrctrl devices in pci_scan_device() to make it more symmetric with pci_pwrctrl_unregister() and make pwrctrl devices for PCI bridges possible (Manivannan Sadhasivam) - Unregister pwrctrl devices in pci_destroy_dev() so DOE, ASPM, etc. can still access devices after pci_stop_dev() (Manivannan Sadhasivam) - If there's a pwrctrl device for a PCI device, skip scanning it because the pwrctrl core will rescan the bus after the device is powered on (Manivannan Sadhasivam) - Add a pwrctrl driver for PCI slots based on voltage regulators described via devicetree (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) AMD MDB PCIe controller driver: - Add DT binding and driver for AMD MDB (Multimedia DMA Bridge) (Thippeswamy Havalige) 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)" * tag 'pci-v6.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (197 commits) PCI: layerscape: Fix arg_count to syscon_regmap_lookup_by_phandle_args() PCI: j721e: Fix the value of .linkdown_irq_regfield for J784S4 misc: pci_endpoint_test: Add support for PCITEST_IRQ_TYPE_AUTO PCI: endpoint: pci-epf-test: Expose supported IRQ types in CAPS register PCI: dw-rockchip: Endpoint mode cannot raise INTx interrupts PCI: endpoint: Add intx_capable to epc_features struct dt-bindings: PCI: Add common schema for devices accessible through PCI BARs PCI: intel-gw: Remove intel_pcie_cpu_addr() PCI: imx6: Remove imx_pcie_cpu_addr_fixup() PCI: dwc: Use parent_bus_offset to remove need for .cpu_addr_fixup() PCI: dwc: ep: Ensure proper iteration over outbound map windows PCI: dwc: ep: Use devicetree 'reg[addr_space]' to derive CPU -> ATU addr offset PCI: dwc: ep: Consolidate devicetree handling in dw_pcie_ep_get_resources() PCI: dwc: ep: Call epc_create() early in dw_pcie_ep_init() PCI: dwc: Use devicetree 'reg[config]' to derive CPU -> ATU addr offset PCI: dwc: Add dw_pcie_parent_bus_offset() checking and debug PCI: dwc: Add dw_pcie_parent_bus_offset() PCI/bwctrl: Fix NULL pointer dereference on bus number exhaustion PCI: xilinx-cpm: Add cpm_csr register mapping for CPM5_HOST1 variant PCI: brcmstb: Make const read-only arrays static ...
2 parents 0c86b42 + dea1401 commit 7d06015

File tree

126 files changed

+5061
-1463
lines changed

Some content is hidden

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

126 files changed

+5061
-1463
lines changed
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_debug/lane_detect
2+
Date: February 2025
3+
Contact: Shradha Todi <[email protected]>
4+
Description: (RW) Write the lane number to be checked for detection. Read
5+
will return whether PHY indicates receiver detection on the
6+
selected lane. The default selected lane is Lane0.
7+
8+
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_debug/rx_valid
9+
Date: February 2025
10+
Contact: Shradha Todi <[email protected]>
11+
Description: (RW) Write the lane number to be checked as valid or invalid.
12+
Read will return the status of PIPE RXVALID signal of the
13+
selected lane. The default selected lane is Lane0.
14+
15+
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
16+
Date: February 2025
17+
Contact: Shradha Todi <[email protected]>
18+
Description: The "rasdes_err_inj" is a directory which can be used to inject
19+
errors into the system. The possible errors that can be injected
20+
are:
21+
22+
1) tx_lcrc - TLP LCRC error injection TX Path
23+
2) b16_crc_dllp - 16b CRC error injection of ACK/NAK DLLP
24+
3) b16_crc_upd_fc - 16b CRC error injection of Update-FC DLLP
25+
4) tx_ecrc - TLP ECRC error injection TX Path
26+
5) fcrc_tlp - TLP's FCRC error injection TX Path
27+
6) parity_tsos - Parity error of TSOS
28+
7) parity_skpos - Parity error on SKPOS
29+
8) rx_lcrc - LCRC error injection RX Path
30+
9) rx_ecrc - ECRC error injection RX Path
31+
10) tlp_err_seq - TLPs SEQ# error
32+
11) ack_nak_dllp_seq - DLLPS ACK/NAK SEQ# error
33+
12) ack_nak_dllp - ACK/NAK DLLPs transmission block
34+
13) upd_fc_dllp - UpdateFC DLLPs transmission block
35+
14) nak_dllp - Always transmission for NAK DLLP
36+
15) inv_sync_hdr_sym - Invert SYNC header
37+
16) com_pad_ts1 - COM/PAD TS1 order set
38+
17) com_pad_ts2 - COM/PAD TS2 order set
39+
18) com_fts - COM/FTS FTS order set
40+
19) com_idl - COM/IDL E-idle order set
41+
20) end_edb - END/EDB symbol
42+
21) stp_sdp - STP/SDP symbol
43+
22) com_skp - COM/SKP SKP order set
44+
23) posted_tlp_hdr - Posted TLP Header credit value control
45+
24) non_post_tlp_hdr - Non-Posted TLP Header credit value control
46+
25) cmpl_tlp_hdr - Completion TLP Header credit value control
47+
26) posted_tlp_data - Posted TLP Data credit value control
48+
27) non_post_tlp_data - Non-Posted TLP Data credit value control
49+
28) cmpl_tlp_data - Completion TLP Data credit value control
50+
29) duplicate_tlp - Generates duplicate TLPs
51+
30) nullified_tlp - Generates Nullified TLPs
52+
53+
(WO) Write to the attribute will prepare controller to inject
54+
the respective error in the next transmission of data.
55+
56+
Parameter required to write will change in the following ways:
57+
58+
- Errors 9 and 10 are sequence errors. The write command:
59+
60+
echo <count> <diff> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
61+
62+
<count>
63+
Number of errors to be injected
64+
<diff>
65+
The difference to add or subtract from natural
66+
sequence number to generate sequence error.
67+
Allowed range from -4095 to 4095
68+
69+
- Errors 23 to 28 are credit value error insertions. The write
70+
command:
71+
72+
echo <count> <diff> <vc> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
73+
74+
<count>
75+
Number of errors to be injected
76+
<diff>
77+
The difference to add or subtract from UpdateFC
78+
credit value. Allowed range from -4095 to 4095
79+
<vc>
80+
Target VC number
81+
82+
- All other errors. The write command:
83+
84+
echo <count> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
85+
86+
<count>
87+
Number of errors to be injected
88+
89+
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/counter_enable
90+
Date: February 2025
91+
Contact: Shradha Todi <[email protected]>
92+
Description: The "rasdes_event_counters" is the directory which can be used
93+
to collect statistical data about the number of times a certain
94+
event has occurred in the controller. The list of possible
95+
events are:
96+
97+
1) EBUF Overflow
98+
2) EBUF Underrun
99+
3) Decode Error
100+
4) Running Disparity Error
101+
5) SKP OS Parity Error
102+
6) SYNC Header Error
103+
7) Rx Valid De-assertion
104+
8) CTL SKP OS Parity Error
105+
9) 1st Retimer Parity Error
106+
10) 2nd Retimer Parity Error
107+
11) Margin CRC and Parity Error
108+
12) Detect EI Infer
109+
13) Receiver Error
110+
14) RX Recovery Req
111+
15) N_FTS Timeout
112+
16) Framing Error
113+
17) Deskew Error
114+
18) Framing Error In L0
115+
19) Deskew Uncompleted Error
116+
20) Bad TLP
117+
21) LCRC Error
118+
22) Bad DLLP
119+
23) Replay Number Rollover
120+
24) Replay Timeout
121+
25) Rx Nak DLLP
122+
26) Tx Nak DLLP
123+
27) Retry TLP
124+
28) FC Timeout
125+
29) Poisoned TLP
126+
30) ECRC Error
127+
31) Unsupported Request
128+
32) Completer Abort
129+
33) Completion Timeout
130+
34) EBUF SKP Add
131+
35) EBUF SKP Del
132+
133+
(RW) Write 1 to enable the event counter and write 0 to disable
134+
the event counter. Read will return whether the counter is
135+
currently enabled or disabled. Counter is disabled by default.
136+
137+
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/counter_value
138+
Date: February 2025
139+
Contact: Shradha Todi <[email protected]>
140+
Description: (RO) Read will return the current value of the event counter.
141+
To reset the counter, counter should be disabled first and then
142+
enabled back using the "counter_enable" attribute.
143+
144+
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/lane_select
145+
Date: February 2025
146+
Contact: Shradha Todi <[email protected]>
147+
Description: (RW) Some lanes in the event list are lane specific events.
148+
These include events from 1 to 11, as well as, 34 and 35. Write
149+
the lane number for which you wish the counter to be enabled,
150+
disabled, or value dumped. Read will return the current
151+
selected lane number. Lane0 is selected by default.
152+
153+
What: /sys/kernel/debug/dwc_pcie_<dev>/ltssm_status
154+
Date: February 2025
155+
Contact: Hans Zhang <[email protected]>
156+
Description: (RO) Read will return the current PCIe LTSSM state in both
157+
string and raw value.

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 <[email protected]>
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

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/brcm,bcm2712-msix.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Broadcom bcm2712 MSI-X Interrupt Peripheral support
8+
9+
maintainers:
10+
- Stanimir Varbanov <[email protected]>
11+
12+
description:
13+
This interrupt controller is used to provide interrupt vectors to the
14+
generic interrupt controller (GIC) on bcm2712. It will be used as
15+
external MSI-X controller for PCIe root complex.
16+
17+
allOf:
18+
- $ref: /schemas/interrupt-controller/msi-controller.yaml#
19+
20+
properties:
21+
compatible:
22+
const: brcm,bcm2712-mip
23+
24+
reg:
25+
items:
26+
- description: Base register address
27+
- description: PCIe message address
28+
29+
"#msi-cells":
30+
const: 0
31+
32+
brcm,msi-offset:
33+
$ref: /schemas/types.yaml#/definitions/uint32
34+
description: Shift the allocated MSI's.
35+
36+
unevaluatedProperties: false
37+
38+
required:
39+
- compatible
40+
- reg
41+
- msi-controller
42+
- msi-ranges
43+
44+
examples:
45+
- |
46+
#include <dt-bindings/interrupt-controller/arm-gic.h>
47+
48+
axi {
49+
#address-cells = <2>;
50+
#size-cells = <2>;
51+
52+
msi-controller@1000130000 {
53+
compatible = "brcm,bcm2712-mip";
54+
reg = <0x10 0x00130000 0x00 0xc0>,
55+
<0xff 0xfffff000 0x00 0x1000>;
56+
msi-controller;
57+
#msi-cells = <0>;
58+
msi-ranges = <&gicv2 GIC_SPI 128 IRQ_TYPE_EDGE_RISING 64>;
59+
};
60+
};

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:

0 commit comments

Comments
 (0)