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 -
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
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
...
10 Apr, 2015
1 commit
-
Clarify pci.txt so it matches the "do not add new entries unless they are
shared between multiple drivers" comment in include/linux/pci_ids.h.[bhelgaas: changelog, strengthen language]
Signed-off-by: Michael S. Tsirkin
Signed-off-by: Bjorn Helgaas
20 Mar, 2015
2 commits
-
This patch fix spelling typo in Documentation/PCI.
Signed-off-by: Masanari Iida
Signed-off-by: Jonathan Corbet -
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
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
3and 108 lines with "practice"
~/linux/Documentation$ grep -r practice * | wc -l
108this patch converts "practise" to "practice".
Signed-off-by: Jeremiah Mahler
Signed-off-by: Jiri Kosina
21 Feb, 2014
1 commit
-
* pci/dead-code:
PCI: Remove unused SR-IOV VF Migration support
iommu/amd: Add include of
mei: Add include of
misc: mic: Add include of
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
14 Feb, 2014
2 commits
-
The new functions are special cases for pci_enable_msi_range() and
pci_enable_msix_range() when a particular number of MSI or MSI-X
is needed.By contrast with pci_enable_msi_range() and pci_enable_msix_range()
functions, pci_enable_msi_exact() and pci_enable_msix_exact()
return zero in case of success, which indicates MSI or MSI-X
interrupts have been successfully allocated.Signed-off-by: Alexander Gordeev
Signed-off-by: Bjorn Helgaas -
Function pci_enable_msi_range() is used in examples where
pci_enable_msix_range() should have been used instead.Reported-by: Bjorn Helgaas
Signed-off-by: Alexander Gordeev
Signed-off-by: Bjorn Helgaas
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
08 Jan, 2014
3 commits
-
* pci/msi:
PCI/MSI: Add pci_enable_msi_range() and pci_enable_msix_range()
PCI/MSI: Add pci_msix_vec_count()
PCI/MSI: Remove pci_enable_msi_block_auto()
PCI/MSI: Add pci_msi_vec_count() -
* pci/misc:
PCI: Update documentation 00-INDEX file
PCI: Convert ioapic to be builtin only, not modular -
The PCI-DMA-mapping.txt moved to general docs and became DMA-API-HOWTO.txt
in 5e07c2c7301b ("Documentation: rename PCI/PCI-DMA-mapping.txt to
DMA-API-HOWTO.txt"). Add new file about PCI Express I/O Virtualization.Signed-off-by: Erik Ekman
Signed-off-by: Bjorn Helgaas
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 requestedIt 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 -
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 -
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 -
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
21 Dec, 2013
2 commits
-
* pci/misc:
PCI/checkpatch: Deprecate DEFINE_PCI_DEVICE_TABLE -
Make pci_enable_msi_block(), pci_enable_msi_block_auto() and
pci_enable_msix() consistent with regard to the type of 'nvec' argument.Signed-off-by: Alexander Gordeev
Signed-off-by: Bjorn Helgaas
Reviewed-by: Tejun Heo
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
26 Sep, 2013
1 commit
-
pci_find_slot() has been removed from the kernel. Document its
closest replacement, pci_get_domain_bus_and_slot(), instead.[bhelgaas: fix indentation, keep mention in "obsolete" section]
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
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
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
29 Nov, 2012
1 commit
-
Add documentation of new sysfs files and new pci_driver SRIOV
configuration interface.[bhelgaas: changelog]
Signed-off: Donald Dutile
Signed-off-by: Bjorn Helgaas
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
03 Aug, 2011
13 commits
-
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
... as per Randy Dunlap's wishes :-P
Message-Id:Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap -
Signed-off-by: Michael Witten
Acked-by: Matthew Wilcox
Signed-off-by: Randy Dunlap