From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7869C433F5 for ; Tue, 19 Oct 2021 07:39:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC6146137C for ; Tue, 19 Oct 2021 07:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234275AbhJSHmH (ORCPT ); Tue, 19 Oct 2021 03:42:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:54204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232782AbhJSHmG (ORCPT ); Tue, 19 Oct 2021 03:42:06 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 65D686136F; Tue, 19 Oct 2021 07:39:54 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mcjiy-0008xD-23; Tue, 19 Oct 2021 08:39:52 +0100 Date: Tue, 19 Oct 2021 08:39:51 +0100 Message-ID: <87wnm9o43c.wl-maz@kernel.org> From: Marc Zyngier To: Bjorn Helgaas Cc: Barry Song <21cnbao@gmail.com>, bhelgaas@google.com, tglx@linutronix.de, Jonathan.Cameron@huawei.com, bilbao@vt.edu, corbet@lwn.net, gregkh@linuxfoundation.org, leon@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linuxarm@huawei.com, luzmaximilian@gmail.com, mchehab+huawei@kernel.org, schnelle@linux.ibm.com, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org, Barry Song Subject: Re: [PATCH v3 0/3] PCI/MSI: Clarify the IRQ sysfs ABI for PCI devices In-Reply-To: <20211018215047.GA2265015@bhelgaas> References: <20210825102636.52757-1-21cnbao@gmail.com> <20211018215047.GA2265015@bhelgaas> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: helgaas@kernel.org, 21cnbao@gmail.com, bhelgaas@google.com, tglx@linutronix.de, Jonathan.Cameron@huawei.com, bilbao@vt.edu, corbet@lwn.net, gregkh@linuxfoundation.org, leon@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linuxarm@huawei.com, luzmaximilian@gmail.com, mchehab+huawei@kernel.org, schnelle@linux.ibm.com, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org, song.bao.hua@hisilicon.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Mon, 18 Oct 2021 22:50:47 +0100, Bjorn Helgaas wrote: > > On Wed, Aug 25, 2021 at 06:26:33PM +0800, Barry Song wrote: > > From: Barry Song > > > > > > /sys/bus/pci/devices/.../irq has been there for many years but it has never > > been documented. This patchset is trying to clarify it. > > > > -v3: > > - Don't attempt to modify the current behaviour of IRQ ABI for MSI-X > > - Make MSI IRQ ABI more explicit(return 1st IRQ of the IRQ vector) > > - Add Marc's patch of removing default_irq from the previous comment to > > the series. > > Note patch 3/3 indirectly changed the code of pci_restore_msi_state(), > > drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c is the only driver > > calling this API. I would appreciate testing done from this driver's > > maintainers. > > > > -v2: > > - split into two patches according to Bjorn's comments; > > - Add Greg's Acked-by, thanks for reviewing! > > https://lore.kernel.org/lkml/20210820223744.8439-1-21cnbao@gmail.com/ > > > > -v1: > > https://lore.kernel.org/lkml/20210813122650.25764-1-21cnbao@gmail.com/#t > > > > Barry Song (2): > > Documentation: ABI: sysfs-bus-pci: Add description for IRQ entry > > PCI/sysfs: Don't depend on pci_dev.irq for IRQ entry > > I applied the first two (above) to pci/msi for v5.16, thanks! > > As far as I can tell from the discussion so far, they should be safe > and should preserve all existing behavior. The second patch should > remove the sysfs dependency on the PCI core to swap the INTx and first > MSI IRQ values in dev->irq. > > Marc's patch below is certainly desirable but my understanding is that > it requires some driver updates first. Indeed. It means that there will be an uphill battle to remove the INTx/MSI confusion in a lot of drivers (Barry says about 700 of them, and I can't say I'm surprised). We can probably tackle that as a background task for the next few releases (I need to relearn Coccinelle for the 27th time...). Thanks, M. -- Without deviation from the norm, progress is not possible.