01 Nov, 2014

1 commit

  • Pull PCI fixes from Bjorn Helgaas:
    "These changes, intended for v3.18, fix:

    Sysfs
    - Fix "enable" filename change (Greg Kroah-Hartman)

    An unintentional sysfs filename change in commit 5136b2da770d
    ("PCI: convert bus code to use dev_groups"), which appeared in
    v3.13, changed "enable" to "enabled", and this changes it back.

    Old users of "enable" are currently broken and will be helped by
    this change. Anything that started to use "enabled" after v3.13
    will be broken by this change. If necessary, we can add a symlink
    to make both work, but this patch doesn't do that.

    PCI device hotplug
    - Revert duplicate merge (Kamal Mostafa)

    A mistaken duplicate merge that added a check twice. Nothing's
    broken; this just removes the unnecessary code.

    Freescale i.MX6
    - Wait for clocks to stabilize after ref_en (Richard Zhu)

    An i.MX6 clock problem that prevents mx6 nitrogen boards from booting"

    * tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI: Rename sysfs 'enabled' file back to 'enable'
    PCI: imx6: Wait for clocks to stabilize after ref_en
    Revert duplicate "PCI: pciehp: Prevent NULL dereference during probe"

    Linus Torvalds
     

31 Oct, 2014

1 commit

  • Back in commit 5136b2da770d ("PCI: convert bus code to use dev_groups"),
    I misstyped the 'enable' sysfs filename as 'enabled', which broke the
    userspace API. This patch fixes that issue by renaming the file back.

    Fixes: 5136b2da770d ("PCI: convert bus code to use dev_groups")
    Reported-by: Jeff Epler
    Tested-by: Jeff Epler # on v3.14-rt
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Bjorn Helgaas
    CC: stable@vger.kernel.org # 3.13

    Greg Kroah-Hartman
     

30 Oct, 2014

