From patchwork Wed Oct 9 08:35:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13827852 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 96D27192D8E for ; Wed, 9 Oct 2024 08:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728463053; cv=none; b=MCwXa19O+Rkn6xv1PQzWLjCqm0O8DSkP30JbXgyaC7ED9GXzdEd/c+tcSPlYBsc2OTTlkOfp7/xm6uRawsmX1eLuSgXGwWOlJSPhzUz7H/Go8UIh5X05NOVTY81U31VO2WYhqtOvEJN37vhXXuX/4wa4XzkgILx04RpMkSGn64E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728463053; c=relaxed/simple; bh=Q3eFd3k4APy5f74oOu2AfX19IhHLwjoIJ+ui5cmZ70c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sQjvcGVlfTZSWkcr/28JPTJH+3cJxDd5VnuVOCdLnAEOKzDgCygOVzkV1J1THb8zXN9UoUxsV2lGEbgc3Pwp+XcY0AzvmoS6F72dCbSBnCXprPYfIW6kcrKJ4AZ6fWeAP8O496fCckyxXClr6nHUuAGvAqsLlpBZdpUXMydUv2I= 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=Srb50Y4O; arc=none smtp.client-ip=170.10.129.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="Srb50Y4O" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728463049; 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=Gnue2+gdLv6DtZCMne1e2l6o8jQm3Jw9vQelKyozb04=; b=Srb50Y4ON3bxg9YgaLBVaM/Z0S6heX++pbvznttEVf/+ZgisX6FeJF2g/GCxngB6ODXlMk r6LWnOM2PI9IGB2vN5mDmK1CQtfZ55x08Od7slIejJeDnTwj9xqORM0ZSAQVqhbD77GKyB zffJ4+sZp17pMJvw3fbtIFJiCC3w758= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-361-qMTPzL2TMW6q6zSvjmDhLg-1; Wed, 09 Oct 2024 04:37:25 -0400 X-MC-Unique: qMTPzL2TMW6q6zSvjmDhLg-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7acdd745756so1285302685a.3 for ; Wed, 09 Oct 2024 01:37:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728463045; x=1729067845; 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=Gnue2+gdLv6DtZCMne1e2l6o8jQm3Jw9vQelKyozb04=; b=kV2/rYAUgk16vFhMAnmxo73LAq/V6vXDUc2pwSIJdWgmB44Q7c8PX6NzdnnZdEXjcJ z24on9ABPxTo31Xiv4asFBogxxNl544oKGWhA8QqDRP9I5yvvsLNDFoEE2U4rimD7az5 NvMdIoLZ0PIUSkZN9z0f3MtgvxduuvI6hZrLq7x4Hti6LpWlRpVdyNLBvKCaXMB8Jdy3 7Tf46uLr0WfOYuOMdkQ2oYDJD1x+OBNGaPEdJvfRBNWuiJ8QAUab4rcwc2fAL6NvZQQd kfGGhSN2h8vA584UlMzjoKSFPZLyp63TPuvbh5gJygIZ3cgXrEHwJV3uhh1z9GC3qtIi M7TA== X-Forwarded-Encrypted: i=1; AJvYcCUJ6JX/CA51yXVz4zUedcEIjds6uJJUKRw7tRG/XpIGSdVuLBJssqw++ohdPuE2AUsy24o=@vger.kernel.org X-Gm-Message-State: AOJu0YyVe1DlG+eSSnEsEkCpUNlnlIJdLlHLJVgfsSLSEF3v+LsyVWvL KmLSB3IL/gxArvzxf5DlKY3HSdmKlAVt8y476/MCMc7MO2eyIS3R9VmCo+QkiWaaTX1ptkW2t9m vqB74T+J4tup+7Siu+SEKP2ZkzY9zR1hEffdQdwPa5bdTyrbUKw== X-Received: by 2002:a05:620a:1a8e:b0:7a9:8679:993 with SMTP id af79cd13be357-7b07952776bmr283207085a.13.1728463044892; Wed, 09 Oct 2024 01:37:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8iMtbRuVOzUsf8z3rLAbJgY7Sw8kyfd9EYZaEc1PG6rkZnmlQM8I/F6cPMCjVwViEvjtORQ== X-Received: by 2002:a05:620a:1a8e:b0:7a9:8679:993 with SMTP id af79cd13be357-7b07952776bmr283201785a.13.1728463044398; Wed, 09 Oct 2024 01:37:24 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7ae75615aa2sm439643585a.14.2024.10.09.01.37.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 01:37:24 -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 , Philipp Stanner , Mario Limonciello , Chen Ni , Ricky Wu , Al Viro , Breno Leitao , Kevin Tian , Thomas Gleixner , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Mostafa Saleh , Andy Shevchenko , Hannes Reinecke , John Garry , Soumya Negi , Jason Gunthorpe , Yi Liu , "Dr. David Alan Gilbert" , Christian Brauner , Ankit Agrawal , Reinette Chatre , Eric Auger , Ye Bin , =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Pierre-Louis Bossart , Maarten Lankhorst , Kai Vehmanen , Peter Ujfalusi , Rui Salvaterra , Marc Zyngier 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, linux-staging@lists.linux.dev, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, linux-sound@vger.kernel.org Subject: [RFC PATCH 05/13] net/ntb: Use never-managed version of pci_intx() Date: Wed, 9 Oct 2024 10:35:11 +0200 Message-ID: <20241009083519.10088-6-pstanner@redhat.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241009083519.10088-1-pstanner@redhat.com> References: <20241009083519.10088-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() 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. hw/amd and how/intel enable their PCI-Device with pci_enable_device(). Thus, they need the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Signed-off-by: Philipp Stanner Acked-by: Shyam Sundar S K #for ntb_hw_amd.c Acked-by: Shyam Sundar S K #for ntb_hw_amd.c --- drivers/ntb/hw/amd/ntb_hw_amd.c | 4 ++-- drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c index d687e8c2cc78..b146f170e839 100644 --- a/drivers/ntb/hw/amd/ntb_hw_amd.c +++ b/drivers/ntb/hw/amd/ntb_hw_amd.c @@ -791,7 +791,7 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev, err_msi_enable: /* Try to set up intx irq */ - pci_intx(pdev, 1); + pci_intx_unmanaged(pdev, 1); rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED, "ndev_irq_isr", ndev); @@ -831,7 +831,7 @@ static void ndev_deinit_isr(struct amd_ntb_dev *ndev) if (pci_dev_msi_enabled(pdev)) pci_disable_msi(pdev); else - pci_intx(pdev, 0); + pci_intx_unmanaged(pdev, 0); } } diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c b/drivers/ntb/hw/intel/ntb_hw_gen1.c index 079b8cd79785..9ad9d7fe227e 100644 --- a/drivers/ntb/hw/intel/ntb_hw_gen1.c +++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c @@ -445,7 +445,7 @@ int ndev_init_isr(struct intel_ntb_dev *ndev, /* Try to set up intx irq */ - pci_intx(pdev, 1); + pci_intx_unmanaged(pdev, 1); rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED, "ndev_irq_isr", ndev);