08 Oct, 2016

1 commit

  • 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
    ...

    Linus Torvalds
     

06 Oct, 2016

1 commit

  • * pci/host-vmd:
    x86/PCI: VMD: Move VMD driver to drivers/pci/host
    x86/PCI: VMD: Synchronize with RCU freeing MSI IRQ descs
    x86/PCI: VMD: Eliminate index member from IRQ list
    x86/PCI: VMD: Eliminate vmd_vector member from list type
    x86/PCI: VMD: Convert to use pci_alloc_irq_vectors() API
    x86/PCI: VMD: Allocate IRQ lists with correct MSI-X count
    PCI: Use positive flags in pci_alloc_irq_vectors()
    PCI: Update "pci=resource_alignment" documentation

    Conflicts:
    drivers/pci/host/Kconfig
    drivers/pci/host/Makefile

    Bjorn Helgaas
     

15 Sep, 2016

2 commits

  • Per the PCI Firmware spec, r3.0, sec 4.5.1, on ACPI systems, the OS must
    not use AER unless _OSC is present and _OSC grants AER control to the OS.
    The aerdriver.forceload kernel parameter was a way to enable Linux AER
    support on ACPI systems that lack _OSC or fail to grant control the the OS.

    Enabling Linux AER support when the firmware doesn't want us to is a recipe
    for problems, e.g., the firmware might be handling AER itself.

    Remove the aerdriver.forceload kernel parameter and related supporting
    code.

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     
  • The aerdriver.nosourceid kernel parameter was intended for working around
    broken chipsets don't supply the source ID for AER events. We recently
    added PCI_BUS_FLAGS_NO_AERSID, which can be set by quirks for the same
    purpose.

    Remove the aerdriver.nosourceid kernel parameter. For anything other than
    debugging, asking users to find and use kernel parameters is a poor user
    experience. Instead, we should add PCI_BUS_FLAGS_NO_AERSID quirks for any
    hardware that needs it.

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     

02 Sep, 2016

1 commit


17 Aug, 2016

1 commit

  • Instead of passing negative flags like PCI_IRQ_NOMSI to prevent use of
    certain interrupt types, pass positive flags like PCI_IRQ_LEGACY,
    PCI_IRQ_MSI, etc., to specify the acceptable interrupt types.

    This is based on a number of pending driver conversions that just happend
    to be a whole more obvious to read this way, and given that we have no
    users in the tree yet it can still easily be done.

    I've also added a PCI_IRQ_ALL_TYPES catchall to keep the case of accepting
    all interrupt types very simple.

    [bhelgaas: changelog, fix PCI_IRQ_AFFINITY doc typo, remove mention of
    PCI_IRQ_NOLEGACY]
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Alexander Gordeev

    Christoph Hellwig
     

22 Jul, 2016

2 commits

  • Set the affinity_mask in the PCI device before allocating vectors so that
    the affinity can be propagated through the MSI descriptor structures to the
    core IRQ code. To facilitate this, new __pci_enable_msi_range() and
    __pci_enable_msix_range() helpers are factored out of their not prefixed
    variants which assigning the new IRQ affinity mask in the PCI device so
    that the low-level interrupt code can perform the interrupt affinity
    assignment and do node-local allocations.

    A new PCI_IRQ_NOAFFINITY flag is added to pci_alloc_irq_vectors() so that
    this function can also be used by drivers that don't wish to use the
    automatic affinity assignment.

    [bhelgaas: omit "else" after "return" consistently]
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Alexander Gordeev

    Christoph Hellwig
     
  • Add a function to allocate and free a range of interrupt vectors, using
    MSI-X, MSI or legacy vectors (in that order) based on the capabilities of
    the underlying device and PCIe complex.

    Additionally a new helper is provided to get the Linux IRQ number for given
    device-relative vector so that the drivers don't need to allocate their own
    arrays to keep track of the vectors for the multi vector MSI-X case.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Alexander Gordeev

    Christoph Hellwig
     

