Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2523567pxb; Tue, 12 Oct 2021 08:20:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTIh/e/EzzWnuWUbYH5FXAoOfpHJjH0G6TNVWBJWlZIfoT/R62qZ7voeieRvBMF0uCZ63f X-Received: by 2002:a63:2acb:: with SMTP id q194mr23419975pgq.59.1634052018017; Tue, 12 Oct 2021 08:20:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634052018; cv=none; d=google.com; s=arc-20160816; b=ZBjiL5DSNx9SOk/ebT9Bt8J+0G4Uo4ksRWQp5vwGL6st4+wLeoGyVFWUOySeAelw4O vsqGng1R1tywVPiwxgv4SJVmg9m+ECW9LN1Loc8Tt/CVpgiAdvRRl8EBb11lStYk4wVm 1yPZ9VnrqsgzBHJ+cMV88sDBlBheu6aR+wVlVYC7UYDm/RZCqkEqybzro8RtOmMUhNLQ KpgQoTw7nkVzQutJGocWu4qrox14YiTuq7G4DlhjOflKy15LK4V2MuMuwJaUAOQAOnqc jsicDRabhMMpysJ/qQH9AbEZu9ij02QI4gSv/HbsbIzBMCWDnP8LRYU/Awh0xyXdxM3m f9mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=/lKmlB/azBG+KGdNhenTlzS37A3w9ZW4AEuFOFBLe+g=; b=QoBZR/0HUFQbos6yYYuB62lxeBs6a3BZJTS1fjQsZ0iGYpcCXmYGmCCxuqK/9ev96j piJow69mMMybBaghqYOUsJyKRRUmHGKpI58895pkaURSNm+R5MZXMXI3MmwzltxWiXjW 4dVakcydmYNwp396gZAnuIHrHBMhd1jok7J1Hxu4TM2UdkiScnVmNzPtTXGsMeXn97BF WyXGu4ku7KQPgISwCtnwPuF0n1wN/UWIpGyM0DaBGW0AQ+b84uMkoRdgf8CcqZRH3adb PdwkfA4fwpG6UXvT7qv/ozTQYEtj2lEPdrLB6p2+qJXqTt1hw0+TXiylIbSzjcIsU/7j +ziA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si13575684plt.67.2021.10.12.08.20.05; Tue, 12 Oct 2021 08:20:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237338AbhJLPUM (ORCPT + 99 others); Tue, 12 Oct 2021 11:20:12 -0400 Received: from office.oderland.com ([91.201.60.5]:54686 "EHLO office.oderland.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237248AbhJLPUJ (ORCPT ); Tue, 12 Oct 2021 11:20:09 -0400 Received: from [193.180.18.161] (port=38880 helo=[10.137.0.14]) by office.oderland.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1maJXZ-005qGI-W8; Tue, 12 Oct 2021 17:18:06 +0200 Message-ID: <29bb9284-668a-8ccf-7727-1e1f0857a0ed@oderland.se> Date: Tue, 12 Oct 2021 17:17:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Thunderbird/93.0 Subject: Re: [REGRESSION][BISECTED] 5.15-rc1: Broken AHCI on NVIDIA ION (MCP79) Content-Language: en-US From: Josef Johansson To: Jason Andryuk Cc: Thomas Gleixner , maz@kernel.org, linux-pci@vger.kernel.org, open list , xen-devel References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - office.oderland.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - oderland.se X-Get-Message-Sender-Via: office.oderland.com: authenticated_id: josjoh@oderland.se X-Authenticated-Sender: office.oderland.com: josjoh@oderland.se Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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