Message ID | 9f3497a0f478f3ee7d4a16b9a4221d4377e5863d.1410078503.git.agordeev@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
+ free-electron's guys. On Sun, Sep 07, 2014 at 08:57:54PM +0200, Alexander Gordeev wrote: > Moving MSI checks from arch_msi_check_device() function to > arch_setup_msi_irqs() function makes code more compact and > allows removing unnecessary hook arch_msi_check_device() > from generic MSI code. > > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Jason Cooper <jason@lakedaemon.net> > Cc: linux-pci@vger.kernel.org > Signed-off-by: Alexander Gordeev <agordeev@redhat.com> > --- > drivers/irqchip/irq-armada-370-xp.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > > diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c > index 574aba0..df60eab 100644 > --- a/drivers/irqchip/irq-armada-370-xp.c > +++ b/drivers/irqchip/irq-armada-370-xp.c > @@ -136,6 +136,10 @@ static int armada_370_xp_setup_msi_irq(struct msi_chip *chip, > struct msi_msg msg; > int virq, hwirq; > > + /* We support MSI, but not MSI-X */ > + if (desc->msi_attrib.is_msix) > + return -EINVAL; > + > hwirq = armada_370_xp_alloc_msi(); > if (hwirq < 0) > return hwirq; > @@ -166,15 +170,6 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip, > armada_370_xp_free_msi(hwirq); > } > > -static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev, > - int nvec, int type) > -{ > - /* We support MSI, but not MSI-X */ > - if (type == PCI_CAP_ID_MSI) > - return 0; > - return -EINVAL; > -} > - > static struct irq_chip armada_370_xp_msi_irq_chip = { > .name = "armada_370_xp_msi_irq", > .irq_enable = unmask_msi_irq, > @@ -213,7 +208,6 @@ static int armada_370_xp_msi_init(struct device_node *node, > > msi_chip->setup_irq = armada_370_xp_setup_msi_irq; > msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq; > - msi_chip->check_device = armada_370_xp_check_msi_device; > msi_chip->of_node = node; > > armada_370_xp_msi_domain = > -- > 1.9.3 > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Sep 08, 2014 at 07:16:56AM -0400, Jason Cooper wrote: > + free-electron's guys. Hi Gentlemen, Any feedback on this patch? Thanks! > On Sun, Sep 07, 2014 at 08:57:54PM +0200, Alexander Gordeev wrote: > > Moving MSI checks from arch_msi_check_device() function to > > arch_setup_msi_irqs() function makes code more compact and > > allows removing unnecessary hook arch_msi_check_device() > > from generic MSI code. > > > > Cc: Thomas Gleixner <tglx@linutronix.de> > > Cc: Jason Cooper <jason@lakedaemon.net> > > Cc: linux-pci@vger.kernel.org > > Signed-off-by: Alexander Gordeev <agordeev@redhat.com> > > --- > > drivers/irqchip/irq-armada-370-xp.c | 14 ++++---------- > > 1 file changed, 4 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c > > index 574aba0..df60eab 100644 > > --- a/drivers/irqchip/irq-armada-370-xp.c > > +++ b/drivers/irqchip/irq-armada-370-xp.c > > @@ -136,6 +136,10 @@ static int armada_370_xp_setup_msi_irq(struct msi_chip *chip, > > struct msi_msg msg; > > int virq, hwirq; > > > > + /* We support MSI, but not MSI-X */ > > + if (desc->msi_attrib.is_msix) > > + return -EINVAL; > > + > > hwirq = armada_370_xp_alloc_msi(); > > if (hwirq < 0) > > return hwirq; > > @@ -166,15 +170,6 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip, > > armada_370_xp_free_msi(hwirq); > > } > > > > -static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev, > > - int nvec, int type) > > -{ > > - /* We support MSI, but not MSI-X */ > > - if (type == PCI_CAP_ID_MSI) > > - return 0; > > - return -EINVAL; > > -} > > - > > static struct irq_chip armada_370_xp_msi_irq_chip = { > > .name = "armada_370_xp_msi_irq", > > .irq_enable = unmask_msi_irq, > > @@ -213,7 +208,6 @@ static int armada_370_xp_msi_init(struct device_node *node, > > > > msi_chip->setup_irq = armada_370_xp_setup_msi_irq; > > msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq; > > - msi_chip->check_device = armada_370_xp_check_msi_device; > > msi_chip->of_node = node; > > > > armada_370_xp_msi_domain = > > -- > > 1.9.3 > >
Alexander, On Sun, Sep 07, 2014 at 08:57:54PM +0200, Alexander Gordeev wrote: > Moving MSI checks from arch_msi_check_device() function to > arch_setup_msi_irqs() function makes code more compact and > allows removing unnecessary hook arch_msi_check_device() > from generic MSI code. > > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Jason Cooper <jason@lakedaemon.net> > Cc: linux-pci@vger.kernel.org > Signed-off-by: Alexander Gordeev <agordeev@redhat.com> > --- > drivers/irqchip/irq-armada-370-xp.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) Now that ThomasP has had a chance to test, please adjust the subject line to 'irqchip: armada-370-xp: M...' and Acked-by: Jason Cooper <jason@lakedaemon.net> thx, Jason. -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Sep 17, 2014 at 11:55:54AM -0400, Jason Cooper wrote: > Now that ThomasP has had a chance to test, please adjust the subject > line to 'irqchip: armada-370-xp: M...' and Hi Bjorn, Do you want me to resend the patch? > Acked-by: Jason Cooper <jason@lakedaemon.net> > > thx, > > Jason.
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 574aba0..df60eab 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -136,6 +136,10 @@ static int armada_370_xp_setup_msi_irq(struct msi_chip *chip, struct msi_msg msg; int virq, hwirq; + /* We support MSI, but not MSI-X */ + if (desc->msi_attrib.is_msix) + return -EINVAL; + hwirq = armada_370_xp_alloc_msi(); if (hwirq < 0) return hwirq; @@ -166,15 +170,6 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip, armada_370_xp_free_msi(hwirq); } -static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev, - int nvec, int type) -{ - /* We support MSI, but not MSI-X */ - if (type == PCI_CAP_ID_MSI) - return 0; - return -EINVAL; -} - static struct irq_chip armada_370_xp_msi_irq_chip = { .name = "armada_370_xp_msi_irq", .irq_enable = unmask_msi_irq, @@ -213,7 +208,6 @@ static int armada_370_xp_msi_init(struct device_node *node, msi_chip->setup_irq = armada_370_xp_setup_msi_irq; msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq; - msi_chip->check_device = armada_370_xp_check_msi_device; msi_chip->of_node = node; armada_370_xp_msi_domain =
Moving MSI checks from arch_msi_check_device() function to arch_setup_msi_irqs() function makes code more compact and allows removing unnecessary hook arch_msi_check_device() from generic MSI code. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: linux-pci@vger.kernel.org Signed-off-by: Alexander Gordeev <agordeev@redhat.com> --- drivers/irqchip/irq-armada-370-xp.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)