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

11 commits