lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 27 Oct 2014 21:22:18 +0800 From: Yijing Wang <wangyijing@...wei.com> To: Bjorn Helgaas <bhelgaas@...gle.com> CC: <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Xinwei Hu <huxinwei@...wei.com>, Wuyun <wuyun.wu@...wei.com>, <linux-arm-kernel@...ts.infradead.org>, Russell King <linux@....linux.org.uk>, <x86@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>, <xen-devel@...ts.xenproject.org>, Joerg Roedel <joro@...tes.org>, <iommu@...ts.linux-foundation.org>, <linux-mips@...ux-mips.org>, "Benjamin Herrenschmidt" <benh@...nel.crashing.org>, <linuxppc-dev@...ts.ozlabs.org>, <linux-s390@...r.kernel.org>, Sebastian Ott <sebott@...ux.vnet.ibm.com>, "Tony Luck" <tony.luck@...el.com>, <linux-ia64@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>, <sparclinux@...r.kernel.org>, Chris Metcalf <cmetcalf@...era.com>, Ralf Baechle <ralf@...ux-mips.org>, Lucas Stach <l.stach@...gutronix.de>, David Vrabel <david.vrabel@...rix.com>, "Sergei Shtylyov" <sergei.shtylyov@...entembedded.com>, Michael Ellerman <mpe@...erman.id.au>, Thierry Reding <thierry.reding@...il.com>, "Thomas Petazzoni" <thomas.petazzoni@...e-electrons.com>, Yijing Wang <wangyijing@...wei.com> Subject: [PATCH 12/16] arm/iop13xx/MSI: Use MSI controller framework to configure MSI/MSI-X irq Use MSI controller 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@...wei.com> --- arch/arm/mach-iop13xx/include/mach/pci.h | 4 ++++ arch/arm/mach-iop13xx/iq81340mc.c | 3 +++ arch/arm/mach-iop13xx/iq81340sc.c | 5 ++++- arch/arm/mach-iop13xx/msi.c | 11 +++++++++-- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-iop13xx/include/mach/pci.h b/arch/arm/mach-iop13xx/include/mach/pci.h index 59f42b5..c8f5caf 100644 --- a/arch/arm/mach-iop13xx/include/mach/pci.h +++ b/arch/arm/mach-iop13xx/include/mach/pci.h @@ -11,6 +11,10 @@ void iop13xx_atu_select(struct hw_pci *plat_pci); void iop13xx_pci_init(void); void iop13xx_map_pci_memory(void); +#ifdef CONFIG_PCI_MSI +extern struct msi_controller iop13xx_msi_ctrl; +#endif + #define IOP_PCI_STATUS_ERROR (PCI_STATUS_PARITY | \ PCI_STATUS_SIG_TARGET_ABORT | \ PCI_STATUS_REC_TARGET_ABORT | \ diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c index 9cd07d3..7b802f5 100644 --- a/arch/arm/mach-iop13xx/iq81340mc.c +++ b/arch/arm/mach-iop13xx/iq81340mc.c @@ -59,6 +59,9 @@ static struct hw_pci iq81340mc_pci __initdata = { .map_irq = iq81340mc_pcix_map_irq, .scan = iop13xx_scan_bus, .preinit = iop13xx_pci_init, +#ifdef CONFIG_PCI_MSI + .msi_ctrl = &iop13xx_msi_ctrl, +#endif }; static int __init iq81340mc_pci_init(void) diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c index b3ec11c..934de2e 100644 --- a/arch/arm/mach-iop13xx/iq81340sc.c +++ b/arch/arm/mach-iop13xx/iq81340sc.c @@ -60,7 +60,10 @@ static struct hw_pci iq81340sc_pci __initdata = { .setup = iop13xx_pci_setup, .scan = iop13xx_scan_bus, .map_irq = iq81340sc_atux_map_irq, - .preinit = iop13xx_pci_init + .preinit = iop13xx_pci_init, +#ifdef CONFIG_PCI_MSI + .msi_ctrl = &iop13xx_msi_ctrl, +#endif }; static int __init iq81340sc_pci_init(void) diff --git a/arch/arm/mach-iop13xx/msi.c b/arch/arm/mach-iop13xx/msi.c index e7730cf..07a512e 100644 --- a/arch/arm/mach-iop13xx/msi.c +++ b/arch/arm/mach-iop13xx/msi.c @@ -132,7 +132,8 @@ static struct irq_chip iop13xx_msi_chip = { .irq_unmask = unmask_msi_irq, }; -int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) +static int iop13xx_setup_msi_irq(struct msi_controller *ctrl, + struct pci_dev *dev, struct msi_desc *desc) { int id, irq = irq_alloc_desc_from(IRQ_IOP13XX_MSI_0, -1); struct msi_msg msg; @@ -159,7 +160,13 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) return 0; } -void arch_teardown_msi_irq(unsigned int irq) +static void iop13xx_teardown_msi_irq(struct msi_controller *ctrl, + unsigned int irq) { irq_free_desc(irq); } + +struct msi_controller iop13xx_msi_ctrl = { + .setup_irq = iop13xx_setup_msi_irq, + .teardown_irq = iop13xx_teardown_msi_irq, +}; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists