From: Yijing Wang <wangyijing@huawei.com>
To: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Gerald Schaefer <gerald.schaefer@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
<linux-s390@vger.kernel.org>, <linux-pci@vger.kernel.org>,
Wuyun <wuyun.wu@huawei.com>, Xinwei Hu <huxinwei@huawei.com>
Subject: Re: [PATCH 2/5] s390/MSI: Use standard mask and unmask funtions
Date: Tue, 8 Jul 2014 09:33:27 +0800 [thread overview]
Message-ID: <53BB4A67.4010104@huawei.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1407041623560.1624@denkbrett>
On 2014/7/4 22:28, Sebastian Ott wrote:
> On Fri, 4 Jul 2014, Yijing Wang wrote:
>> MSI irqchip in s390 has its own mask and unmask MSI irq
>> functions, zpci_enable_irq() and zpci_disable_irq().
>> They mask and unmask MSI irq in standard ways, no arch
>> special. MSI driver provides two global standard functions
>> mask_msi_irq() and unmask_msi_irq(). Local zpci_enable_irq()
>> and zpci_disable_irq() are almost the same as the standard
>> two. the difference is local mask/unmask functions
>> read the mask status before mask and unmask everytime.
>> Then change the value and rewrite to hardware. In standard
>> functions, save the mask status after mask and unmask msi
>> irq, and use the cached status to change the mask status.
>> When we mask or unmask a MSI irq, we always cache its
>> mask status except we know need not to cache it, like in
>> pci_msi_shutdown. So use the standard functions to replace
>> the local is safe.
>
> Thanks, for doing that!
> At first glance the last hunk looks funny.
Thanks for your review.
>
>>
>> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
>> ---
>> arch/s390/pci/pci.c | 49 ++++++-------------------------------------------
>> }
>> @@ -487,7 +447,10 @@ void arch_teardown_msi_irqs(struct pci_dev *pdev)
>>
>> /* Release MSI interrupts */
>> list_for_each_entry(msi, &pdev->msi_list, list) {
>> - zpci_msi_set_mask_bits(msi, 1, 1);
>> + if (msi->msi_attrib.is_msix)
>> + default_msi_mask_irq(msi, 1, 1);
>> + else
>> + default_msix_mask_irq(msi, 1);
>
> This one looks inverted.
Oh, my mistake, will update and resend.
Thanks!
Yijing.
>
>> irq_set_msi_desc(msi->irq, NULL);
>> irq_free_desc(msi->irq);
>> msi->msg.address_lo = 0;
>
> Regards,
> Sebastian
>
>
> .
>
--
Thanks!
Yijing
WARNING: multiple messages have this Message-ID (diff)
From: Yijing Wang <wangyijing@huawei.com>
To: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Gerald Schaefer <gerald.schaefer@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-s390@vger.kernel.org, linux-pci@vger.kernel.org,
Wuyun <wuyun.wu@huawei.com>, Xinwei Hu <huxinwei@huawei.com>
Subject: Re: [PATCH 2/5] s390/MSI: Use standard mask and unmask funtions
Date: Tue, 8 Jul 2014 09:33:27 +0800 [thread overview]
Message-ID: <53BB4A67.4010104@huawei.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1407041623560.1624@denkbrett>
On 2014/7/4 22:28, Sebastian Ott wrote:
> On Fri, 4 Jul 2014, Yijing Wang wrote:
>> MSI irqchip in s390 has its own mask and unmask MSI irq
>> functions, zpci_enable_irq() and zpci_disable_irq().
>> They mask and unmask MSI irq in standard ways, no arch
>> special. MSI driver provides two global standard functions
>> mask_msi_irq() and unmask_msi_irq(). Local zpci_enable_irq()
>> and zpci_disable_irq() are almost the same as the standard
>> two. the difference is local mask/unmask functions
>> read the mask status before mask and unmask everytime.
>> Then change the value and rewrite to hardware. In standard
>> functions, save the mask status after mask and unmask msi
>> irq, and use the cached status to change the mask status.
>> When we mask or unmask a MSI irq, we always cache its
>> mask status except we know need not to cache it, like in
>> pci_msi_shutdown. So use the standard functions to replace
>> the local is safe.
>
> Thanks, for doing that!
> At first glance the last hunk looks funny.
Thanks for your review.
>
>>
>> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
>> ---
>> arch/s390/pci/pci.c | 49 ++++++-------------------------------------------
>> }
>> @@ -487,7 +447,10 @@ void arch_teardown_msi_irqs(struct pci_dev *pdev)
>>
>> /* Release MSI interrupts */
>> list_for_each_entry(msi, &pdev->msi_list, list) {
>> - zpci_msi_set_mask_bits(msi, 1, 1);
>> + if (msi->msi_attrib.is_msix)
>> + default_msi_mask_irq(msi, 1, 1);
>> + else
>> + default_msix_mask_irq(msi, 1);
>
> This one looks inverted.
Oh, my mistake, will update and resend.
Thanks!
Yijing.
>
>> irq_set_msi_desc(msi->irq, NULL);
>> irq_free_desc(msi->irq);
>> msi->msg.address_lo = 0;
>
> Regards,
> Sebastian
>
>
> .
>
--
Thanks!
Yijing
next prev parent reply other threads:[~2014-07-08 1:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 8:16 [PATCH 2/5] s390/MSI: Use standard mask and unmask funtions Yijing Wang
2014-07-04 8:16 ` Yijing Wang
2014-07-04 14:28 ` Sebastian Ott
2014-07-08 1:33 ` Yijing Wang [this message]
2014-07-08 1:33 ` Yijing Wang
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=53BB4A67.4010104@huawei.com \
--to=wangyijing@huawei.com \
--cc=bhelgaas@google.com \
--cc=gerald.schaefer@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=huxinwei@huawei.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=sebott@linux.vnet.ibm.com \
--cc=wuyun.wu@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.