linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Axtens <dja@axtens.net>
To: linuxppc-dev@ozlabs.org, benh@kernel.crashing.org, mpe@ellerman.id.au
Cc: Daniel Axtens <dja@axtens.net>
Subject: [PATCH 08/10] powerpc/mpic_pasemi_msi: Move MSI-related ops to pci_controller_ops
Date: Tue, 14 Apr 2015 14:28:01 +1000	[thread overview]
Message-ID: <1428985683-24767-9-git-send-email-dja@axtens.net> (raw)
In-Reply-To: <1428985683-24767-1-git-send-email-dja@axtens.net>

Move the PaSemi MPIC msi subsystem to use the pci_controller_ops
structure rather than ppc_md for MSI related PCI controller
operations.

As with fsl_msi, operations are plugged in at the subsys level, after
controller creation. Again, we iterate over all controllers and
populate them with the MSI ops.
---
 arch/powerpc/sysdev/mpic_pasemi_msi.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic_pasemi_msi.c b/arch/powerpc/sysdev/mpic_pasemi_msi.c
index a3f660e..b49334c 100644
--- a/arch/powerpc/sysdev/mpic_pasemi_msi.c
+++ b/arch/powerpc/sysdev/mpic_pasemi_msi.c
@@ -144,6 +144,7 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 int mpic_pasemi_msi_init(struct mpic *mpic)
 {
 	int rc;
+	struct pci_controller *phb;
 
 	if (!mpic->irqhost->of_node ||
 	    !of_device_is_compatible(mpic->irqhost->of_node,
@@ -159,9 +160,11 @@ int mpic_pasemi_msi_init(struct mpic *mpic)
 	pr_debug("pasemi_msi: Registering PA Semi MPIC MSI callbacks\n");
 
 	msi_mpic = mpic;
-	WARN_ON(ppc_md.setup_msi_irqs);
-	ppc_md.setup_msi_irqs = pasemi_msi_setup_msi_irqs;
-	ppc_md.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs;
+	list_for_each_entry(phb, &hose_list, list_node) {
+		WARN_ON(phb->controller_ops.setup_msi_irqs);
+		phb->controller_ops.setup_msi_irqs = pasemi_msi_setup_msi_irqs;
+		phb->controller_ops.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs;
+	}
 
 	return 0;
 }
-- 
2.1.4

  parent reply	other threads:[~2015-04-14  4:28 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14  4:27 [PATCH 00/10] Move MSI related PCI controller ops to pci_controller_ops Daniel Axtens
2015-04-14  4:27 ` [PATCH 01/10] powerpc: Add MSI operations to pci_controller_ops struct Daniel Axtens
2015-04-14  4:27 ` [PATCH 02/10] powerpc/powernv: Move MSI-related ops to pci_controller_ops Daniel Axtens
2015-04-14  4:27 ` [PATCH 03/10] powerpc/cell: " Daniel Axtens
2015-04-14  4:27 ` [PATCH 04/10] powerpc/pseries: " Daniel Axtens
2015-04-14  4:27 ` [PATCH 05/10] powerpc/fsl_msi: " Daniel Axtens
2015-04-14  4:27 ` [PATCH 06/10] powerpc/ppc4xx_msi: " Daniel Axtens
2015-04-14  4:28 ` [PATCH 07/10] powerpc/ppc4xx_hsta_msi: " Daniel Axtens
2015-04-14  4:28 ` Daniel Axtens [this message]
2015-07-07 10:50   ` PASEMI: PA6T board doesn't boot with the RC1 of kernel 4.2 anymore Christian Zigotzky
2015-07-07 11:25     ` Christian Zigotzky
2015-07-07 12:44       ` Christian Zigotzky
2015-07-08 18:00         ` Christian Zigotzky
2015-07-08 22:36           ` Benjamin Herrenschmidt
2015-07-09  1:42             ` Michael Ellerman
2015-07-09  5:19               ` Christian Zigotzky
2015-07-09  7:07                 ` Michael Ellerman
2015-07-09  7:53               ` Benjamin Herrenschmidt
2015-07-09  8:50                 ` Christian Zigotzky
2015-07-09  9:12                 ` Christian Zigotzky
2015-07-09  9:52                   ` Denis Kirjanov
2015-07-09 10:37                     ` Christian Zigotzky
2015-07-13  6:47                     ` Benjamin Herrenschmidt
2015-07-13  9:33                       ` Denis Kirjanov
2015-07-09 22:27           ` Christian Zigotzky
2015-07-10  6:51             ` Christian Zigotzky
2015-07-13  6:44             ` Benjamin Herrenschmidt
2015-04-14  4:28 ` [PATCH 09/10] powerpc/mpic_u3msi: Move MSI-related ops to pci_controller_ops Daniel Axtens
2015-04-14  4:28 ` [PATCH 10/10] powerpc: Remove MSI-related PCI controller ops from ppc_md Daniel Axtens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1428985683-24767-9-git-send-email-dja@axtens.net \
    --to=dja@axtens.net \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).