diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 15:03:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 15:03:49 -0400 |
commit | 80213c03c4151d900cf293ef0fc51f8d88495e14 (patch) | |
tree | af2422fa255aed96c23cef894e0adbf817f30c45 /arch/powerpc/platforms/pseries | |
parent | ea584595fc85e65796335033dfca25ed655cd0ed (diff) | |
parent | f92d9ee3ab39841d1f29f2d1aa96ff7c74b36ee1 (diff) |
Merge tag 'pci-v3.18-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas:
"The interesting things here are:
- Turn on Config Request Retry Status Software Visibility. This
caused hangs last time, but we included a fix this time.
- Rework PCI device configuration to use _HPP/_HPX more aggressively
- Allow PCI devices to be put into D3cold during system suspend
- Add arm64 PCI support
- Add APM X-Gene host bridge driver
- Add TI Keystone host bridge driver
- Add Xilinx AXI host bridge driver
More detailed summary:
Enumeration
- Check Vendor ID only for Config Request Retry Status (Rajat Jain)
- Enable Config Request Retry Status when supported (Rajat Jain)
- Add generic domain handling (Catalin Marinas)
- Generate uppercase hex for modalias interface class (Ricardo Ribalda Delgado)
Resource management
- Add missing MEM_64 mask in pci_assign_unassigned_bridge_resources() (Yinghai Lu)
- Increase IBM ipr SAS Crocodile BARs to at least system page size (Douglas Lehr)
PCI device hotplug
- Prevent NULL dereference during pciehp probe (Andreas Noever)
- Move _HPP & _HPX handling into core (Bjorn Helgaas)
- Apply _HPP to PCIe devices as well as PCI (Bjorn Helgaas)
- Apply _HPP/_HPX to display devices (Bjorn Helgaas)
- Preserve SERR & PARITY settings when applying _HPP/_HPX (Bjorn Helgaas)
- Preserve MPS and MRRS settings when applying _HPP/_HPX (Bjorn Helgaas)
- Apply _HPP/_HPX to all devices, not just hot-added ones (Bjorn Helgaas)
- Fix wait time in pciehp timeout message (Yinghai Lu)
- Add more pciehp Slot Control debug output (Yinghai Lu)
- Stop disabling pciehp notifications during init (Yinghai Lu)
MSI
- Remove arch_msi_check_device() (Alexander Gordeev)
- Rename pci_msi_check_device() to pci_msi_supported() (Alexander Gordeev)
- Move D0 check into pci_msi_check_device() (Alexander Gordeev)
- Remove unused kobject from struct msi_desc (Yijing Wang)
- Remove "pos" from the struct msi_desc msi_attrib (Yijing Wang)
- Add "msi_bus" sysfs MSI/MSI-X control for endpoints (Yijing Wang)
- Use __get_cached_msi_msg() instead of get_cached_msi_msg() (Yijing Wang)
- Use __read_msi_msg() instead of read_msi_msg() (Yijing Wang)
- Use __write_msi_msg() instead of write_msi_msg() (Yijing Wang)
Power management
- Drop unused runtime PM support code for PCIe ports (Rafael J. Wysocki)
- Allow PCI devices to be put into D3cold during system suspend (Rafael J. Wysocki)
AER
- Add additional AER error strings (Gong Chen)
- Make <linux/aer.h> standalone includable (Thierry Reding)
Virtualization
- Add ACS quirk for Solarflare SFC9120 & SFC9140 (Alex Williamson)
- Add ACS quirk for Intel 10G NICs (Alex Williamson)
- Add ACS quirk for AMD A88X southbridge (Marti Raudsepp)
- Remove unused pci_find_upstream_pcie_bridge(), pci_get_dma_source() (Alex Williamson)
- Add device flag helpers (Ethan Zhao)
- Assume all Mellanox devices have broken INTx masking (Gavin Shan)
Generic host bridge driver
- Fix ioport_map() for !CONFIG_GENERIC_IOMAP (Liviu Dudau)
- Add pci_register_io_range() and pci_pio_to_address() (Liviu Dudau)
- Define PCI_IOBASE as the base of virtual PCI IO space (Liviu Dudau)
- Fix the conversion of IO ranges into IO resources (Liviu Dudau)
- Add pci_get_new_domain_nr() and of_get_pci_domain_nr() (Liviu Dudau)
- Add support for parsing PCI host bridge resources from DT (Liviu Dudau)
- Add pci_remap_iospace() to map bus I/O resources (Liviu Dudau)
- Add arm64 architectural support for PCI (Liviu Dudau)
APM X-Gene
- Add APM X-Gene PCIe driver (Tanmay Inamdar)
- Add arm64 DT APM X-Gene PCIe device tree nodes (Tanmay Inamdar)
Freescale i.MX6
- Probe in module_init(), not fs_initcall() (Lucas Stach)
- Delay enabling reference clock for SS until it stabilizes (Tim Harvey)
Marvell MVEBU
- Fix uninitialized variable in mvebu_get_tgt_attr() (Thomas Petazzoni)
NVIDIA Tegra
- Make sure the PCIe PLL is really reset (Eric Yuen)
- Add error path tegra_msi_teardown_irq() cleanup (Jisheng Zhang)
- Fix extended configuration space mapping (Peter Daifuku)
- Implement resource hierarchy (Thierry Reding)
- Clear CLKREQ# enable on port disable (Thierry Reding)
- Add Tegra124 support (Thierry Reding)
ST Microelectronics SPEAr13xx
- Pass config resource through reg property (Pratyush Anand)
Synopsys DesignWare
- Use NULL instead of false (Fabio Estevam)
- Parse bus-range property from devicetree (Lucas Stach)
- Use pci_create_root_bus() instead of pci_scan_root_bus() (Lucas Stach)
- Remove pci_assign_unassigned_resources() (Lucas Stach)
- Check private_data validity in single place (Lucas Stach)
- Setup and clear exactly one MSI at a time (Lucas Stach)
- Remove open-coded bitmap operations (Lucas Stach)
- Fix configuration base address when using 'reg' (Minghuan Lian)
- Fix IO resource end address calculation (Minghuan Lian)
- Rename get_msi_data() to get_msi_addr() (Minghuan Lian)
- Add get_msi_data() to pcie_host_ops (Minghuan Lian)
- Add support for v3.65 hardware (Murali Karicheri)
- Fold struct pcie_port_info into struct pcie_port (Pratyush Anand)
TI Keystone
- Add TI Keystone PCIe driver (Murali Karicheri)
- Limit MRSS for all downstream devices (Murali Karicheri)
- Assume controller is already in RC mode (Murali Karicheri)
- Set device ID based on SoC to support multiple ports (Murali Karicheri)
Xilinx AXI
- Add Xilinx AXI PCIe driver (Srikanth Thokala)
- Fix xilinx_pcie_assign_msi() return value test (Dan Carpenter)
Miscellaneous
- Clean up whitespace (Quentin Lambert)
- Remove assignments from "if" conditions (Quentin Lambert)
- Move PCI_VENDOR_ID_VMWARE to pci_ids.h (Francesco Ruggeri)
- x86: Mark DMI tables as initialization data (Mathias Krause)
- x86: Move __init annotation to the correct place (Mathias Krause)
- x86: Mark constants of pci_mmcfg_nvidia_mcp55() as __initconst (Mathias Krause)
- x86: Constify pci_mmcfg_probes[] array (Mathias Krause)
- x86: Mark PCI BIOS initialization code as such (Mathias Krause)
- Parenthesize PCI_DEVID and PCI_VPD_LRDT_ID parameters (Megan Kamiya)
- Remove unnecessary variable in pci_add_dynid() (Tobias Klauser)"
* tag 'pci-v3.18-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (109 commits)
arm64: dts: Add APM X-Gene PCIe device tree nodes
PCI: Add ACS quirk for AMD A88X southbridge devices
PCI: xgene: Add APM X-Gene PCIe driver
PCI: designware: Remove open-coded bitmap operations
PCI/MSI: Remove unnecessary temporary variable
PCI/MSI: Use __write_msi_msg() instead of write_msi_msg()
MSI/powerpc: Use __read_msi_msg() instead of read_msi_msg()
PCI/MSI: Use __get_cached_msi_msg() instead of get_cached_msi_msg()
PCI/MSI: Add "msi_bus" sysfs MSI/MSI-X control for endpoints
PCI/MSI: Remove "pos" from the struct msi_desc msi_attrib
PCI/MSI: Remove unused kobject from struct msi_desc
PCI/MSI: Rename pci_msi_check_device() to pci_msi_supported()
PCI/MSI: Move D0 check into pci_msi_check_device()
PCI/MSI: Remove arch_msi_check_device()
irqchip: armada-370-xp: Remove arch_msi_check_device()
PCI/MSI/PPC: Remove arch_msi_check_device()
arm64: Add architectural support for PCI
PCI: Add pci_remap_iospace() to map bus I/O resources
of/pci: Add support for parsing PCI host bridge resources from DT
of/pci: Add pci_get_new_domain_nr() and of_get_pci_domain_nr()
...
Conflicts:
arch/arm64/boot/dts/apm-storm.dtsi
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r-- | arch/powerpc/platforms/pseries/msi.c | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 18ff4626d74e..8ab5add4ac82 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c | |||
@@ -336,26 +336,6 @@ out: | |||
336 | return request; | 336 | return request; |
337 | } | 337 | } |
338 | 338 | ||
339 | static int rtas_msi_check_device(struct pci_dev *pdev, int nvec, int type) | ||
340 | { | ||
341 | int quota, rc; | ||
342 | |||
343 | if (type == PCI_CAP_ID_MSIX) | ||
344 | rc = check_req_msix(pdev, nvec); | ||
345 | else | ||
346 | rc = check_req_msi(pdev, nvec); | ||
347 | |||
348 | if (rc) | ||
349 | return rc; | ||
350 | |||
351 | quota = msi_quota_for_device(pdev, nvec); | ||
352 | |||
353 | if (quota && quota < nvec) | ||
354 | return quota; | ||
355 | |||
356 | return 0; | ||
357 | } | ||
358 | |||
359 | static int check_msix_entries(struct pci_dev *pdev) | 339 | static int check_msix_entries(struct pci_dev *pdev) |
360 | { | 340 | { |
361 | struct msi_desc *entry; | 341 | struct msi_desc *entry; |
@@ -397,15 +377,24 @@ static void rtas_hack_32bit_msi_gen2(struct pci_dev *pdev) | |||
397 | static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec_in, int type) | 377 | static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec_in, int type) |
398 | { | 378 | { |
399 | struct pci_dn *pdn; | 379 | struct pci_dn *pdn; |
400 | int hwirq, virq, i, rc; | 380 | int hwirq, virq, i, quota, rc; |
401 | struct msi_desc *entry; | 381 | struct msi_desc *entry; |
402 | struct msi_msg msg; | 382 | struct msi_msg msg; |
403 | int nvec = nvec_in; | 383 | int nvec = nvec_in; |
404 | int use_32bit_msi_hack = 0; | 384 | int use_32bit_msi_hack = 0; |
405 | 385 | ||
406 | pdn = pci_get_pdn(pdev); | 386 | if (type == PCI_CAP_ID_MSIX) |
407 | if (!pdn) | 387 | rc = check_req_msix(pdev, nvec); |
408 | return -ENODEV; | 388 | else |
389 | rc = check_req_msi(pdev, nvec); | ||
390 | |||
391 | if (rc) | ||
392 | return rc; | ||
393 | |||
394 | quota = msi_quota_for_device(pdev, nvec); | ||
395 | |||
396 | if (quota && quota < nvec) | ||
397 | return quota; | ||
409 | 398 | ||
410 | if (type == PCI_CAP_ID_MSIX && check_msix_entries(pdev)) | 399 | if (type == PCI_CAP_ID_MSIX && check_msix_entries(pdev)) |
411 | return -EINVAL; | 400 | return -EINVAL; |
@@ -416,12 +405,14 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec_in, int type) | |||
416 | */ | 405 | */ |
417 | if (type == PCI_CAP_ID_MSIX) { | 406 | if (type == PCI_CAP_ID_MSIX) { |
418 | int m = roundup_pow_of_two(nvec); | 407 | int m = roundup_pow_of_two(nvec); |
419 | int quota = msi_quota_for_device(pdev, m); | 408 | quota = msi_quota_for_device(pdev, m); |
420 | 409 | ||
421 | if (quota >= m) | 410 | if (quota >= m) |
422 | nvec = m; | 411 | nvec = m; |
423 | } | 412 | } |
424 | 413 | ||
414 | pdn = pci_get_pdn(pdev); | ||
415 | |||
425 | /* | 416 | /* |
426 | * Try the new more explicit firmware interface, if that fails fall | 417 | * Try the new more explicit firmware interface, if that fails fall |
427 | * back to the old interface. The old interface is known to never | 418 | * back to the old interface. The old interface is known to never |
@@ -485,7 +476,7 @@ again: | |||
485 | irq_set_msi_desc(virq, entry); | 476 | irq_set_msi_desc(virq, entry); |
486 | 477 | ||
487 | /* Read config space back so we can restore after reset */ | 478 | /* Read config space back so we can restore after reset */ |
488 | read_msi_msg(virq, &msg); | 479 | __read_msi_msg(entry, &msg); |
489 | entry->msg = msg; | 480 | entry->msg = msg; |
490 | } | 481 | } |
491 | 482 | ||
@@ -526,7 +517,6 @@ static int rtas_msi_init(void) | |||
526 | WARN_ON(ppc_md.setup_msi_irqs); | 517 | WARN_ON(ppc_md.setup_msi_irqs); |
527 | ppc_md.setup_msi_irqs = rtas_setup_msi_irqs; | 518 | ppc_md.setup_msi_irqs = rtas_setup_msi_irqs; |
528 | ppc_md.teardown_msi_irqs = rtas_teardown_msi_irqs; | 519 | ppc_md.teardown_msi_irqs = rtas_teardown_msi_irqs; |
529 | ppc_md.msi_check_device = rtas_msi_check_device; | ||
530 | 520 | ||
531 | WARN_ON(ppc_md.pci_irq_fixup); | 521 | WARN_ON(ppc_md.pci_irq_fixup); |
532 | ppc_md.pci_irq_fixup = rtas_msi_pci_irq_fixup; | 522 | ppc_md.pci_irq_fixup = rtas_msi_pci_irq_fixup; |