An error occurred fetching the project authors.
- 23 Nov, 2014 3 commits
-
-
Jiang Liu authored
It is the repsonsibility of arch_setup_msi_irq()/arch_setup_msi_irqs() to call irq_set_msi_desc() to associate IRQ descriptors and MSI descriptors. Kill the redundant call of irq_set_msi_desc() for MSI-X interrupts in the PCI MSI core. Signed-off-by:
Jiang Liu <jiang.liu@linux.intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Yingjoe Chen <yingjoe.chen@mediatek.com> Cc: Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
Jiang Liu authored
Simplify PCI MSI code by initializing msi_desc.nvec_used and msi_desc.msi_attrib.multiple when creating MSI descriptors. Also remove redundant checks in IRQ remapping drivers, PCI MSI core already guarantees these. Signed-off-by:
Jiang Liu <jiang.liu@linux.intel.com> Acked-by:
Bjorn Helgaas <bhelgaas@google.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Yingjoe Chen <yingjoe.chen@mediatek.com> Cc: Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
Jiang Liu authored
Per Documentation/CodingStyle, don't use braces around single statements. Signed-off-by:
Jiang Liu <jiang.liu@linux.intel.com> Acked-by:
Bjorn Helgaas <bhelgaas@google.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Yingjoe Chen <yingjoe.chen@mediatek.com> Cc: Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
- 12 Nov, 2014 2 commits
-
-
Yijing Wang authored
Add pcibios_msi_controller() to get the msi_controller associated with a PCI device. This is to allow arches to store the msi_controller in the arch-specific PCI sysdata. [bhelgaas: changelog, take pci_dev instead of pci_bus] Suggested-by:
Bjorn Helgaas <bhelgaas@google.com> Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
"msi_chip" isn't very descriptive, so rename it to "msi_controller". That tells a little more about what it does and is already used in device tree bindings. No functional change. [bhelgaas: changelog, change *only* the struct name so it's reviewable] Suggested-by:
Bjorn Helgaas <bhelgaas@google.com> Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 11 Nov, 2014 1 commit
-
-
Yijing Wang authored
The problem fixed by 0e4ccb15 ("PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()") has been fixed in a simpler way by a previous commit ("PCI/MSI: Add pci_msi_ignore_mask to prevent writes to MSI/MSI-X Mask Bits"). The msi_mask_irq() and msix_mask_irq() x86_msi_ops added by 0e4ccb15 are no longer needed, so revert the commit. default_msi_mask_irq() and default_msix_mask_irq() were added by 0e4ccb15 and are still used by s390, so keep them for now. [bhelgaas: changelog] Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Acked-by:
David Vrabel <david.vrabel@citrix.com> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> CC: xen-devel@lists.xenproject.org
-
- 06 Nov, 2014 1 commit
-
-
Yijing Wang authored
MSI-X vector Mask Bits are in MSI-X Tables in PCI memory space. Xen PV guests can't write to those tables. MSI vector Mask Bits are in PCI configuration space. Xen PV guests can write to config space, but those writes are ignored. Commit 0e4ccb15 ("PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()") added a way to override default_mask_msi_irqs() and default_mask_msix_irqs() so they can be no-ops in Xen guests, but this is more complicated than necessary. Add "pci_msi_ignore_mask" in the core PCI MSI code. If set, default_mask_msi_irqs() and default_mask_msix_irqs() return without doing anything. This is less flexible, but much simpler. [bhelgaas: changelog] Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
David Vrabel <david.vrabel@citrix.com> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> CC: xen-devel@lists.xenproject.org
-
- 01 Oct, 2014 7 commits
-
-
Bjorn Helgaas authored
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 <bhelgaas@google.com>
-
Yijing Wang authored
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 <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
"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 <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
After commit 1c51b50c ("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: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects") Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alexander Gordeev authored
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 <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Alexander Gordeev authored
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 <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Alexander Gordeev authored
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 <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 29 Sep, 2014 1 commit
-
-
Gavin Shan authored
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 <gwshan@linux.vnet.ibm.com> Acked-by:
Bjorn Helgaas <bhelgaas@google.com> Signed-off-by:
Alex Williamson <alex.williamson@redhat.com>
-
- 16 Jul, 2014 5 commits
-
-
Yijing Wang authored
Use irq_get_msi_desc() to get MSI IRQ related msi_desc directly instead of searching the dev->msi_list. Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
In __pci_restore_msix_state(), we get the first element from msi_list, but we never use it. Remove this useless code. Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
Retrieve the first MSI IRQ to compute the MSI index from struct msi_desc rather than the struct pci_dev to avoid an additional memory access. Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
msi_remove_pci_irq_vectors() is unused, so remove it. Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
Move MSI entry stuff to a new function, msi_setup_entry(), to simplify msi_capability_init() as MSI-X does. Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 03 Jul, 2014 3 commits
-
-
Yijing Wang authored
The Multiple Message Capable field in the MSI Message Control register indicates how many vectors the device supports. This field is read-only, so cache it in msi_desc to avoid reading it repeatedly. Since we cache the extracted field (not the entire Message Control register), we can use msi_mask() instead of msi_capable_mask(), which is then unused, so remove it. [bhelgaas: fix whitespace, changelog] Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
No one uses msi_enabled_mask(); remove the dead code. No functional change. Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yijing Wang authored
Add msix_clear_and_set_ctrl() simplify code. No functional change. [bhelgaas: fix whitespace] Signed-off-by:
Yijing Wang <wangyijing@huawei.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 11 Jun, 2014 2 commits
-
-
Alexei Starovoitov authored
free_msi_irqs() is leaking memory, since list_for_each_entry(entry, &dev->msi_list, list) {...} is never executed, because dev->msi_list is made empty by the loop just above this one. Fix it by relying on zero termination of attribute array like populate_msi_sysfs() does. Fixes: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects") Signed-off-by:
Alexei Starovoitov <ast@plumgrid.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Acked-by:
Neil Horman <nhorman@tuxdriver.com> Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> CC: stable@vger.kernel.org # v3.14+
-
Ryan Desfosses authored
Merge quoted strings that are broken across lines into a single entity. The compiler merges them anyway, but checkpatch complains about it, and merging them makes it easier to grep for strings. No functional change. [bhelgaas: changelog, do the same for everything under drivers/pci] Signed-off-by:
Ryan Desfosses <ryan@desfo.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 30 Apr, 2014 1 commit
-
-
Alexander Gordeev authored
There are no users of pci_enable_msi_block() function left. Obsolete it in favor of pci_enable_msi_range() and pci_enable_msi_exact() functions. Previously, we called arch_setup_msi_irqs() once, requesting the same vector count we passed to arch_msi_check_device(). Now we may call it several times: if it returns failure, we may retry and request fewer vectors. We don't keep track of the vector count we initially passed to arch_msi_check_device(). We only keep track of the number of vectors successfully set up by arch_setup_msi_irqs(), and this is what we use to clean things up when disabling MSI. Therefore, we assume that arch_msi_check_device() does nothing that will have to be cleaned up later. [bhelgaas: changelog] Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 14 Apr, 2014 2 commits
-
-
Paul Gortmaker authored
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Jan Beulich authored
Simplify populate_msi_sysfs() by - Swapping the order of the two allocations and storing the msi_dev_attr-derived pointer right after allocation, allowing the cleanup code to pick things up without extra effort. - Using kasprintf() instead of the kmalloc()/sprintf() pair. Signed-off-by:
Jan Beulich <jbeulich@suse.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 13 Feb, 2014 3 commits
-
-
Masanari Iida authored
An empty line in msi.c caused "make htmldocs" failure: Warning(/home/iida/Repo/linux-next//drivers/pci/msi.c:962): bad line: Fixes: ff1aa430 ("PCI/MSI: Add pci_msix_vec_count()") Signed-off-by:
Masanari Iida <standby24x7@gmail.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Greg Kroah-Hartman authored
Coverity reported that I forgot to clean up some allocated memory on the error path in populate_msi_sysfs(), so this patch fixes that. Thanks to Dave Jones for pointing out where the error was, I obviously can't read code this morning... Found by Coverity (CID 1163317). Fixes: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects") Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Cc: Dave Jones <davej@redhat.com>
-
Greg Kroah-Hartman authored
Coverity reported that I forgot to check the return value of kmalloc() when creating the MSI attribute name, so fix that up and properly free it if there is an error when allocating the msi_dev_attr variable. Found by Coverity (CID 1163315 and 1163316e). Fixes: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects") Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 04 Feb, 2014 3 commits
-
-
Masanari Iida authored
An empty line in msi.c caused "make htmldocs" failure: Warning(/home/iida/Repo/linux-next//drivers/pci/msi.c:962): bad line: Fixes: ff1aa430 ("PCI/MSI: Add pci_msix_vec_count()") Signed-off-by:
Masanari Iida <standby24x7@gmail.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Greg Kroah-Hartman authored
Coverity reported that I forgot to clean up some allocated memory on the error path in populate_msi_sysfs(), so this patch fixes that. Thanks to Dave Jones for pointing out where the error was, I obviously can't read code this morning... Found by Coverity (CID 1163317). Fixes: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects") Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Cc: Dave Jones <davej@redhat.com>
-
Greg Kroah-Hartman authored
Coverity reported that I forgot to check the return value of kmalloc() when creating the MSI attribute name, so fix that up and properly free it if there is an error when allocating the msi_dev_attr variable. Found by Coverity (CID 1163315 and 1163316e). Fixes: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects") Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 04 Jan, 2014 4 commits
-
-
Alexander Gordeev authored
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 <bhutchings@solarflare.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Tejun Heo <tj@kernel.org>
-
Alexander Gordeev authored
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 <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Tejun Heo <tj@kernel.org>
-
Alexander Gordeev authored
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 <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Acked-by:
Tejun Heo <tj@kernel.org>
-
Alexander Gordeev authored
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 <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Tejun Heo <tj@kernel.org>
-
- 20 Dec, 2013 2 commits
-
-
Alexander Gordeev authored
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 <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Tejun Heo <tj@kernel.org>
-
Alexander Gordeev authored
If populate_msi_sysfs() function failed msix_capability_init() must return the error code, but it returns the success instead. This update fixes the described misbehaviour. Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Tejun Heo <tj@kernel.org>
-