From: Josef Johansson <josef@oderland.se>
To: Jason Andryuk <jandryuk@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
maz@kernel.org, linux-pci@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [REGRESSION][BISECTED] 5.15-rc1: Broken AHCI on NVIDIA ION (MCP79)
Date: Tue, 12 Oct 2021 17:17:50 +0200 [thread overview]
Message-ID: <29bb9284-668a-8ccf-7727-1e1f0857a0ed@oderland.se> (raw)
In-Reply-To: <fdfb6267-e467-4785-b4a0-00859f6dc161@oderland.se>
On 10/12/21 15:33, Josef Johansson wrote:
> On 10/12/21 15:07, Jason Andryuk wrote:
>> On Tue, Oct 12, 2021 at 2:09 AM Josef Johansson <josef@oderland.se> wrote:
>>> On 10/11/21 21:34, Josef Johansson wrote:
>>>> On 10/11/21 20:47, Josef Johansson wrote:
>>>>> More can be read over at freedesktop:
>>>>> https://gitlab.freedesktop.org/drm/amd/-/issues/1715
>> Hi, Josef,
>>
>> If you compare
>> commit fcacdfbef5a1633211ebfac1b669a7739f5b553e "PCI/MSI: Provide a
>> new set of mask and unmask functions"
>> and
>> commit 446a98b19fd6da97a1fb148abb1766ad89c9b767 "PCI/MSI: Use new
>> mask/unmask functions" some of the replacement functions in 446198b1
>> no longer exit early for the pci_msi_ignore_mask flag.
>>
>> Josef, I'd recommend you try adding pci_msi_ignore_mask checks to the
>> new functions in fcacdfbef5a to see if that helps.
>>
>> There was already a pci_msi_ignore_mask fixup in commit
>> 1a519dc7a73c977547d8b5108d98c6e769c89f4b "PCI/MSI: Skip masking MSI-X
>> on Xen PV" though the kernel was crashing in that case.
>>
>> Regards,
>> Jason
> Hi Jason,
>
> Makes sense. I am compiling now, will try it as soon as it's done.
>
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 0099a00af361..620928fd0065 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -148,6 +148,9 @@ static noinline void pci_msi_update_mask(struct
> msi_desc *desc, u32 clear, u32 s
> raw_spinlock_t *lock = &desc->dev->msi_lock;
> unsigned long flags;
>
> + if (pci_msi_ignore_mask)
> + return;
> +
> raw_spin_lock_irqsave(lock, flags);
> desc->msi_mask &= ~clear;
> desc->msi_mask |= set;
> @@ -179,6 +182,9 @@ static inline void __iomem
> *pci_msix_desc_addr(struct msi_desc *desc)
> */
> static void pci_msix_write_vector_ctrl(struct msi_desc *desc, u32 ctrl)
> {
> + if (pci_msi_ignore_mask)
> + return;
> +
> void __iomem *desc_addr = pci_msix_desc_addr(desc);
>
> writel(ctrl, desc_addr + PCI_MSIX_ENTRY_VECTOR_CTRL);
> @@ -186,6 +192,9 @@ static void pci_msix_write_vector_ctrl(struct
> msi_desc *desc, u32 ctrl)
>
> static inline void pci_msix_mask(struct msi_desc *desc)
> {
> + if (pci_msi_ignore_mask)
> + return;
> +
> desc->msix_ctrl |= PCI_MSIX_ENTRY_CTRL_MASKBIT;
> pci_msix_write_vector_ctrl(desc, desc->msix_ctrl);
> /* Flush write to device */
> @@ -194,6 +203,9 @@ static inline void pci_msix_mask(struct msi_desc *desc)
>
> static inline void pci_msix_unmask(struct msi_desc *desc)
> {
> + if (pci_msi_ignore_mask)
> + return;
> +
> desc->msix_ctrl &= ~PCI_MSIX_ENTRY_CTRL_MASKBIT;
> pci_msix_write_vector_ctrl(desc, desc->msix_ctrl);
> }
>
I love open source. It just works. Was my patch correct btw?
Thanks Jason!
Regards
- Josef
next prev parent reply other threads:[~2021-10-12 15:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-06 8:50 [REGRESSION][BISECTED] 5.15-rc1: Broken AHCI on NVIDIA ION (MCP79) Rui Salvaterra
2021-10-06 11:00 ` Marc Zyngier
2021-10-06 11:06 ` Rui Salvaterra
2021-10-07 8:52 ` Marc Zyngier
2021-10-07 12:03 ` Rui Salvaterra
2021-10-07 12:15 ` Marc Zyngier
2021-10-07 13:11 ` Rui Salvaterra
2021-10-07 14:42 ` Marc Zyngier
2021-10-07 14:50 ` Rui Salvaterra
2021-10-07 15:03 ` Marc Zyngier
2021-10-07 16:13 ` Rui Salvaterra
2021-10-06 11:44 ` Rui Salvaterra
2021-10-06 11:48 ` Rui Salvaterra
2021-10-11 18:47 ` Josef Johansson
2021-10-11 19:34 ` Josef Johansson
2021-10-12 5:37 ` Josef Johansson
2021-10-12 13:07 ` Jason Andryuk
2021-10-12 13:33 ` Josef Johansson
2021-10-12 15:17 ` Josef Johansson [this message]
2021-10-12 11:34 ` Marc Zyngier
2021-10-12 12:33 ` Josef Johansson
2021-10-31 22:51 ` Rui Salvaterra
2021-11-01 11:21 ` Marc Zyngier
2021-11-01 11:36 ` Rui Salvaterra
[not found] <1374495046.4164334.1635737050153@localhost>
2021-11-01 11:06 ` Rui Salvaterra
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=29bb9284-668a-8ccf-7727-1e1f0857a0ed@oderland.se \
--to=josef@oderland.se \
--cc=jandryuk@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=xen-devel@lists.xenproject.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).