public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Li Yang <leoli@freescale•com>
To: michael@ellerman•id.au
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:50:59 +0800	[thread overview]
Message-ID: <4BCBE133.3010407@freescale.com> (raw)
In-Reply-To: <1271644834.14835.40.camel@concordia>

On 4/19/2010 10:40 AM, Michael Ellerman wrote:
> 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?
>    

The patch at http://patchwork.ozlabs.org/patch/48794/ was overwriting 
the chip_data.  We move the newly added pointer to fsl_msi structure to 
the handler data.

>
>    
>> @@ -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.
>    

You are right.  Need to add a separate patch to fix all these.

Thanks.
- Leo

  reply	other threads:[~2010-04-19  4:51 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 ` [PATCH 1/4] fsl_msi: fix the conflict of virt_msir's chip_data Michael Ellerman
2010-04-19  4:50   ` Li Yang [this message]
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=4BCBE133.3010407@freescale.com \
    --to=leoli@freescale$(echo .)com \
    --cc=b26998@freescale$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=michael@ellerman$(echo .)id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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