From nobody Fri Nov 22 03:15:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1729018358; cv=none; d=zohomail.com; s=zohoarc; b=iq+LnN6ksnRk715e0h6Ij7jErXNLsrBspyA0nE9sKMxMaUcIB2KofDFN2ZHPUxmeGwkM/YlIAsiyF7mUM9p47le2iqBJymPl/ikXMpJ1hzDZuYwQ+nfyIMxrKVcy5w8wD2WaFy0AeKKZYwBR6JmnSwlwmV1n8Guu7+2GZdJjmRg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729018358; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NsJKOkpA+QoYlzqeYDbY0Dl9xjdlxWNvzFNzd4dMwhk=; b=mBSmCXodCw0N8wx7NhlOOoPljS+PCe6nStjQ8uOvtz/TQjfyycDTap3j1Q04D1TXTKgOwOWBye1Rg5Mq0vrAbevaeROPvBGCcsw3zW4cQ8WT22x6OoRJQaKvql4cghEXCkQAHdIpaHC3pP2fzH/9XhQaKCejBS7jxV4xhZiiiiM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1729018357996594.3440528870594; Tue, 15 Oct 2024 11:52:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.819326.1232693 (Exim 4.92) (envelope-from ) id 1t0meT-0000Te-Tq; Tue, 15 Oct 2024 18:52:13 +0000 Received: by outflank-mailman (output) from mailman id 819326.1232693; Tue, 15 Oct 2024 18:52:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t0meT-0000Su-Pj; Tue, 15 Oct 2024 18:52:13 +0000 Received: by outflank-mailman (input) for mailman id 819326; Tue, 15 Oct 2024 18:52:12 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t0meR-0006G4-UW for xen-devel@lists.xenproject.org; Tue, 15 Oct 2024 18:52:11 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9580159f-8b26-11ef-a0be-8be0dac302b0; Tue, 15 Oct 2024 20:52:11 +0200 (CEST) Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-538-btv5M8XQPdKNeYohVNzpMw-1; Tue, 15 Oct 2024 14:52:08 -0400 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2fb45ca974bso14366691fa.2 for ; Tue, 15 Oct 2024 11:52:08 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82d5d5a0006e2615320d1d4db.dip.versatel-1u1.de. [2001:16b8:2d5d:5a00:6e2:6153:20d1:d4db]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c98d39a9a2sm974438a12.0.2024.10.15.11.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 11:52:06 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9580159f-8b26-11ef-a0be-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729018330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NsJKOkpA+QoYlzqeYDbY0Dl9xjdlxWNvzFNzd4dMwhk=; b=O4EfT2H9WnO5VeuryMyn25009v9RhI/mEJxxnL8tvrr5dW4ZzWnD2nBRXx137ssvOx4kpu EIbLSqOC68S5cEbTR2q+/Tq+WigVIrkV8Dv4GltWq0TZP7Ai+hE7+tzsefg5WKiIfUzhNI s8sBZY0AbQ6K/DAlKUfZze+HMagsF58= X-MC-Unique: btv5M8XQPdKNeYohVNzpMw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729018327; x=1729623127; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NsJKOkpA+QoYlzqeYDbY0Dl9xjdlxWNvzFNzd4dMwhk=; b=D4CJ4cZiDuNvsvIHwIDsn+/9QRUMIh9dLPpqkzLqyKMLPDLybX5lgukL2EEWcJOEBE y3lI7OrjNhQqvz4icNuvMJwHUwJJ6tc5xybld3+6UH/rgOK4Mql8rwOfqBqtG9aKk5aB AAlMdda/O6dFN0wDssdyVXrP2WiFvnsbva74ojZWadNixGBYMhamazuVKcSIsucL5Sd8 Rj9jc6iUI8cxmSvTYJhrsz96tJrapHsB/GyOhcwje781ie/kRk5mk2h1LYAKqSeK+2EY 7e6YCLEA6k5+YvPhPlY7zp4NWCqgYEJrlZh9qv5Fz6/Z/ioMtFse9XcJBCtBN2oPlFnp mi5g== X-Forwarded-Encrypted: i=1; AJvYcCX3V6fJ/NQQPYsINTdXzRzlJoXHoSNziuAX9/PXEGFhb+lGi0oOIIzBJTMF2r/OGDlDaPq7dKqs2/8=@lists.xenproject.org X-Gm-Message-State: AOJu0YyI5SWkbuwPpHy3oJHrgtXVtcUQTc/ovcf1R8TxVnJIRCuzdPJu 1A0cVq1Qlt24z44GmCM8Rw6FpGabm++6kZox+JBj2W5aN7mU//sm0zHVtvo+3o5e4ObBYXpO4+8 PPRX1rxOE0IQuOz3OR4ROKxsOLk+k2cBVM1yf+TfkgGNi8C4GZJ4ulKZ3tIosIWZE X-Received: by 2002:a2e:bc24:0:b0:2fb:51e0:951 with SMTP id 38308e7fff4ca-2fb51e00cd9mr38862361fa.7.1729018327261; Tue, 15 Oct 2024 11:52:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVZ1XHHUqIGJ2m/RKPcgltoOTO0Mu8nn9SAFlZXigaFQMqbloSJIQ5jr77XkDUgFazWOLC0g== X-Received: by 2002:a2e:bc24:0:b0:2fb:51e0:951 with SMTP id 38308e7fff4ca-2fb51e00cd9mr38861861fa.7.1729018326657; Tue, 15 Oct 2024 11:52:06 -0700 (PDT) From: Philipp Stanner To: Damien Le Moal , Niklas Cassel , Sergey Shtylyov , Basavaraj Natikar , Jiri Kosina , Benjamin Tissoires , Arnd Bergmann , Greg Kroah-Hartman , Alex Dubov , Sudarsana Kalluru , Manish Chopra , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rasesh Mody , GR-Linux-NIC-Dev@marvell.com, Igor Mitsyanko , Sergey Matyukevich , Kalle Valo , Sanjay R Mehta , Shyam Sundar S K , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Alex Williamson , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Jaroslav Kysela , Takashi Iwai , Chen Ni , Mario Limonciello , Philipp Stanner , Ricky Wu , Al Viro , Breno Leitao , Kevin Tian , Thomas Gleixner , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Andy Shevchenko , Mostafa Saleh , Jason Gunthorpe , Yi Liu , Christian Brauner , Ankit Agrawal , Eric Auger , Reinette Chatre , Ye Bin , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Pierre-Louis Bossart , Peter Ujfalusi , Maarten Lankhorst , Kai Vehmanen , Rui Salvaterra Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, linux-sound@vger.kernel.org Subject: [PATCH 08/13] PCI: MSI: Use never-managed version of pci_intx() Date: Tue, 15 Oct 2024 20:51:18 +0200 Message-ID: <20241015185124.64726-9-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241015185124.64726-1-pstanner@redhat.com> References: <20241015185124.64726-1-pstanner@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1729018359153116600 Content-Type: text/plain; charset="utf-8"; x-default="true" pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. MSI sets up its own separate devres callback implicitly in pcim_setup_msi_release(). This callback ultimately uses pci_intx(), which is problematic since the callback of course runs on driver-detach. That problem has last been described here: https://lore.kernel.org/all/ee44ea7ac760e73edad3f20b30b4d2fff66c1a85.camel@= redhat.com/ Replace the call to pci_intx() with one to the never-managed version pci_intx_unmanaged(). Signed-off-by: Philipp Stanner --- drivers/pci/msi/api.c | 2 +- drivers/pci/msi/msi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/msi/api.c b/drivers/pci/msi/api.c index b956ce591f96..c95e2e7dc9ab 100644 --- a/drivers/pci/msi/api.c +++ b/drivers/pci/msi/api.c @@ -289,7 +289,7 @@ int pci_alloc_irq_vectors_affinity(struct pci_dev *dev,= unsigned int min_vecs, */ if (affd) irq_create_affinity_masks(1, affd); - pci_intx(dev, 1); + pci_intx_unmanaged(dev, 1); return 1; } } diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c index 3a45879d85db..53f13b09db50 100644 --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -268,7 +268,7 @@ EXPORT_SYMBOL_GPL(pci_write_msi_msg); static void pci_intx_for_msi(struct pci_dev *dev, int enable) { if (!(dev->dev_flags & PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG)) - pci_intx(dev, enable); + pci_intx_unmanaged(dev, enable); } =20 static void pci_msi_set_enable(struct pci_dev *dev, int enable) --=20 2.47.0