Skip to content

Commit e6e3d8f

Browse files
committed
Merge tag 'pci-v4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas: "Summary of PCI changes for the v4.9 merge window: Enumeration: - microblaze: Add multidomain support for procfs (Bharat Kumar Gogada) Resource management: - Ignore requested alignment for PROBE_ONLY and fixed resources (Yongji Xie) - Ignore requested alignment for VF BARs (Yongji Xie) PCI device hotplug: - Make core explicitly non-modular (Paul Gortmaker) PCIe native device hotplug: - Rename pcie_isr() locals for clarity (Bjorn Helgaas) - Return IRQ_NONE when we can't read interrupt status (Bjorn Helgaas) - Remove unnecessary guard (Bjorn Helgaas) - Clean up dmesg "Slot(%s)" messages (Bjorn Helgaas) - Remove useless pciehp_get_latch_status() calls (Bjorn Helgaas) - Clear attention LED on device add (Keith Busch) - Allow exclusive userspace control of indicators (Keith Busch) - Process all hotplug events before looking for new ones (Mayurkumar Patel) - Don't re-read Slot Status when queuing hotplug event (Mayurkumar Patel) - Don't re-read Slot Status when handling surprise event (Mayurkumar Patel) - Make explicitly non-modular (Paul Gortmaker) Power management: - Afford direct-complete to devices with non-standard PM (Lukas Wunner) - Query platform firmware for device power state (Lukas Wunner) - Recognize D3cold in pci_update_current_state() (Lukas Wunner) - Avoid unnecessary resume after direct-complete (Lukas Wunner) - Make explicitly non-modular (Paul Gortmaker) Virtualization: - Mark Atheros AR9580 to avoid bus reset (Maik Broemme) - Check for pci_setup_device() failure in pci_iov_add_virtfn() (Po Liu) MSI: - Enable PCI_MSI_IRQ_DOMAIN support for ARC (Joao Pinto) AER: - Remove aerdriver.nosourceid kernel parameter (Bjorn Helgaas) - Remove aerdriver.forceload kernel parameter (Bjorn Helgaas) - Fix aer_probe() kernel-doc comment (Cao jin) - Add bus flag to skip source ID matching (Jon Derrick) - Avoid memory allocation in interrupt handling path (Jon Derrick) - Cache capability position (Keith Busch) - Make explicitly non-modular (Paul Gortmaker) - Remove duplicate AER severity translation (Tyler Baicar) - Send correct severity to calculate AER severity (Tyler Baicar) Precision Time Measurement: - Add Precision Time Measurement (PTM) support (Jonathan Yong) - Add PTM clock granularity information (Bjorn Helgaas) - Add pci_enable_ptm() for drivers to enable PTM on endpoints (Bjorn Helgaas) Generic host bridge driver: - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Make explicitly non-modular (Paul Gortmaker) Altera host bridge driver: - Remove redundant platform_get_resource() return value check (Bjorn Helgaas) - Poll for link training status after retraining the link (Ley Foon Tan) - Rework config accessors for use without a struct pci_bus (Ley Foon Tan) - Move retrain from fixup to altera_pcie_host_init() (Ley Foon Tan) - Make MSI explicitly non-modular (Paul Gortmaker) - Make explicitly non-modular (Paul Gortmaker) - Relax device number checking to allow SR-IOV (Po Liu) ARM Versatile host bridge driver: - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) Axis ARTPEC-6 host bridge driver: - Drop __init from artpec6_add_pcie_port() (Niklas Cassel) Freescale i.MX6 host bridge driver: - Make explicitly non-modular (Paul Gortmaker) Intel VMD host bridge driver: - Add quirk for AER to ignore source ID (Jon Derrick) - Allocate IRQ lists with correct MSI-X count (Jon Derrick) - Convert to use pci_alloc_irq_vectors() API (Jon Derrick) - Eliminate vmd_vector member from list type (Jon Derrick) - Eliminate index member from IRQ list (Jon Derrick) - Synchronize with RCU freeing MSI IRQ descs (Keith Busch) - Request userspace control of PCIe hotplug indicators (Keith Busch) - Move VMD driver to drivers/pci/host (Keith Busch) Marvell Aardvark host bridge driver: - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Remove redundant dev_err call in advk_pcie_probe() (Wei Yongjun) Microsoft Hyper-V host bridge driver: - Use zero-length array in struct pci_packet (Dexuan Cui) - Use pci_function_description[0] in struct definitions (Dexuan Cui) - Remove the unused 'wrk' in struct hv_pcibus_device (Dexuan Cui) - Handle vmbus_sendpacket() failure in hv_compose_msi_msg() (Dexuan Cui) - Handle hv_pci_generic_compl() error case (Dexuan Cui) - Use list_move_tail() instead of list_del() + list_add_tail() (Wei Yongjun) NVIDIA Tegra host bridge driver: - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Remove redundant _data suffix (Thierry Reding) - Use of_device_get_match_data() (Thierry Reding) Qualcomm host bridge driver: - Make explicitly non-modular (Paul Gortmaker) Renesas R-Car host bridge driver: - Consolidate register space lookup and ioremap (Bjorn Helgaas) - Don't disable/unprepare clocks on prepare/enable failure (Geert Uytterhoeven) - Add multi-MSI support (Grigory Kletsko) - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Fix some checkpatch warnings (Sergei Shtylyov) - Try increasing PCIe link speed to 5 GT/s at boot (Sergei Shtylyov) Rockchip host bridge driver: - Add DT bindings for Rockchip PCIe controller (Shawn Lin) - Add Rockchip PCIe controller support (Shawn Lin) - Improve the deassert sequence of four reset pins (Shawn Lin) - Fix wrong transmitted FTS count (Shawn Lin) - Increase the Max Credit update interval (Rajat Jain) Samsung Exynos host bridge driver: - Make explicitly non-modular (Paul Gortmaker) ST Microelectronics SPEAr13xx host bridge driver: - Make explicitly non-modular (Paul Gortmaker) Synopsys DesignWare host bridge driver: - Return data directly from dw_pcie_readl_rc() (Bjorn Helgaas) - Exchange viewport of `MEMORYs' and `CFGs/IOs' (Dong Bo) - Check LTSSM training bit before deciding link is up (Jisheng Zhang) - Move link wait definitions to .c file (Joao Pinto) - Wait for iATU enable (Joao Pinto) - Add iATU Unroll feature (Joao Pinto) - Fix pci_remap_iospace() failure path (Lorenzo Pieralisi) - Make explicitly non-modular (Paul Gortmaker) - Relax device number checking to allow SR-IOV (Po Liu) - Keep viewport fixed for IO transaction if num_viewport > 2 (Pratyush Anand) - Remove redundant platform_get_resource() return value check (Wei Yongjun) TI DRA7xx host bridge driver: - Make explicitly non-modular (Paul Gortmaker) TI Keystone host bridge driver: - Propagate request_irq() failure (Wei Yongjun) Xilinx AXI host bridge driver: - Keep both legacy and MSI interrupt domain references (Bharat Kumar Gogada) - Clear interrupt register for invalid interrupt (Bharat Kumar Gogada) - Clear correct MSI set bit (Bharat Kumar Gogada) - Dispose of MSI virtual IRQ (Bharat Kumar Gogada) - Make explicitly non-modular (Paul Gortmaker) - Relax device number checking to allow SR-IOV (Po Liu) Xilinx NWL host bridge driver: - Expand error logging (Bharat Kumar Gogada) - Enable all MSI interrupts using MSI mask (Bharat Kumar Gogada) - Make explicitly non-modular (Paul Gortmaker) Miscellaneous: - Drop CONFIG_KEXEC_CORE ifdeffery (Lukas Wunner) - portdrv: Make explicitly non-modular (Paul Gortmaker) - Make DPC explicitly non-modular (Paul Gortmaker)" * tag 'pci-v4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (105 commits) x86/PCI: VMD: Move VMD driver to drivers/pci/host PCI: rockchip: Fix wrong transmitted FTS count PCI: rockchip: Improve the deassert sequence of four reset pins PCI: rockchip: Increase the Max Credit update interval PCI: rcar: Try increasing PCIe link speed to 5 GT/s at boot PCI/AER: Fix aer_probe() kernel-doc comment PCI: Ignore requested alignment for VF BARs PCI: Ignore requested alignment for PROBE_ONLY and fixed resources PCI: Avoid unnecessary resume after direct-complete PCI: Recognize D3cold in pci_update_current_state() PCI: Query platform firmware for device power state PCI: Afford direct-complete to devices with non-standard PM PCI/AER: Cache capability position PCI/AER: Avoid memory allocation in interrupt handling path x86/PCI: VMD: Request userspace control of PCIe hotplug indicators PCI: pciehp: Allow exclusive userspace control of indicators ACPI / APEI: Send correct severity to calculate AER severity PCI/AER: Remove duplicate AER severity translation x86/PCI: VMD: Synchronize with RCU freeing MSI IRQ descs x86/PCI: VMD: Eliminate index member from IRQ list ...
2 parents fbbea38 + bdf5309 commit e6e3d8f

Some content is hidden

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

63 files changed

+2550
-810
lines changed

Documentation/PCI/pcieaer-howto.txt

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,17 @@ depends on CONFIG_PCIEPORTBUS, so pls. set CONFIG_PCIEPORTBUS=y and
4949
CONFIG_PCIEAER = y.
5050

5151
2.2 Load PCI Express AER Root Driver
52-
There is a case where a system has AER support in BIOS. Enabling the AER
53-
Root driver and having AER support in BIOS may result unpredictable
54-
behavior. To avoid this conflict, a successful load of the AER Root driver
55-
requires ACPI _OSC support in the BIOS to allow the AER Root driver to
56-
request for native control of AER. See the PCI FW 3.0 Specification for
57-
details regarding OSC usage. Currently, lots of firmwares don't provide
58-
_OSC support while they use PCI Express. To support such firmwares,
59-
forceload, a parameter of type bool, could enable AER to continue to
60-
be initiated although firmwares have no _OSC support. To enable the
61-
walkaround, pls. add aerdriver.forceload=y to kernel boot parameter line
62-
when booting kernel. Note that forceload=n by default.
63-
64-
nosourceid, another parameter of type bool, can be used when broken
65-
hardware (mostly chipsets) has root ports that cannot obtain the reporting
66-
source ID. nosourceid=n by default.
52+
53+
Some systems have AER support in firmware. Enabling Linux AER support at
54+
the same time the firmware handles AER may result in unpredictable
55+
behavior. Therefore, Linux does not handle AER events unless the firmware
56+
grants AER control to the OS via the ACPI _OSC method. See the PCI FW 3.0
57+
Specification for details regarding _OSC usage.
6758

6859
2.3 AER error output
69-
When a PCI-E AER error is captured, an error message will be outputted to
70-
console. If it's a correctable error, it is outputted as a warning.
60+
61+
When a PCIe AER error is captured, an error message will be output to
62+
console. If it's a correctable error, it is output as a warning.
7163
Otherwise, it is printed as an error. So users could choose different
7264
log level to filter out correctable error messages.
7365

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Required properties:
1717
- num-lanes: number of lanes to use
1818

1919
Optional properties:
20+
- num-viewport: number of view ports configured in hardware. If a platform
21+
does not specify it, the driver assumes 2.
2022
- num-lanes: number of lanes to use (this property should be specified unless
2123
the link is brought already up in BIOS)
2224
- reset-gpio: gpio pin number of power good signal
@@ -44,4 +46,5 @@ Example configuration:
4446
interrupts = <25>, <24>;
4547
#interrupt-cells = <1>;
4648
num-lanes = <1>;
49+
num-viewport = <3>;
4750
};
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
* Rockchip AXI PCIe Root Port Bridge DT description
2+
3+
Required properties:
4+
- #address-cells: Address representation for root ports, set to <3>
5+
- #size-cells: Size representation for root ports, set to <2>
6+
- #interrupt-cells: specifies the number of cells needed to encode an
7+
interrupt source. The value must be 1.
8+
- compatible: Should contain "rockchip,rk3399-pcie"
9+
- reg: Two register ranges as listed in the reg-names property
10+
- reg-names: Must include the following names
11+
- "axi-base"
12+
- "apb-base"
13+
- clocks: Must contain an entry for each entry in clock-names.
14+
See ../clocks/clock-bindings.txt for details.
15+
- clock-names: Must include the following entries:
16+
- "aclk"
17+
- "aclk-perf"
18+
- "hclk"
19+
- "pm"
20+
- msi-map: Maps a Requester ID to an MSI controller and associated
21+
msi-specifier data. See ./pci-msi.txt
22+
- phys: From PHY bindings: Phandle for the Generic PHY for PCIe.
23+
- phy-names: MUST be "pcie-phy".
24+
- interrupts: Three interrupt entries must be specified.
25+
- interrupt-names: Must include the following names
26+
- "sys"
27+
- "legacy"
28+
- "client"
29+
- resets: Must contain five entries for each entry in reset-names.
30+
See ../reset/reset.txt for details.
31+
- reset-names: Must include the following names
32+
- "core"
33+
- "mgmt"
34+
- "mgmt-sticky"
35+
- "pipe"
36+
- pinctrl-names : The pin control state names
37+
- pinctrl-0: The "default" pinctrl state
38+
- #interrupt-cells: specifies the number of cells needed to encode an
39+
interrupt source. The value must be 1.
40+
- interrupt-map-mask and interrupt-map: standard PCI properties
41+
42+
Optional Property:
43+
- ep-gpios: contain the entry for pre-reset gpio
44+
- num-lanes: number of lanes to use
45+
- vpcie3v3-supply: The phandle to the 3.3v regulator to use for PCIe.
46+
- vpcie1v8-supply: The phandle to the 1.8v regulator to use for PCIe.
47+
- vpcie0v9-supply: The phandle to the 0.9v regulator to use for PCIe.
48+
49+
*Interrupt controller child node*
50+
The core controller provides a single interrupt for legacy INTx. The PCIe node
51+
should contain an interrupt controller node as a target for the PCI
52+
'interrupt-map' property. This node represents the domain at which the four
53+
INTx interrupts are decoded and routed.
54+
55+
56+
Required properties for Interrupt controller child node:
57+
- interrupt-controller: identifies the node as an interrupt controller
58+
- #address-cells: specifies the number of cells needed to encode an
59+
address. The value must be 0.
60+
- #interrupt-cells: specifies the number of cells needed to encode an
61+
interrupt source. The value must be 1.
62+
63+
Example:
64+
65+
pcie0: pcie@f8000000 {
66+
compatible = "rockchip,rk3399-pcie";
67+
#address-cells = <3>;
68+
#size-cells = <2>;
69+
clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
70+
<&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
71+
clock-names = "aclk", "aclk-perf",
72+
"hclk", "pm";
73+
bus-range = <0x0 0x1>;
74+
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
75+
<GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
76+
<GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>;
77+
interrupt-names = "sys", "legacy", "client";
78+
assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
79+
assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
80+
assigned-clock-rates = <100000000>;
81+
ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
82+
ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x600000
83+
0x81000000 0x0 0xfa600000 0x0 0xfa600000 0x0 0x100000>;
84+
num-lanes = <4>;
85+
msi-map = <0x0 &its 0x0 0x1000>;
86+
reg = <0x0 0xf8000000 0x0 0x2000000>, <0x0 0xfd000000 0x0 0x1000000>;
87+
reg-names = "axi-base", "apb-base";
88+
resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
89+
<&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>;
90+
reset-names = "core", "mgmt", "mgmt-sticky", "pipe";
91+
phys = <&pcie_phy>;
92+
phy-names = "pcie-phy";
93+
pinctrl-names = "default";
94+
pinctrl-0 = <&pcie_clkreq>;
95+
#interrupt-cells = <1>;
96+
interrupt-map-mask = <0 0 0 7>;
97+
interrupt-map = <0 0 0 1 &pcie0_intc 0>,
98+
<0 0 0 2 &pcie0_intc 1>,
99+
<0 0 0 3 &pcie0_intc 2>,
100+
<0 0 0 4 &pcie0_intc 3>;
101+
pcie0_intc: interrupt-controller {
102+
interrupt-controller;
103+
#address-cells = <0>;
104+
#interrupt-cells = <1>;
105+
};
106+
};

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9256,6 +9256,15 @@ S: Maintained
92569256
F: Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
92579257
F: drivers/pci/host/pcie-hisi.c
92589258

9259+
PCIE DRIVER FOR ROCKCHIP
9260+
M: Shawn Lin <[email protected]>
9261+
M: Wenrui Li <[email protected]>
9262+
9263+
9264+
S: Maintained
9265+
F: Documentation/devicetree/bindings/pci/rockchip-pcie.txt
9266+
F: drivers/pci/host/pcie-rockchip.c
9267+
92599268
PCIE DRIVER FOR QUALCOMM MSM
92609269
M: Stanimir Varbanov <[email protected]>
92619270

arch/arc/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ generic-y += mcs_spinlock.h
2525
generic-y += mm-arch-hooks.h
2626
generic-y += mman.h
2727
generic-y += msgbuf.h
28+
generic-y += msi.h
2829
generic-y += param.h
2930
generic-y += parport.h
3031
generic-y += pci.h

arch/microblaze/pci/pci-common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,10 +632,10 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
632632
}
633633
}
634634

635-
/* Decide whether to display the domain number in /proc */
635+
/* Display the domain number in /proc */
636636
int pci_proc_domain(struct pci_bus *bus)
637637
{
638-
return 0;
638+
return pci_domain_nr(bus);
639639
}
640640

641641
/* This header fixup will do the resource fixup for all devices as they are

arch/x86/Kconfig

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,19 +2757,6 @@ config PMC_ATOM
27572757
def_bool y
27582758
depends on PCI
27592759

2760-
config VMD
2761-
depends on PCI_MSI
2762-
tristate "Volume Management Device Driver"
2763-
default N
2764-
---help---
2765-
Adds support for the Intel Volume Management Device (VMD). VMD is a
2766-
secondary PCI host bridge that allows PCI Express root ports,
2767-
and devices attached to them, to be removed from the default
2768-
PCI domain and placed within the VMD domain. This provides
2769-
more bus resources than are otherwise possible with a
2770-
single domain. If you know your system provides one of these and
2771-
has devices attached to it, say Y; if you are not sure, say N.
2772-
27732760
source "net/Kconfig"
27742761

27752762
source "drivers/Kconfig"

arch/x86/include/asm/pci.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ struct pci_sysdata {
2323
#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN
2424
void *fwnode; /* IRQ domain for MSI assignment */
2525
#endif
26+
#if IS_ENABLED(CONFIG_VMD)
27+
bool vmd_domain; /* True if in Intel VMD domain */
28+
#endif
2629
};
2730

2831
extern int pci_routeirq;
@@ -56,6 +59,17 @@ static inline void *_pci_root_bus_fwnode(struct pci_bus *bus)
5659
#define pci_root_bus_fwnode _pci_root_bus_fwnode
5760
#endif
5861

62+
static inline bool is_vmd(struct pci_bus *bus)
63+
{
64+
#if IS_ENABLED(CONFIG_VMD)
65+
struct pci_sysdata *sd = bus->sysdata;
66+
67+
return sd->vmd_domain;
68+
#else
69+
return false;
70+
#endif
71+
}
72+
5973
/* Can be used to override the logic in pci_scan_bus for skipping
6074
already-configured bus numbers - to be used for buggy BIOSes
6175
or architectures with incomplete PCI setup by the loader */

arch/x86/pci/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ obj-y += bus_numa.o
2323
obj-$(CONFIG_AMD_NB) += amd_bus.o
2424
obj-$(CONFIG_PCI_CNB20LE_QUIRK) += broadcom_bus.o
2525

26-
obj-$(CONFIG_VMD) += vmd.o
27-
2826
ifeq ($(CONFIG_PCI_DEBUG),y)
2927
EXTRA_CFLAGS += -DDEBUG
3028
endif

arch/x86/pci/common.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,12 @@ static void set_dma_domain_ops(struct pci_dev *pdev)
677677
static void set_dma_domain_ops(struct pci_dev *pdev) {}
678678
#endif
679679

680+
static void set_dev_domain_options(struct pci_dev *pdev)
681+
{
682+
if (is_vmd(pdev->bus))
683+
pdev->hotplug_user_indicators = 1;
684+
}
685+
680686
int pcibios_add_device(struct pci_dev *dev)
681687
{
682688
struct setup_data *data;
@@ -707,6 +713,7 @@ int pcibios_add_device(struct pci_dev *dev)
707713
iounmap(data);
708714
}
709715
set_dma_domain_ops(dev);
716+
set_dev_domain_options(dev);
710717
return 0;
711718
}
712719

0 commit comments

Comments
 (0)