From patchwork Tue Oct 15 18:51:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13836958 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E830E2296D6 for ; Tue, 15 Oct 2024 18:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729018348; cv=none; b=L0Lz4b6Gz9QWaMl+LpizYjd6GSfiwTiZaVql01g7I8FReShStBf8NnDPXkjryGZOSkH/2v/rSqd4KskjRVl/Ew/46RbZjNzEK+ccnjrvgoThOVbL20NWn/0Vs3M6JsxPSobOjXz9ZlMWVKcDMGa4qYvvcVjM9aFSM3REbTBLA6A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729018348; c=relaxed/simple; bh=ZGl79UfjjHp/dbanoMIKpsfiBb1RGuN8b5mG9T34Oqg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=deDjND2z0nUAv4Z/sRNU/gpRfPTXEzNee8BycZo1YcnGp+tNvdojOREeKORYI2DXtS2rgaEq89Z6xmiDApF9LCjU9fP0tNUVHDQCOBGHMi77VLQ14sdzJsGq4hMpLJ2ejcF4JN3+EESPgPb67ub5qvYPcvFYGBD0/qxOkaJmrFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZpEQlPAs; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZpEQlPAs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729018344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GXTMrjROGaTcKBpC5zD8IzpbS8kTElR36tpy9F32tfY=; b=ZpEQlPAsYeOvXntrSbW0ABh7+2tSnwXa7WDwEHLDoPzkzPlltrF8A4RHQEjn0jScLBUlis wmd0W+PAX8Yx9bEeoXRDah/Ys1P/curCYyNwbglXIlutUGsLFDcqyRME90m3ZSCtEYFUp5 H9moGF9JCYMYdcT+qjaQvzQDOz9LTZQ= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-296-42rJ1q8AOhCD3Ti8UyvGcQ-1; Tue, 15 Oct 2024 14:52:22 -0400 X-MC-Unique: 42rJ1q8AOhCD3Ti8UyvGcQ-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5c935cc6a96so4298122a12.1 for ; Tue, 15 Oct 2024 11:52:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729018342; x=1729623142; 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=GXTMrjROGaTcKBpC5zD8IzpbS8kTElR36tpy9F32tfY=; b=Tf728N9IO0vYu4thapVMqcsKZnR9tY5fPrNT4MH8qgNsSMG5LwLTLxEeL9s0IUuWvo 8nLA3HSlo7+axZkWEbg9oOdFTWADi567/58rpeXE6mEgnQcwvdoH9V2fkRx7cFCoqOVb NJIfFmicaE4NMZB/OVom3p1MIhRf6FBLB+snYsw4mZdjjFOc/zGD5Q2N+eI/WlcaHcbu 7RrCdkLcEo4GMaeJ/5pJVT+kIdzW/Ycl2uhIIhS4OJle1W5rM7DLKqnT/uR9+Uzp4GGj 2Bb89u4jXuXgWzzlrThMwRhpErM4hOQiApeuQWz0YrmwSmd3AKq9HJLmxp0SkRHBadKT x7Dg== X-Forwarded-Encrypted: i=1; AJvYcCVrA9QmL97ezdJcZ2WzRqBjI+ADbggJZ0rbvwc8PtNv03dJnl0n/L+W34lfQDSktfBkrs0=@vger.kernel.org X-Gm-Message-State: AOJu0YyRp7GZJLKjTcixoHor5R7B6z+gpNahXNe/OABseb5YgIjyWWe7 vWEJqMB3Lcnz1l/VM+8Rp3MAfEbaL4cKrDht/8F7frREvZzZauEi/11IoK5Qdo0BRZZs9FoeEgn sjNwZ5jK1p5nFsQUQXFN9b/c38YMGJKrpODaRnCWwI4d1avFGaA== X-Received: by 2002:a05:6402:520f:b0:5c5:ba82:c3b1 with SMTP id 4fb4d7f45d1cf-5c95ac4e471mr9746994a12.29.1729018341579; Tue, 15 Oct 2024 11:52:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4IRS8nhPSbHHMGAr1esFr/1sORzxV4dHhLUSla/ENaT5Qe2x1SJKm+qMzu8Ky2rtxd6imbQ== X-Received: by 2002:a05:6402:520f:b0:5c5:ba82:c3b1 with SMTP id 4fb4d7f45d1cf-5c95ac4e471mr9746938a12.29.1729018341069; Tue, 15 Oct 2024 11:52:21 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 11:52:20 -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_J=C3=A4rvinen?= , Andy Shevchenko , Mostafa Saleh , Jason Gunthorpe , Yi Liu , Christian Brauner , Ankit Agrawal , Eric Auger , Reinette Chatre , Ye Bin , =?utf-8?q?Marek_Marczykowski-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 13/13] PCI: Deprecate pci_intx(), pcim_intx() Date: Tue, 15 Oct 2024 20:51:23 +0200 Message-ID: <20241015185124.64726-14-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> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pci_intx() and its managed counterpart pcim_intx() only exist for older drivers which have not been ported yet for various reasons. Future drivers should preferably use pci_alloc_irq_vectors(). Mark pci_intx() and pcim_intx() as deprecated and encourage usage of pci_alloc_irq_vectors() in its place. Signed-off-by: Philipp Stanner --- drivers/pci/devres.c | 5 ++++- drivers/pci/pci.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 6f8f712fe34e..4c76fc063104 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -435,7 +435,7 @@ static struct pcim_intx_devres *get_or_create_intx_devres(struct device *dev) } /** - * pcim_intx - managed pci_intx() + * pcim_intx - managed pci_intx() (DEPRECATED) * @pdev: the PCI device to operate on * @enable: boolean: whether to enable or disable PCI INTx * @@ -443,6 +443,9 @@ static struct pcim_intx_devres *get_or_create_intx_devres(struct device *dev) * * Enable/disable PCI INTx for device @pdev. * Restore the original state on driver detach. + * + * This function is DEPRECATED. Do not use it in new code. + * Use pci_alloc_irq_vectors() instead (there is no managed version, currently). */ int pcim_intx(struct pci_dev *pdev, int enable) { diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 7ce1d0e3a1d5..dc69e23b8982 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4477,11 +4477,14 @@ void pci_disable_parity(struct pci_dev *dev) } /** - * pci_intx - enables/disables PCI INTx for device dev + * pci_intx - enables/disables PCI INTx for device dev (DEPRECATED) * @pdev: the PCI device to operate on * @enable: boolean: whether to enable or disable PCI INTx * * Enables/disables PCI INTx for device @pdev + * + * This function is DEPRECATED. Do not use it in new code. + * Use pci_alloc_irq_vectors() instead. */ void pci_intx(struct pci_dev *pdev, int enable) {