From: Li Yang <leoli@freescale.com>
To: galak@kernel.crashing.org, linuxppc-dev@lists.ozlabs.org
Cc: Zhao Chenhui <b26998@freescale.com>
Subject: [PATCH v2 3/5] fsl_msi: enable msi sharing through AMP OSes
Date: Tue, 20 Apr 2010 20:20:46 +0800 [thread overview]
Message-ID: <1271766048-19272-3-git-send-email-leoli@freescale.com> (raw)
In-Reply-To: <1271766048-19272-2-git-send-email-leoli@freescale.com>
Make a single PCIe MSI bank shareable through CAMP OSes. The number of
MSI used by each core can be configured by dts file.
Signed-off-by: Zhao Chenhui <b26998@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
---
arch/powerpc/sysdev/fsl_msi.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 712f934..61e97cb 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -262,6 +262,8 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
const u32 *p;
struct fsl_msi_feature *features = match->data;
struct fsl_msi_cascade_data *cascade_data = NULL;
+ int len;
+ u32 offset;
printk(KERN_DEBUG "Setting up Freescale MSI support\n");
@@ -321,6 +323,10 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
err = -EINVAL;
goto error_out;
}
+ offset = 0;
+ p = of_get_property(dev->node, "msi-available-ranges", &len);
+ if (p)
+ offset = *p / IRQS_PER_MSI_REG;
count /= sizeof(u32);
for (i = 0; i < count / 2; i++) {
@@ -337,7 +343,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
err = -ENOMEM;
goto error_out;
}
- cascade_data->index = i;
+ cascade_data->index = i + offset;
cascade_data->msi_data = msi;
set_irq_data(virt_msir, (void *)cascade_data);
set_irq_chained_handler(virt_msir, fsl_msi_cascade);
--
1.6.6-rc1.GIT
next prev parent reply other threads:[~2010-04-20 11:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-20 12:20 [PATCH v2 1/5] fsl_msi: fix the conflict of virt_msir's chip_data Li Yang
2010-04-20 12:20 ` [PATCH v2 2/5] fsl_msi: enable msi allocation in all banks Li Yang
2010-04-20 12:20 ` Li Yang [this message]
2010-04-20 12:20 ` [PATCH v2 4/5] mpc8572ds: change camp dtses for MSI sharing Li Yang
2010-04-20 12:20 ` [PATCH v2 5/5] fsl_msi: add remove path and probe failing path Li Yang
2010-04-20 12:23 ` [PATCH v2 2/5] fsl_msi: enable msi allocation in all banks Michael Ellerman
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=1271766048-19272-3-git-send-email-leoli@freescale.com \
--to=leoli@freescale.com \
--cc=b26998@freescale.com \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).