Message ID | 1411614872-4009-16-git-send-email-wangyijing@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Sep 25, 2014 at 11:14:25AM +0800, Yijing Wang wrote: [...] > diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c [...] > @@ -214,11 +214,11 @@ static int get_irq_vector(const struct pci_dev *dev) > } > > #ifdef CONFIG_PCI_MSI > -void arch_teardown_msi_irq(unsigned int irq) > +void xlr_teardown_msi_irq(unsigned int irq) > { > } > > -int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) > +int xlr_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) Can both of these now be static? Thierry
On 2014/9/25 15:37, Thierry Reding wrote: > On Thu, Sep 25, 2014 at 11:14:25AM +0800, Yijing Wang wrote: > [...] >> diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c > [...] >> @@ -214,11 +214,11 @@ static int get_irq_vector(const struct pci_dev *dev) >> } >> >> #ifdef CONFIG_PCI_MSI >> -void arch_teardown_msi_irq(unsigned int irq) >> +void xlr_teardown_msi_irq(unsigned int irq) >> { >> } >> >> -int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) >> +int xlr_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) > > Can both of these now be static? Yes, Will update. > > Thierry >
diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c index 0dde803..7bd91cc 100644 --- a/arch/mips/pci/pci-xlr.c +++ b/arch/mips/pci/pci-xlr.c @@ -214,11 +214,11 @@ static int get_irq_vector(const struct pci_dev *dev) } #ifdef CONFIG_PCI_MSI -void arch_teardown_msi_irq(unsigned int irq) +void xlr_teardown_msi_irq(unsigned int irq) { } -int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) +int xlr_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) { struct msi_msg msg; struct pci_dev *lnk; @@ -263,6 +263,17 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) write_msi_msg(irq, &msg); return 0; } + +static struct msi_chip xlr_msi_chip = { + .setup_irq = xlr_setup_msi_irq, + .teardown_irq = xlr_teardown_msi_irq, +}; + +struct msi_chip *arch_find_msi_chip(struct pci_dev *dev) +{ + return &xlr_msi_chip; +} + #endif /* Extra ACK needed for XLR on chip PCI controller */
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang <wangyijing@huawei.com> --- arch/mips/pci/pci-xlr.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-)