1 commit

  • For boards without a reset GPIO we skip the delay between enabling the
    pcie_ref_clk and touching the RC registers for configuration. This hangs
    the system if there isn't a proper delay to ensure the clocks are settled
    in the DW PCIe core.

    Also iMX6Q always needs an additional 10us delay to make sure the reset is
    propagated through the core, as we don't have an explicitly controlled
    reset input on this SoC.

    This fixes a problem with 3fce0e882f61 ("PCI: imx6: Delay enabling
    reference clock for SS until it stabilizes"): the kernel doesn't boot on
    systems that don't pass the PCI GPIO reset in the DTB. This regression
    affects mx6 nitrogen boards.

    [bhelgaas: add regression info in changelog]
    Fixes: 3fce0e882f61 ("PCI: imx6: Delay enabling reference clock for SS until it stabilizes")
    Reported-by: Fabio Estevam
    Tested-by: Fabio Estevam
    Signed-off-by: Richard Zhu
    Signed-off-by: Bjorn Helgaas
    Acked-by: Lucas Stach

    Richard Zhu
     

28 Oct, 2014

1 commit

  • This reverts bceee4a97eb5 ("PCI: pciehp: Prevent NULL dereference during
    probe") because it was accidentally applied twice:

    62e4492c3063 ("PCI: Prevent NULL dereference during pciehp probe")
    bceee4a97eb5 ("PCI: pciehp: Prevent NULL dereference during probe")

    Revert the latter to dispose of the duplicated code block.

    [bhelgaas: tidy changelog, drop stable tag]
    Signed-off-by: Kamal Mostafa
    Signed-off-by: Bjorn Helgaas
    CC: Andreas Noever

    Kamal Mostafa
     

24 Oct, 2014

1 commit

  • If the irqchip handling the PCIe PME interrupt is not able
    to enable interrupt wakeup we should properly reflect this
    in the PME suspend status.

    This fixes a kernel warning on resume, where it would try
    to disable the irq wakeup that failed to be activated while
    suspending, for example:

    WARNING: CPU: 0 PID: 609 at kernel/irq/manage.c:536 irq_set_irq_wake+0xc0/0xf8()
    Unbalanced IRQ 384 wake disable

    Fixes: 76cde7e49590 (PCI / PM: Make PCIe PME interrupts wake up from suspend-to-idle)
    Reported-and-tested-by: Richard Zhu
    Signed-off-by: Lucas Stach
    Signed-off-by: Rafael J. Wysocki

    Lucas Stach
     

12 Oct, 2014

1 commit

  • Pull Xen updates from David Vrabel:
    "Features and fixes:

    - Add pvscsi frontend and backend drivers.
    - Remove _PAGE_IOMAP PTE flag, freeing it for alternate uses.
    - Try and keep memory contiguous during PV memory setup (reduces
    SWIOTLB usage).
    - Allow front/back drivers to use threaded irqs.
    - Support large initrds in PV guests.
    - Fix PVH guests in preparation for Xen 4.5"

    * tag 'stable/for-linus-3.18-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (22 commits)
    xen: remove DEFINE_XENBUS_DRIVER() macro
    xen/xenbus: Remove BUG_ON() when error string trucated
    xen/xenbus: Correct the comments for xenbus_grant_ring()
    x86/xen: Set EFER.NX and EFER.SCE in PVH guests
    xen: eliminate scalability issues from initrd handling
    xen: sync some headers with xen tree
    xen: make pvscsi frontend dependant on xenbus frontend
    arm{,64}/xen: Remove "EXPERIMENTAL" in the description of the Xen options
    xen-scsifront: don't deadlock if the ring becomes full
    x86: remove the Xen-specific _PAGE_IOMAP PTE flag
    x86/xen: do not use _PAGE_IOMAP PTE flag for I/O mappings
    x86: skip check for spurious faults for non-present faults
    xen/efi: Directly include needed headers
    xen-scsiback: clean up a type issue in scsiback_make_tpg()
    xen-scsifront: use GFP_ATOMIC under spin_lock
    MAINTAINERS: Add xen pvscsi maintainer
    xen-scsiback: Add Xen PV SCSI backend driver
    xen-scsifront: Add Xen PV SCSI frontend driver
    xen: Add Xen pvSCSI protocol description
    xen/events: support threaded irqs for interdomain event channels
    ...

    Linus Torvalds
     

11 Oct, 2014

1 commit

  • Pull VFIO updates from Alex Williamson:
    - Nested IOMMU extension to type1 (Will Deacon)
    - Restore MSIx message before enabling (Gavin Shan)
    - Fix remove path locking (Alex Williamson)

    * tag 'vfio-v3.18-rc1' of git://github.com/awilliam/linux-vfio:
    vfio-pci: Fix remove path locking
    drivers/vfio: Export vfio_spapr_iommu_eeh_ioctl() with GPL
    vfio/pci: Restore MSIx message prior to enabling
    PCI: Export MSI message relevant functions
    vfio/iommu_type1: add new VFIO_TYPE1_NESTING_IOMMU IOMMU type
    iommu: introduce domain attribute for nesting IOMMUs

    Linus Torvalds
     

10 Oct, 2014

2 commits

  • Pull ACPI and power management updates from Rafael Wysocki:
    "Features-wise, to me the most important this time is a rework of
    wakeup interrupts handling in the core that makes them work
    consistently across all of the available sleep states, including
    suspend-to-idle. Many thanks to Thomas Gleixner for his help with
    this work.

    Second is an update of the generic PM domains code that has been in
    need of some care for quite a while. Unused code is being removed, DT
    support is being added and domains are now going to be attached to
    devices in bus type code in analogy with the ACPI PM domain. The
    majority of work here was done by Ulf Hansson who also has been the
    most active developer this time.

    Apart from this we have a traditional ACPICA update, this time to
    upstream version 20140828 and a few ACPI wakeup interrupts handling
    patches on top of the general rework mentioned above. There also are
    several cpufreq commits including renaming the cpufreq-cpu0 driver to
    cpufreq-dt, as this is what implements generic DT-based cpufreq
    support, and a new DT-based idle states infrastructure for cpuidle.

    In addition to that, the ACPI LPSS driver is updated, ACPI support for
    Apple machines is improved, a few bugs are fixed and a few cleanups
    are made all over.

    Finally, the Adaptive Voltage Scaling (AVS) subsystem now has a tree
    maintained by Kevin Hilman that will be merged through the PM tree.

    Numbers-wise, the generic PM domains update takes the lead this time
    with 32 non-merge commits, second is cpufreq (15 commits) and the 3rd
    place goes to the wakeup interrupts handling rework (13 commits).

    Specifics:

    - Rework the handling of wakeup IRQs by the IRQ core such that all of
    them will be switched over to "wakeup" mode in suspend_device_irqs()
    and in that mode the first interrupt will abort system suspend in
    progress or wake up the system if already in suspend-to-idle (or
    equivalent) without executing any interrupt handlers. Among other
    things that eliminates the wakeup-related motivation to use the
    IRQF_NO_SUSPEND interrupt flag with interrupts which don't really
    need it and should not use it (Thomas Gleixner and Rafael Wysocki)

    - Switch over ACPI to handling wakeup interrupts with the help of the
    new mechanism introduced by the above IRQ core rework (Rafael Wysocki)

    - Rework the core generic PM domains code to eliminate code that's
    not used, add DT support and add a generic mechanism by which
    devices can be added to PM domains automatically during enumeration
    (Ulf Hansson, Geert Uytterhoeven and Tomasz Figa).

    - Add debugfs-based mechanics for debugging generic PM domains
    (Maciej Matraszek).

    - ACPICA update to upstream version 20140828. Included are updates
    related to the SRAT and GTDT tables and the _PSx methods are in the
    METHOD_NAME list now (Bob Moore and Hanjun Guo).

    - Add _OSI("Darwin") support to the ACPI core (unfortunately, that
    can't really be done in a straightforward way) to prevent
    Thunderbolt from being turned off on Apple systems after boot (or
    after resume from system suspend) and rework the ACPI Smart Battery
    Subsystem (SBS) driver to work correctly with Apple platforms
    (Matthew Garrett and Andreas Noever).

    - ACPI LPSS (Low-Power Subsystem) driver update cleaning up the code,
    adding support for 133MHz I2C source clock on Intel Baytrail to it
    and making it avoid using UART RTS override with Auto Flow Control
    (Heikki Krogerus).

    - ACPI backlight updates removing the video_set_use_native_backlight
    quirk which is not necessary any more, making the code check the
    list of output devices returned by the _DOD method to avoid
    creating acpi_video interfaces that won't work and adding a quirk
    for Lenovo Ideapad Z570 (Hans de Goede, Aaron Lu and Stepan Bujnak)

    - New Win8 ACPI OSI quirks for some Dell laptops (Edward Lin)

    - Assorted ACPI code cleanups (Fabian Frederick, Rasmus Villemoes,
    Sudip Mukherjee, Yijing Wang, and Zhang Rui)

    - cpufreq core updates and cleanups (Viresh Kumar, Preeti U Murthy,
    Rasmus Villemoes)

    - cpufreq driver updates: cpufreq-cpu0/cpufreq-dt (driver name change
    among other things), ppc-corenet, powernv (Viresh Kumar, Preeti U
    Murthy, Shilpasri G Bhat, Lucas Stach)

    - cpuidle support for DT-based idle states infrastructure, new ARM64
    cpuidle driver, cpuidle core cleanups (Lorenzo Pieralisi, Rasmus
    Villemoes)

    - ARM big.LITTLE cpuidle driver updates: support for DT-based
    initialization and Exynos5800 compatible string (Lorenzo Pieralisi,
    Kevin Hilman)

    - Rework of the test_suspend kernel command line argument and a new
    trace event for console resume (Srinivas Pandruvada, Todd E Brandt)

    - Second attempt to optimize swsusp_free() (hibernation core) to make
    it avoid going through all PFNs which may be way too slow on some
    systems (Joerg Roedel)

    - devfreq updates (Paul Bolle, Punit Agrawal, Ãrjan Eide).

    - rockchip-io Adaptive Voltage Scaling (AVS) driver and AVS entry
    update in MAINTAINERS (Heiko Stübner, Kevin Hilman)

    - PM core fix related to clock management (Geert Uytterhoeven)

    - PM core's sysfs code cleanup (Johannes Berg)"

    * tag 'pm+acpi-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (105 commits)
    ACPI / fan: printk replacement
    PM / clk: Fix crash in clocks management code if !CONFIG_PM_RUNTIME
    PM / Domains: Rename cpu_data to cpuidle_data
    cpufreq: cpufreq-dt: fix potential double put of cpu OF node
    cpufreq: cpu0: rename driver and internals to 'cpufreq_dt'
    PM / hibernate: Iterate over set bits instead of PFNs in swsusp_free()
    cpufreq: ppc-corenet: remove duplicate update of cpu_data
    ACPI / sleep: Rework the handling of ACPI GPE wakeup from suspend-to-idle
    PM / sleep: Rename platform suspend/resume functions in suspend.c
    PM / sleep: Export dpm_suspend_late/noirq() and dpm_resume_early/noirq()
    ACPICA: Introduce acpi_enable_all_wakeup_gpes()
    ACPICA: Clear all non-wakeup GPEs in acpi_hw_enable_wakeup_gpe_block()
    ACPI / video: check _DOD list when creating backlight devices
    PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h
    cpufreq: Replace strnicmp with strncasecmp
    cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec
    cpufreq: powernv: Set the pstate of the last hotplugged out cpu in policy->cpus to minimum
    cpufreq: Allow stop CPU callback to be used by all cpufreq drivers
    PM / devfreq: exynos: Enable building exynos PPMU as module
    PM / devfreq: Export helper functions for drivers
    ...

    Linus Torvalds
     
  • 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 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

    Linus Torvalds
     

07 Oct, 2014

1 commit

  • * pm-genirq:
    PM / genirq: Document rules related to system suspend and interrupts
    PCI / PM: Make PCIe PME interrupts wake up from suspend-to-idle
    x86 / PM: Set IRQCHIP_SKIP_SET_WAKE for IOAPIC IRQ chip objects
    genirq: Simplify wakeup mechanism
    genirq: Mark wakeup sources as armed on suspend
    genirq: Create helper for flow handler entry check
    genirq: Distangle edge handler entry
    genirq: Avoid double loop on suspend
    genirq: Move MASK_ON_SUSPEND handling into suspend_device_irqs()
    genirq: Make use of pm misfeature accounting
    genirq: Add sanity checks for PM options on shared interrupt lines
    genirq: Move suspend/resume logic into irq/pm code
    PM / sleep: Mechanism for aborting system suspends unconditionally

    Rafael J. Wysocki
     

06 Oct, 2014

3 commits


02 Oct, 2014

16 commits

  • AMD has confirmed that peer-to-peer between two southbridge functions does
    not occur.

    Add a quirk to indicate that these functions are isolated even though they
    don't have an ACS capability.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=81841
    Signed-off-by: Marti Raudsepp
    Signed-off-by: Bjorn Helgaas
    Acked-by: Joel Schopp

    Marti Raudsepp
     
  • * pci/host-designware:
    PCI: designware: Remove open-coded bitmap operations
    PCI: designware: Setup and clear exactly one MSI at a time

    Conflicts:
    drivers/pci/host/pcie-designware.c

    Bjorn Helgaas
     
  • * pci/resource:
    PCI: Add missing MEM_64 mask in pci_assign_unassigned_bridge_resources()

    Bjorn Helgaas
     
  • Add the AppliedMicro X-Gene SOC PCIe host controller driver. The X-Gene
    PCIe controller supports up to 8 lanes and GEN3 speed. The X-Gene SOC
    supports up to 5 PCIe ports.

    [bhelgaas: folded in MAINTAINERS and bindings updates]
    Tested-by: Ming Lei
    Tested-by: Dann Frazier
    Signed-off-by: Tanmay Inamdar
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Liviu Dudau (driver)

    Tanmay Inamdar
     
  • Replace them by using the standard kernel bitmap ops. No functional
    change, but makes the code a lot cleaner.

    Signed-off-by: Lucas Stach
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Pratyush Anand
    Acked-by: Jingoo Han

    Lucas Stach
     
  • * pci/msi:
    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()

    Conflicts:
    drivers/pci/host/pcie-designware.c

    Bjorn Helgaas
     
  • * pci/host-generic:
    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()
    PCI: Add generic domain handling
    of/pci: Fix the conversion of IO ranges into IO resources
    of/pci: Move of_pci_range_to_resource() to of/address.c
    ARM: Define PCI_IOBASE as the base of virtual PCI IO space
    of/pci: Add pci_register_io_range() and pci_pio_to_address()
    asm-generic/io.h: Fix ioport_map() for !CONFIG_GENERIC_IOMAP

    Conflicts:
    drivers/pci/host/pci-tegra.c

    Bjorn Helgaas
     
  • * pci/aer:
    PCI/AER: Rename PCI_ERR_UNC_TRAIN to PCI_ERR_UNC_UND
    PCI/AER: Add additional PCIe AER error strings
    trace, RAS: Add additional PCIe AER error strings
    trace, RAS: Replace bare numbers with #defines for PCIe AER error strings

    * pci/virtualization:
    PCI: Add ACS quirk for Intel 10G NICs

    Bjorn Helgaas
     
  • The only use of "status" is to hold a value which is immediately returned,
    so just return and remove the variable directly.

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     
  • default_restore_msi_irq() already has the struct msi_desc pointer required
    by __write_msi_msg(), so call it directly instead of having write_msi_msg()
    look it up from the IRQ.

    No functional change.

    [bhelgaas: split into separate patch]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas

    Yijing Wang
     
  • The "msi_bus" sysfs file for bridges sets a bus flag to allow or disallow
    future driver requests for MSI or MSI-X. Previously, the sysfs file
    existed for endpoints but did nothing.

    Add "msi_bus" support for endpoints, so an administrator can prevent the
    use of MSI and MSI-X for individual devices.

    Note that as for bridges, these changes only affect future driver requests
    for MSI or MSI-X, so drivers may need to be reloaded.

    Add documentation for the "msi_bus" sysfs file.

    [bhelgaas: changelog, comments, add "subordinate", add endpoint printk,
    rework bus_flags setting, make bus_flags printk unconditional]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas

    Yijing Wang
     
  • "msi_attrib.pos" is only used for MSI (not MSI-X), and we already cache the
    MSI capability offset in "dev->msi_cap".

    Remove "pos" from the struct msi_attrib and use "dev->msi_cap" directly.

    [bhelgaas: changelog, fix whitespace]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas

    Yijing Wang
     
  • After commit 1c51b50c2995 ("PCI/MSI: Export MSI mode using attributes, not
    kobjects"), the kobject in struct msi_desc is unused.

    Remove the unused struct kobject from struct msi_desc.

    [bhelgaas: changelog]
    Fixes: 1c51b50c2995 ("PCI/MSI: Export MSI mode using attributes, not kobjects")
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas
    Acked-by: Greg Kroah-Hartman

    Yijing Wang
     
  • Rename pci_msi_check_device() to pci_msi_supported() for clarity. Note
    that pci_msi_supported() returns true if MSI/MSI-X is supported, so code
    like:

    if (pci_msi_supported(...))

    reads naturally.

    [bhelgaas: changelog, split to separate patch, reverse sense]
    Signed-off-by: Alexander Gordeev
    Signed-off-by: Bjorn Helgaas

    Alexander Gordeev
     
  • Both callers of pci_msi_check_device() check that the device is in D0
    state, so move the check from the callers into pci_msi_check_device()
    itself.

    In pci_enable_msi_range(), note that pci_msi_check_device() never returns a
    positive value any more, so the loop that called it until it returns zero
    or negative is no longer necessary.

    [bhelgaas: changelog, split to separate patch]
    Signed-off-by: Alexander Gordeev
    Signed-off-by: Bjorn Helgaas

    Alexander Gordeev
     
  • No architectures implement arch_msi_check_device() or the struct msi_chip
    .check_device() method, so remove them.

    Remove the "type" parameter to pci_msi_check_device() because it was only
    used to call arch_msi_check_device() and is no longer needed.

    [bhelgaas: changelog, split to separate patch]
    Signed-off-by: Alexander Gordeev
    Signed-off-by: Bjorn Helgaas

    Alexander Gordeev
     

01 Oct, 2014

6 commits

  • Add pci_remap_iospace() to map bus I/O resources into the CPU virtual
    address space. Architectures with special needs may provide their own
    version, but most should be able to use this one.

    This function is useful for PCI host bridge drivers that need to map the
    PCI I/O resources into virtual memory space.

    [bhelgaas: phys_addr description, drop temporary "err" variable]
    Signed-off-by: Liviu Dudau
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Rob Herring
    Reviewed-by: Catalin Marinas
    CC: Arnd Bergmann

    Liviu Dudau
     
  • Add pci_get_new_domain_nr() to allocate a new domain number and
    of_get_pci_domain_nr() to retrieve the PCI domain number of a given device
    from DT. Host bridge drivers or architecture-specific code can choose to
    implement their PCI domain number policy using these two functions.

    Using of_get_pci_domain_nr() guarantees a stable PCI domain number on every
    boot provided that all host bridge controllers are assigned a number in the
    device tree using "linux,pci-domain" property. Mixing use of
    pci_get_new_domain_nr() and of_get_pci_domain_nr() is not recommended as it
    can lead to potentially conflicting domain numbers being assigned to root
    buses behind different host bridges.

    Signed-off-by: Liviu Dudau
    Signed-off-by: Bjorn Helgaas
    CC: Arnd Bergmann
    CC: Grant Likely
    CC: Rob Herring
    CC: Catalin Marinas

    Liviu Dudau
     
  • The handling of PCI domains (or PCI segments in ACPI speak) is usually a
    straightforward affair but its implementation is currently left to the
    architectural code, with pci_domain_nr(b) querying the value of the domain
    associated with bus b.

    This patch introduces CONFIG_PCI_DOMAINS_GENERIC as an option that can be
    selected if an architecture wants a simple implementation where the value
    of the domain associated with a bus is stored in struct pci_bus.

    The architectures that select CONFIG_PCI_DOMAINS_GENERIC will then have to
    implement pci_bus_assign_domain_nr() as a way of setting the domain number
    associated with a root bus. All child buses except the root bus will
    inherit the domain_nr value from their parent.

    Signed-off-by: Catalin Marinas
    [Renamed pci_set_domain_nr() to pci_bus_assign_domain_nr()]
    Signed-off-by: Liviu Dudau
    Signed-off-by: Bjorn Helgaas
    CC: Arnd Bergmann

    Catalin Marinas
     
  • The ranges property for a host bridge controller in DT describes the
    mapping between the PCI bus address and the CPU physical address. The
    resources framework however expects that the IO resources start at a pseudo
    "port" address 0 (zero) and have a maximum size of IO_SPACE_LIMIT. The
    conversion from PCI ranges to resources failed to take that into account,
    returning a CPU physical address instead of a port number.

    Also fix all the drivers that depend on the old behaviour by fetching the
    CPU physical address based on the port number where it is being needed.

    Signed-off-by: Liviu Dudau
    Signed-off-by: Bjorn Helgaas
    Acked-by: Linus Walleij
    CC: Grant Likely
    CC: Rob Herring
    CC: Arnd Bergmann
    CC: Thierry Reding
    CC: Simon Horman
    CC: Catalin Marinas

    Liviu Dudau
     
  • The setup_irq function is supposed to set up exactly one MSI IRQ. Multiple
    IRQ setup is handled differently, to respect the choices made by the upper
    layers.

    Also only clear one MSI IRQ at a time; the PCI core will call into this
    function multiple times if it has to tear down more than one MSI IRQ.

    Signed-off-by: Lucas Stach
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Pratyush Anand
    Acked-by: Jingoo Han

    Lucas Stach
     
  • In 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to
    64-bit resources"), we added IORESOURCE_MEM_64 to the mask in
    pci_assign_unassigned_root_bus_resources(), but not to the mask in
    pci_assign_unassigned_bridge_resources().

    Add IORESOURCE_MEM_64 to the pci_assign_unassigned_bridge_resources() type
    mask.

    Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
    Signed-off-by: Yinghai Lu
    Signed-off-by: Bjorn Helgaas
    CC: stable@vger.kernel.org # v3.16+

    Yinghai Lu
     

30 Sep, 2014

3 commits

  • Intel has verified there is no peer-to-peer between functions for the below
    selection of 82598, 82599, and X520 10G NICs. These NICs lack an ACS
    capability, so we're not able to determine this isolation without the help
    of quirks.

    Generalize the Solarflare quirk and add these Intel 10G NICs.

    Signed-off-by: Alex Williamson
    Signed-off-by: Bjorn Helgaas
    Acked-by: John Ronciak

    Alex Williamson
     
  • * pci/host-designware:
    PCI: designware: Add get_msi_data() to pcie_host_ops
    PCI: designware: Rename get_msi_data() to get_msi_addr()
    PCI: designware: Fix IO resource end address calculation
    PCI: designware: Fix configuration base address when using 'reg'
    PCI: designware: Use NULL instead of false

    [bhelgaas: Fixup keystone for "PCI: designware: Rename get_msi_data() to
    get_msi_addr()"]

    Bjorn Helgaas
     
  • The patch exports 2 MSI message relevant functions, which will be
    used by VFIO PCI driver. The VFIO PCI driver would be built as
    a module.

    Signed-off-by: Gavin Shan
    Acked-by: Bjorn Helgaas
    Signed-off-by: Alex Williamson

    Gavin Shan
     

26 Sep, 2014

2 commits