From: Michael Ellerman <michael@ellerman.id.au>
To: Li Yang <leoli@freescale.com>
Cc: linuxppc-dev@ozlabs.org, Zhao Chenhui <b26998@freescale.com>
Subject: Re: [PATCH 1/4] fsl_msi: fix the conflict of virt_msir's chip_data
Date: Mon, 19 Apr 2010 12:40:34 +1000 [thread overview]
Message-ID: <1271644834.14835.40.camel@concordia> (raw)
In-Reply-To: <1271403278-30091-1-git-send-email-leoli@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]
On Fri, 2010-04-16 at 15:34 +0800, Li Yang wrote:
> From: Zhao Chenhui <b26998@freescale.com>
>
> In fsl_of_msi_probe(), the virt_msir's chip_data have been stored
> the pointer to struct mpic. We add a struct fsl_msi_cascade_data
> to store the pointer to struct fsl_msi and msir_index. Otherwise,
> the pointer to struct mpic will be over-written, and will cause
> problem when calling eoi() of the irq.
I don't quite understand. Do you mean someone was overwriting
handler_data somewhere?
> @@ -309,9 +319,19 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
> break;
> virt_msir = irq_of_parse_and_map(dev->node, i);
> if (virt_msir != NO_IRQ) {
> - set_irq_data(virt_msir, (void *)i);
> + cascade_data = kzalloc(
> + sizeof(struct fsl_msi_cascade_data),
> + GFP_KERNEL);
> + if (!cascade_data) {
> + dev_err(&dev->dev,
> + "No memory for MSI cascade data\n");
> + err = -ENOMEM;
> + goto error_out;
The error handling in this routine is not great, most of the setup is
not torn down properly in the error paths AFAICS, this adds another.
> + }
> + cascade_data->index = i;
> + cascade_data->data = msi;
> + set_irq_data(virt_msir, (void *)cascade_data);
> set_irq_chained_handler(virt_msir, fsl_msi_cascade);
> - set_irq_chip_data(virt_msir, msi);
> }
> }
>
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-04-19 2:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 7:34 [PATCH 1/4] fsl_msi: fix the conflict of virt_msir's chip_data Li Yang
2010-04-16 7:34 ` [PATCH 2/4] fsl_msi: enable msi allocation in all banks Li Yang
2010-04-16 7:34 ` [PATCH 3/4] fsl_msi: enable msi sharing through AMP OSes Li Yang
2010-04-16 7:34 ` [PATCH 4/4] mpc8572ds: change camp dtses for MSI sharing Li Yang
2010-04-19 2:34 ` [PATCH 3/4] fsl_msi: enable msi sharing through AMP OSes Michael Ellerman
2010-04-19 6:23 ` Li Yang
2010-04-19 2:46 ` [PATCH 2/4] fsl_msi: enable msi allocation in all banks Michael Ellerman
2010-04-19 6:46 ` Li Yang
2010-04-19 2:40 ` Michael Ellerman [this message]
2010-04-19 4:50 ` [PATCH 1/4] fsl_msi: fix the conflict of virt_msir's chip_data Li Yang
2010-04-19 12:19 ` Kumar Gala
2010-04-20 3:10 ` Li Yang
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=1271644834.14835.40.camel@concordia \
--to=michael@ellerman.id.au \
--cc=b26998@freescale.com \
--cc=leoli@freescale.com \
--cc=linuxppc-dev@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).