search for: msi_desc

Displaying 20 results from an estimated 52 matches for "msi_desc".

2011 Sep 20
0
[PATCH 4/4] x86: split MSI IRQ chip
...mp;msg); hpet_msi_write(desc->action->dev_id, &msg); } --- a/xen/arch/x86/hvm/vmsi.c +++ b/xen/arch/x86/hvm/vmsi.c @@ -382,7 +382,7 @@ int msixtbl_pt_register(struct domain *d return r; } - if ( irq_desc->handler != &pci_msi_type ) + if ( !irq_desc->msi_desc ) goto out; msi_desc = irq_desc->msi_desc; @@ -426,7 +426,7 @@ void msixtbl_pt_unregister(struct domain if ( !irq_desc ) return; - if ( irq_desc->handler != &pci_msi_type ) + if ( !irq_desc->msi_desc ) goto out; msi_desc = irq_desc-...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...t;linux/smp.h> > +#include <linux/errno.h> > +#include <linux/io.h> > +#include <linux/slab.h> > +#include <linux/device.h> > +#include <linux/pci.h> > + > +/* Arch hooks */ > + > +int __weak arch_setup_msi_irq(struct msi_irqs *msi, struct msi_desc *desc) > +{ > + struct pci_dev *dev = msi->data; > + struct msi_chip *chip = dev->bus->msi; //TO BE DONE: rework msi_chip to > support Non-PCI MSI > + int err; > + > + if (!chip || !chip->setup_irq) > + return -EINVAL; > + > + err = chip->setup_irq(chip...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...t;linux/smp.h> > +#include <linux/errno.h> > +#include <linux/io.h> > +#include <linux/slab.h> > +#include <linux/device.h> > +#include <linux/pci.h> > + > +/* Arch hooks */ > + > +int __weak arch_setup_msi_irq(struct msi_irqs *msi, struct msi_desc *desc) > +{ > + struct pci_dev *dev = msi->data; > + struct msi_chip *chip = dev->bus->msi; //TO BE DONE: rework msi_chip to > support Non-PCI MSI > + int err; > + > + if (!chip || !chip->setup_irq) > + return -EINVAL; > + > + err = chip->setup_irq(chip...
2014 Jul 26
0
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...t; +#include <linux/msi.h> +#include <linux/smp.h> +#include <linux/errno.h> +#include <linux/io.h> +#include <linux/slab.h> +#include <linux/device.h> +#include <linux/pci.h> + +/* Arch hooks */ + +int __weak arch_setup_msi_irq(struct msi_irqs *msi, struct msi_desc *desc) +{ + struct pci_dev *dev = msi->data; + struct msi_chip *chip = dev->bus->msi; //TO BE DONE: rework msi_chip to support Non-PCI MSI + int err; + + if (!chip || !chip->setup_irq) + return -EINVAL; + + err = chip->setup_irq(chip, dev, desc); + if (err < 0) + return err; + +...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
..._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 *(*msi_setup_entry)(struct msi_irqs *msi, struct msi_desc *entry); int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries); u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag); void (*msi_read_message)(struct msi...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
..._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 *(*msi_setup_entry)(struct msi_irqs *msi, struct msi_desc *entry); int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries); u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag); void (*msi_read_message)(struct msi...
2013 Aug 30
3
[PATCH v7] interrupts: allow guest to set/clear MSI-X mask bit
...d the reserved bits while updating MSI-X control vector (only 1 bit is defined) v3: Allow guest writes only when Xen view of MSI-X control bit is 0 v4: Added a warning if Xen thinks MSI-X control bit is masked, where in reality, it''s not v5 & v6: Added const-correctness v7: Get msi_desc from the guest write ''address'' Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com> --- xen/arch/x86/hvm/vmsi.c | 73 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 12 deletions(-) diff --git a/xen/arch/x86/hvm/vmsi.c b/xen/arch/x86...
2014 Jul 26
0
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...ed, 222 insertions(+), 154 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 41c33da..f0c5989 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -29,8 +29,9 @@ static int pci_msi_enable = 1; /* Arch hooks */ -int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) +int __weak arch_setup_msi_irq(struct msi_irqs *msi, struct msi_desc *desc) { + struct pci_dev *dev = msi->data; //TO BE DONE: rework msi_chip to support Non-PCI struct msi_chip *chip = dev->bus->msi; int err; @@ -56,8 +57,9 @@ void __weak arch_teardown_msi_irq(unsigned int i...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...t; diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c > index 41c33da..f0c5989 100644 > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -29,8 +29,9 @@ static int pci_msi_enable = 1; > > /* Arch hooks */ > > -int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) > +int __weak arch_setup_msi_irq(struct msi_irqs *msi, struct msi_desc *desc) > { > + struct pci_dev *dev = msi->data; //TO BE DONE: rework msi_chip to support > Non-PCI > struct msi_chip *chip = dev->bus->msi; > int err; > > @@ -56,8 +57,9 @@ void __we...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...t; diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c > index 41c33da..f0c5989 100644 > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -29,8 +29,9 @@ static int pci_msi_enable = 1; > > /* Arch hooks */ > > -int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) > +int __weak arch_setup_msi_irq(struct msi_irqs *msi, struct msi_desc *desc) > { > + struct pci_dev *dev = msi->data; //TO BE DONE: rework msi_chip to support > Non-PCI > struct msi_chip *chip = dev->bus->msi; > int err; > > @@ -56,8 +57,9 @@ void __we...
2014 Jul 26
0
[RFC PATCH 01/11] PCI/MSI: Use pci_dev->msi_cap instead of msi_desc->msi_attrib.pos
...| 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c index ab0c5d1..6a6a99f 100644 --- a/arch/mips/pci/msi-octeon.c +++ b/arch/mips/pci/msi-octeon.c @@ -73,7 +73,7 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) * wants. Most devices only want 1, which will give * configured_private_bits and request_private_bits equal 0. */ - pci_read_config_word(dev, desc->msi_attrib.pos + PCI_MSI_FLAGS, + pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &control); /* @@ -176...
2014 Jul 29
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...39;struct irq_desc'. Note that there are long-term plans to get rid of IRQ numbers entirely, but those plans have existed for a long time already without anybody seriously addressing the device driver interfaces so far, so it might never really happen. > struct msi_ops { > struct msi_desc *(*msi_setup_entry)(struct msi_irqs *msi, struct msi_desc *entry); > int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries); > u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); > u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);...
2014 Jul 30
4
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...me already without anybody seriously addressing the device > driver interfaces so far, so it might never really happen. > Maybe this is a huge work, now hundreds drivers use the IRQ number, so maybe we can consider this in a separate title. >> struct msi_ops { >> struct msi_desc *(*msi_setup_entry)(struct msi_irqs *msi, struct msi_desc *entry); >> int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries); >> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); >> u32 (*msix_mask_irq)(struct msi_desc *desc,...
2014 Jul 30
4
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...me already without anybody seriously addressing the device > driver interfaces so far, so it might never really happen. > Maybe this is a huge work, now hundreds drivers use the IRQ number, so maybe we can consider this in a separate title. >> struct msi_ops { >> struct msi_desc *(*msi_setup_entry)(struct msi_irqs *msi, struct msi_desc *entry); >> int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries); >> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); >> u32 (*msix_mask_irq)(struct msi_desc *desc,...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...h b/arch/x86/include/asm/pci.h > index 0892ea0..04c9ef6 100644 > --- a/arch/x86/include/asm/pci.h > +++ b/arch/x86/include/asm/pci.h > @@ -96,10 +96,10 @@ extern void pci_iommu_alloc(void); > #ifdef CONFIG_PCI_MSI > /* implemented in arch/x86/kernel/apic/io_apic. */ > struct msi_desc; > -int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); > +int native_setup_msi_irqs(struct msi_irqs *msi, int nvec, int type); > void native_teardown_msi_irq(unsigned int irq); > -void native_restore_msi_irqs(struct pci_dev *dev); > -int setup_msi_irq(struct pci_dev...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...h b/arch/x86/include/asm/pci.h > index 0892ea0..04c9ef6 100644 > --- a/arch/x86/include/asm/pci.h > +++ b/arch/x86/include/asm/pci.h > @@ -96,10 +96,10 @@ extern void pci_iommu_alloc(void); > #ifdef CONFIG_PCI_MSI > /* implemented in arch/x86/kernel/apic/io_apic. */ > struct msi_desc; > -int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); > +int native_setup_msi_irqs(struct msi_irqs *msi, int nvec, int type); > void native_teardown_msi_irq(unsigned int irq); > -void native_restore_msi_irqs(struct pci_dev *dev); > -int setup_msi_irq(struct pci_dev...
2014 Jul 30
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...t;> driver interfaces so far, so it might never really happen. >>> >> >> Maybe this is a huge work, now hundreds drivers use the IRQ number, so maybe we can consider >> this in a separate title. >> >>>> struct msi_ops { >>>> struct msi_desc *(*msi_setup_entry)(struct msi_irqs *msi, struct msi_desc *entry); >>>> int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries); >>>> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); >>>> u32 (*msix_mask_irq...
2014 Jul 26
0
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...f --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 0892ea0..04c9ef6 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -96,10 +96,10 @@ extern void pci_iommu_alloc(void); #ifdef CONFIG_PCI_MSI /* implemented in arch/x86/kernel/apic/io_apic. */ struct msi_desc; -int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); +int native_setup_msi_irqs(struct msi_irqs *msi, int nvec, int type); void native_teardown_msi_irq(unsigned int irq); -void native_restore_msi_irqs(struct pci_dev *dev); -int setup_msi_irq(struct pci_dev *dev, struct msi_desc *m...
2014 Jul 30
1
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...y addressing the device >> driver interfaces so far, so it might never really happen. >> > > Maybe this is a huge work, now hundreds drivers use the IRQ number, so maybe we can consider > this in a separate title. > >>> struct msi_ops { >>> struct msi_desc *(*msi_setup_entry)(struct msi_irqs *msi, struct msi_desc *entry); >>> int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries); >>> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); >>> u32 (*msix_mask_irq)(struct msi...
2014 Jul 30
1
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...y addressing the device >> driver interfaces so far, so it might never really happen. >> > > Maybe this is a huge work, now hundreds drivers use the IRQ number, so maybe we can consider > this in a separate title. > >>> struct msi_ops { >>> struct msi_desc *(*msi_setup_entry)(struct msi_irqs *msi, struct msi_desc *entry); >>> int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries); >>> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); >>> u32 (*msix_mask_irq)(struct msi...