18 Apr, 2015

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "Numerous fixes, the overdue removal of the i2o docs, some new Chinese
    translations, and, hopefully, the README fix that will end the flow of
    identical patches to that file"

    * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6: (34 commits)
    Documentation/memcg: update memcg/kmem status
    Documentation: blackfin: Makefile: Typo building issue
    Documentation/vm/pagemap.txt: correct location of page-types tool
    Documentation/memory-barriers.txt: typo fix
    doc: Add guest_nice column to example output of `cat /proc/stat'
    Documentation/kernel-parameters: Move "eagerfpu" to its right place
    Documentation: gpio: Update ACPI part of the document to mention _DSD
    docs/completion.txt: Various tweaks and corrections
    doc: completion: context, scope and language fixes
    Documentation:Update Documentation/zh_CN/arm64/memory.txt
    Documentation:Update Documentation/zh_CN/arm64/booting.txt
    Documentation: Chinese translation of arm64/legacy_instructions.txt
    DocBook media: fix broken EIA hyperlink
    Documentation: tweak the maintainers entry
    README: Change gzip/bzip2 to xz compression format
    README: Update version number reference
    doc:pci: Fix typo in Documentation/PCI
    Documentation: drm: Use '->' when describing access through pointers.
    Documentation: Remove mentioning of block barriers
    Documentation/email-clients.txt: Fix one grammar mistake, add extra info about TB
    ...

    Linus Torvalds
     

10 Apr, 2015

1 commit


20 Mar, 2015

2 commits

  • This patch fix spelling typo in Documentation/PCI.

    Signed-off-by: Masanari Iida
    Signed-off-by: Jonathan Corbet

    Masanari Iida
     
  • The IRQF_DISABLED is a NOOP and scheduled to be removed. According to Ingo
    Molnar in commit e58aa3d2d0cc01ad8d6f7f640a0670433f794922 (genirq: Run irq
    handlers with interrupts disabled), running IRQ handlers with interrupts
    enabled can cause stack overflows when the interrupt line of the issuing
    device is still active.

    This patch removes IRQF_DISABLED from this documentation. It was
    mentioned to be a solution to avoid deadlocks when a device uses
    multiple interrupts. As the flag is a NOOP this solution does not work
    anymore.

    Signed-off-by: Valentin Rothberg
    Signed-off-by: Jonathan Corbet

    Valentin Rothberg
     

19 Jun, 2014

1 commit

  • To keep the Documentation consistent either
    "practise" or "practice" should be used.

    Since there are 3 lines with "practise"

    ~/linux/Documentation$ grep -r practise * | wc -l
    3

    and 108 lines with "practice"

    ~/linux/Documentation$ grep -r practice * | wc -l
    108

    this patch converts "practise" to "practice".

    Signed-off-by: Jeremiah Mahler
    Signed-off-by: Jiri Kosina

    Jeremiah Mahler
     

21 Feb, 2014

1 commit


20 Feb, 2014

1 commit

  • This reverts commit 74bb1bcc7dbb ("PCI: handle SR-IOV Virtual Function
    Migration"), removing this exported interface:

    pci_sriov_migration()

    Since pci_sriov_migration() is unused, it is impossible to schedule
    sriov_migration_task() or use any of the other migration infrastructure.

    This is based on Stephen Hemminger's patch (see link below), but goes a bit
    further.

    Link: http://lkml.kernel.org/r/20131227132710.7190647c@nehalam.linuxnetplumber.net
    Signed-off-by: Bjorn Helgaas
    CC: Stephen Hemminger

    Bjorn Helgaas
     

14 Feb, 2014

2 commits


04 Feb, 2014

1 commit

  • We deprecated pci_enable_msi() in 302a2523c277 ("PCI/MSI: Add
    pci_enable_msi_range() and pci_enable_msix_range()").

    But we changed our minds after noticing that:

    - pci_enable_msi() doesn't have confusing return values like
    pci_enable_msi_block() and pci_enable_msix() did, and

    - pci_enable_msi() has a hundred or so callers that we don't want to
    change.

    This adds back the pci_enable_msi() documentation.

    [bhelgaas: changelog]
    Signed-off-by: Alexander Gordeev
    Signed-off-by: Bjorn Helgaas

    Alexander Gordeev
     

08 Jan, 2014

3 commits


04 Jan, 2014

4 commits

  • This adds pci_enable_msi_range(), which supersedes the pci_enable_msi()
    and pci_enable_msi_block() MSI interfaces.

    It also adds pci_enable_msix_range(), which supersedes the
    pci_enable_msix() MSI-X interface.

    The old interfaces have three categories of return values:

    negative: failure; caller should not retry
    positive: failure; value indicates number of interrupts that *could*
    have been allocated, and caller may retry with a smaller request
    zero: success; at least as many interrupts allocated as requested

    It is error-prone to handle these three cases correctly in drivers.

    The new functions return either a negative error code or a number of
    successfully allocated MSI/MSI-X interrupts, which is expected to lead to
    clearer device driver code.

    pci_enable_msi(), pci_enable_msi_block() and pci_enable_msix() still exist
    unchanged, but are deprecated and may be removed after callers are updated.

    [bhelgaas: tweak changelog]
    Suggested-by: Ben Hutchings
    Signed-off-by: Alexander Gordeev
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Tejun Heo

    Alexander Gordeev
     
  • This creates an MSI-X counterpart for pci_msi_vec_count(). Device drivers
    can use this function to obtain maximum number of MSI-X interrupts the
    device supports and use that number in a subsequent call to
    pci_enable_msix().

    pci_msix_vec_count() supersedes pci_msix_table_size() and returns a
    negative errno if device does not support MSI-X interrupts. After this
    update, callers must always check the returned value.

    The only user of pci_msix_table_size() was the PCI-Express port driver,
    which is also updated by this change.

    Signed-off-by: Alexander Gordeev
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Tejun Heo

    Alexander Gordeev
     
  • The new pci_msi_vec_count() interface makes pci_enable_msi_block_auto()
    superfluous.

    Drivers can use pci_msi_vec_count() to learn the maximum number of MSIs
    supported by the device, and then call pci_enable_msi_block().

    pci_enable_msi_block_auto() was introduced recently, and its only user is
    the AHCI driver, which is also updated by this change.

    Signed-off-by: Alexander Gordeev
    Signed-off-by: Bjorn Helgaas
    Acked-by: Tejun Heo

    Alexander Gordeev
     
  • Device drivers can use this interface to obtain the maximum number of MSI
    interrupts the device supports and use that number, e.g., in a subsequent
    call to pci_enable_msi_block().

    Signed-off-by: Alexander Gordeev
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Tejun Heo

    Alexander Gordeev
     

21 Dec, 2013

2 commits


14 Dec, 2013

1 commit

  • Prefer use of the direct definition of struct pci_device_id instead of
    indirection via macro DEFINE_PCI_DEVICE_TABLE.

    Update the PCI documentation to deprecate DEFINE_PCI_DEVICE_TABLE. Update
    checkpatch adding --fix option.

    Signed-off-by: Joe Perches
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Jingoo Han

    Joe Perches
     

26 Sep, 2013

1 commit


25 Jan, 2013

1 commit

  • The new function pci_enable_msi_block_auto() tries to allocate
    maximum possible number of MSIs up to the number the device
    supports. It generalizes a pattern when pci_enable_msi_block()
    is contiguously called until it succeeds or fails.

    Opposite to pci_enable_msi_block() which takes the number of
    MSIs to allocate as a input parameter,
    pci_enable_msi_block_auto() could be used by device drivers to
    obtain the number of assigned MSIs and the number of MSIs the
    device supports.

    Signed-off-by: Alexander Gordeev
    Acked-by: Bjorn Helgaas
    Cc: Suresh Siddha
    Cc: Yinghai Lu
    Cc: Matthew Wilcox
    Cc: Jeff Garzik
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/c3de2419df94a0f95ca1a6f755afc421486455e6.1353324359.git.agordeev@redhat.com
    Signed-off-by: Ingo Molnar

    Alexander Gordeev
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from the kernel documentation.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 Nov, 2012

1 commit


28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

03 Aug, 2011

7 commits