Displaying 20 results from an estimated 49 matches for "msi_list".
2014 Jul 26
0
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...eak arch_setup_msi_irqs(struct msi_irqs *msi, int nvec, int type)
{
struct msi_desc *entry;
int ret;
@@ -78,8 +80,8 @@ int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
if (type == MSI_TYPE && nvec > 1)
return 1;
- list_for_each_entry(entry, &dev->msi_list, list) {
- ret = arch_setup_msi_irq(dev, entry);
+ list_for_each_entry(entry, &msi->msi_list, list) {
+ ret = arch_setup_msi_irq(msi, entry);
if (ret < 0)
return ret;
if (ret > 0)
@@ -93,11 +95,11 @@ int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
..., int nvec, int type)
> {
> struct msi_desc *entry;
> int ret;
> @@ -78,8 +80,8 @@ int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec,
> int type)
> if (type == MSI_TYPE && nvec > 1)
> return 1;
>
> - list_for_each_entry(entry, &dev->msi_list, list) {
> - ret = arch_setup_msi_irq(dev, entry);
> + list_for_each_entry(entry, &msi->msi_list, list) {
> + ret = arch_setup_msi_irq(msi, entry);
> if (ret < 0)
> return ret;
> if (ret > 0)
> @@ -93,11 +95,11 @@ int __weak arch_setup_msi_irqs(struct p...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
..., int nvec, int type)
> {
> struct msi_desc *entry;
> int ret;
> @@ -78,8 +80,8 @@ int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec,
> int type)
> if (type == MSI_TYPE && nvec > 1)
> return 1;
>
> - list_for_each_entry(entry, &dev->msi_list, list) {
> - ret = arch_setup_msi_irq(dev, entry);
> + list_for_each_entry(entry, &msi->msi_list, list) {
> + ret = arch_setup_msi_irq(msi, entry);
> if (ret < 0)
> return ret;
> if (ret > 0)
> @@ -93,11 +95,11 @@ int __weak arch_setup_msi_irqs(struct p...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...t msi_desc *entry;
> + int ret;
> +
> + /*
> + * If an architecture wants to support multiple MSI, it needs to
> + * override arch_setup_msi_irqs()
> + */
> + if (type == MSI_TYPE && nvec > 1)
> + return 1;
> +
> + list_for_each_entry(entry, &msi->msi_list, list) {
> + ret = arch_setup_msi_irq(msi, entry);
> + if (ret < 0)
> + return ret;
> + if (ret > 0)
> + return -ENOSPC;
> + }
> + return 0;
> +}
> +
> +
> +void __weak arch_teardown_msi_irqs(struct msi_irqs *msi)
> +{
> + return default_teardown_...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...t msi_desc *entry;
> + int ret;
> +
> + /*
> + * If an architecture wants to support multiple MSI, it needs to
> + * override arch_setup_msi_irqs()
> + */
> + if (type == MSI_TYPE && nvec > 1)
> + return 1;
> +
> + list_for_each_entry(entry, &msi->msi_list, list) {
> + ret = arch_setup_msi_irq(msi, entry);
> + if (ret < 0)
> + return ret;
> + if (ret > 0)
> + return -ENOSPC;
> + }
> + return 0;
> +}
> +
> +
> +void __weak arch_teardown_msi_irqs(struct msi_irqs *msi)
> +{
> + return default_teardown_...
2014 Jul 26
0
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...ruct msi_irqs *msi, int nvec, int type)
+{
+ struct msi_desc *entry;
+ int ret;
+
+ /*
+ * If an architecture wants to support multiple MSI, it needs to
+ * override arch_setup_msi_irqs()
+ */
+ if (type == MSI_TYPE && nvec > 1)
+ return 1;
+
+ list_for_each_entry(entry, &msi->msi_list, list) {
+ ret = arch_setup_msi_irq(msi, entry);
+ if (ret < 0)
+ return ret;
+ if (ret > 0)
+ return -ENOSPC;
+ }
+ return 0;
+}
+
+
+void __weak arch_teardown_msi_irqs(struct msi_irqs *msi)
+{
+ return default_teardown_msi_irqs(msi);
+}
+
+/*
+ * We have a default implementation avai...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...I-X. And new non-PCI device will be designed to
support MSI in future. So make the MSI driver code be generic will
help the non-PCI device use MSI more simply.
The new data struct for generic MSI driver.
struct msi_irqs {
u8 msi_enabled:1; /* Enable flag */
u8 msix_enabled:1;
struct list_head msi_list; /* MSI desc list */
void *data; /* help to find the MSI device */
struct msi_ops *ops; /* MSI device specific hook */
};
struct msi_irqs is used to manage MSI related informations. Every device supports
MSI should contain this data struct and allocate it.
struct msi_ops {
struct msi_desc *(*ms...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...I-X. And new non-PCI device will be designed to
support MSI in future. So make the MSI driver code be generic will
help the non-PCI device use MSI more simply.
The new data struct for generic MSI driver.
struct msi_irqs {
u8 msi_enabled:1; /* Enable flag */
u8 msix_enabled:1;
struct list_head msi_list; /* MSI desc list */
void *data; /* help to find the MSI device */
struct msi_ops *ops; /* MSI device specific hook */
};
struct msi_irqs is used to manage MSI related informations. Every device supports
MSI should contain this data struct and allocate it.
struct msi_ops {
struct msi_desc *(*ms...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...irq;
> - int node, ret;
> + int ret;
>
> /* Multiple MSI vectors only supported with interrupt remapping */
> if (type == MSI_TYPE && nvec > 1)
> return 1;
>
> - node = dev_to_node(&dev->dev);
> -
> - list_for_each_entry(msidesc, &dev->msi_list, list) {
> - irq = irq_alloc_hwirq(node);
> + list_for_each_entry(msidesc, &msi->msi_list, list) {
> + irq = irq_alloc_hwirq(msi->node);
> if (!irq)
> return -ENOSPC;
>
> - ret = setup_msi_irq(dev, msidesc, irq, 0);
> + ret = setup_msi_irq(msi, msidesc,...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...irq;
> - int node, ret;
> + int ret;
>
> /* Multiple MSI vectors only supported with interrupt remapping */
> if (type == MSI_TYPE && nvec > 1)
> return 1;
>
> - node = dev_to_node(&dev->dev);
> -
> - list_for_each_entry(msidesc, &dev->msi_list, list) {
> - irq = irq_alloc_hwirq(node);
> + list_for_each_entry(msidesc, &msi->msi_list, list) {
> + irq = irq_alloc_hwirq(msi->node);
> if (!irq)
> return -ENOSPC;
>
> - ret = setup_msi_irq(dev, msidesc, irq, 0);
> + ret = setup_msi_irq(msi, msidesc,...
2014 Jul 26
0
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...)
{
struct msi_desc *msidesc;
unsigned int irq;
- int node, ret;
+ int ret;
/* Multiple MSI vectors only supported with interrupt remapping */
if (type == MSI_TYPE && nvec > 1)
return 1;
- node = dev_to_node(&dev->dev);
-
- list_for_each_entry(msidesc, &dev->msi_list, list) {
- irq = irq_alloc_hwirq(node);
+ list_for_each_entry(msidesc, &msi->msi_list, list) {
+ irq = irq_alloc_hwirq(msi->node);
if (!irq)
return -ENOSPC;
- ret = setup_msi_irq(dev, msidesc, irq, 0);
+ ret = setup_msi_irq(msi, msidesc, irq, 0);
if (ret < 0) {
irq_...
2013 Aug 30
3
[PATCH v7] interrupts: allow guest to set/clear MSI-X mask bit
...xen/arch/x86/hvm/vmsi.c
+++ b/xen/arch/x86/hvm/vmsi.c
@@ -187,6 +187,19 @@ static struct msixtbl_entry *msixtbl_find_entry(
return NULL;
}
+static struct msi_desc *virt_to_msi_desc(struct pci_dev *dev, void *virt)
+{
+ struct msi_desc *desc;
+
+ list_for_each_entry( desc, &dev->msi_list, list )
+ if ( desc->msi_attrib.type == PCI_CAP_ID_MSIX &&
+ desc->mask_base + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET
+ == virt )
+ return desc;
+
+ return NULL;
+}
+
static void __iomem *msixtbl_addr_to_virt(
struct msixtbl_entry *en...
2014 Jul 30
4
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...MSI driver code be generic will
>> help the non-PCI device use MSI more simply.
>>
>> The new data struct for generic MSI driver.
>> struct msi_irqs {
>> u8 msi_enabled:1; /* Enable flag */
>> u8 msix_enabled:1;
>> struct list_head msi_list; /* MSI desc list */
>> void *data; /* help to find the MSI device */
>> struct msi_ops *ops; /* MSI device specific hook */
>> };
>> struct msi_irqs is used to manage MSI related informations. Every device supports
>> MSI should contain this data s...
2014 Jul 30
4
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...MSI driver code be generic will
>> help the non-PCI device use MSI more simply.
>>
>> The new data struct for generic MSI driver.
>> struct msi_irqs {
>> u8 msi_enabled:1; /* Enable flag */
>> u8 msix_enabled:1;
>> struct list_head msi_list; /* MSI desc list */
>> void *data; /* help to find the MSI device */
>> struct msi_ops *ops; /* MSI device specific hook */
>> };
>> struct msi_irqs is used to manage MSI related informations. Every device supports
>> MSI should contain this data s...
2013 Aug 29
6
[PATCH 2/3 v3] Refactor MSI restore call-chain to drop unnecessary argument
...p;= ~PCI_MSI_FLAGS_QSIZE;
control |= (entry->msi_attrib.multiple << 4) | PCI_MSI_FLAGS_ENABLE;
pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, control);
@@ -430,7 +442,6 @@ static void __pci_restore_msix_state(struct pci_dev *dev)
list_for_each_entry(entry, &dev->msi_list, list) {
arch_restore_msi_irqs(dev, entry->irq);
- msix_mask_irq(entry, entry->masked);
}
control &= ~PCI_MSIX_FLAGS_MASKALL;
--
1.7.3
2014 Jul 26
0
[RFC PATCH 01/11] PCI/MSI: Use pci_dev->msi_cap instead of msi_desc->msi_attrib.pos
...*dev, void __iomem *base,
entry->msi_attrib.is_64 = 1;
entry->msi_attrib.entry_nr = entries[i].entry;
entry->msi_attrib.default_irq = dev->irq;
- entry->msi_attrib.pos = dev->msix_cap;
entry->mask_base = base;
list_add_tail(&entry->list, &dev->msi_list);
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 8103f32..ce88c5b 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -29,7 +29,6 @@ struct msi_desc {
__u8 multi_cap : 3; /* log2 num of messages supported */
__u8 maskbit : 1; /* mask-pending bit supported ? */
__u8...
2014 Jul 29
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...MSI in future. So make the MSI driver code be generic will
> help the non-PCI device use MSI more simply.
>
> The new data struct for generic MSI driver.
> struct msi_irqs {
> u8 msi_enabled:1; /* Enable flag */
> u8 msix_enabled:1;
> struct list_head msi_list; /* MSI desc list */
> void *data; /* help to find the MSI device */
> struct msi_ops *ops; /* MSI device specific hook */
> };
> struct msi_irqs is used to manage MSI related informations. Every device supports
> MSI should contain this data struct and allocate i...
2014 Aug 01
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...> On Saturday 26 July 2014 11:08:37 Yijing Wang wrote:
> >>
> >> The new data struct for generic MSI driver.
> >> struct msi_irqs {
> >> u8 msi_enabled:1; /* Enable flag */
> >> u8 msix_enabled:1;
> >> struct list_head msi_list; /* MSI desc list */
> >> void *data; /* help to find the MSI device */
> >> struct msi_ops *ops; /* MSI device specific hook */
> >> };
> >> struct msi_irqs is used to manage MSI related informations. Every device supports
> >> MSI s...
2014 Jul 30
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...the non-PCI device use MSI more simply.
>>>>
>>>> The new data struct for generic MSI driver.
>>>> struct msi_irqs {
>>>> u8 msi_enabled:1; /* Enable flag */
>>>> u8 msix_enabled:1;
>>>> struct list_head msi_list; /* MSI desc list */
>>>> void *data; /* help to find the MSI device */
>>>> struct msi_ops *ops; /* MSI device specific hook */
>>>> };
>>>> struct msi_irqs is used to manage MSI related informations. Every device supports
>>...
2012 Nov 05
25
[PATCH] IOMMU: don't disable bus mastering on faults for devices used by Xen or Dom0
Under the assumption that in these cases recurring faults aren''t a
security issue and it can be expected that the drivers there are going
to try to take care of the problem.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -625,6 +625,18 @@ static void parse_event_log_entry(struct