From patchwork Mon Aug 5 08:01:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753239 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 D695C150997 for ; Mon, 5 Aug 2024 08:02:11 +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=1722844933; cv=none; b=BUdd/aOXew4y5APnFGNmaHJCPr0LIifpDeE8/gTKJoGK5CHDxdS/yBCCJ33CQ5GAl3QxXWVK/s02aZ8BmiztopyHvbEmkJdNrvB2Ige3r/z3A1U2AmiZRlHGW3yUp61x47EgVfefRfiQHGKdyff5P78ODU6E7VFVdrAdZtBFXJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844933; c=relaxed/simple; bh=PMvC17bGpWpI73UNcLQbu72jMyBfAq60m2YMRm7gpdE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pNSAPHr7eolD+GyvJ2PMXWcybtZbNvQsHZRF4Mtx3xd2Mqa84eI8gLRc6vzh1vXnKTxOjvbCWHJ4L1d9i818SDvw0y+hEG5naeVe6TAa+sSKBRdPsQy+ebpi9ERb8NSARGGEUZpYE+MDfaCR1oTw+VzdOvaQTGZjhJug2AEaiXI= 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=Ru29SQiW; 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="Ru29SQiW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844930; 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=fCKgXS8g88Bg2YGymWSAuOupDyZ6pDfS4Oy1WWS2It4=; b=Ru29SQiWVU8YkKzVFlDLGVIuqCETpfEcSMr6fQVkKa3i0LH3SRNG0o6MTg0RltrKUA89J/ YCdTEnIvSi9+IRK8WPAFlGzlW87Y2MzaUTpntY6jRCcDuTylihuurLhPcHVFNW+rRlaQMM s6V7LbL3B1z6GuAJNT4bnnc1861bgBY= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-202-PL61tcbLOBqCOs_jW8c3WQ-1; Mon, 05 Aug 2024 04:02:07 -0400 X-MC-Unique: PL61tcbLOBqCOs_jW8c3WQ-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5a281e55710so2064185a12.1 for ; Mon, 05 Aug 2024 01:02:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844926; x=1723449726; 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=fCKgXS8g88Bg2YGymWSAuOupDyZ6pDfS4Oy1WWS2It4=; b=a0EBkCrF10U7BBJBZNQVKrjRxe1dQ1B2N+YKxP0e8GIWTwx4hany0wQNL7YxKDrzFA VEzVVYDWk7PR0t08KKw00kzsUkX0ifsBPl0YQQN4+aaTIICf55ULvuKNYOH5y4BrGnpo g7G/F3Jo4wRclwtnHNcjI8WJFlZvH4GrCJP0c55zKzGW8lUqSTwCQiA0p02KsruQe+6U bH18NSOE3bGLVOLzCrUfM9zpcFiVdSqjhiRXDzedQY4z4KTZpmJ0LPj5wl5wjAT1VqyR xuVTPaPF4GdRgHg4y+MiCEfEb2JDDX5FvjBGvigfLsKHmenBz+nnaEdV2bTPs8ishYtM K9LQ== X-Forwarded-Encrypted: i=1; AJvYcCUDXl3/6+z/+E3mUD2DbHc8963f1GcyWha4mjiBCzWycQtWcZWUhBXse9YRjtvpsMZKpmOrC9y71BAN8IlXbW6PkxxIXS2rI7rW X-Gm-Message-State: AOJu0YxXASjfl4T7ehsy/AVQ54M8gZWPH4FuI4c6LnBGEdSsfIBywVjQ pKUjx38Ojp9b3REowY3xS8F3dCJ0tOWu0rkD6NHoQGUeg2ImPXnnsUDuvxKlCgN2Bbep+SE3btL IIdW5ujOFxuvCH081URTZJQpH8QNIahWIDshpIldPCsqKtWkEnVQMFOMjgA== X-Received: by 2002:a17:906:cac7:b0:a7a:ab8a:38b with SMTP id a640c23a62f3a-a7dc50a036emr405426466b.7.1722844925250; Mon, 05 Aug 2024 01:02:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8B0uAdpCjmN8RXKqb6GrkT9cJblAYXyonWs0YpjO3v6slHT4MqkSoaoDsG7XIcg/iI+6TwA== X-Received: by 2002:a17:906:cac7:b0:a7a:ab8a:38b with SMTP id a640c23a62f3a-a7dc50a036emr405424666b.7.1722844924726; Mon, 05 Aug 2024 01:02:04 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:04 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 01/10] PCI: Make pcim_request_all_regions() a public function Date: Mon, 5 Aug 2024 10:01:28 +0200 Message-ID: <20240805080150.9739-3-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In order to remove the deprecated function pcim_iomap_regions_request_all(), a few drivers need an interface to request all BARs a PCI-Device offers. Make pcim_request_all_regions() a public interface. Signed-off-by: Philipp Stanner Reviewed-by: Damien Le Moal --- drivers/pci/devres.c | 3 ++- include/linux/pci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 3780a9f9ec00..0ec2b23e6cac 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -932,7 +932,7 @@ static void pcim_release_all_regions(struct pci_dev *pdev) * desired, release individual regions with pcim_release_region() or all of * them at once with pcim_release_all_regions(). */ -static int pcim_request_all_regions(struct pci_dev *pdev, const char *name) +int pcim_request_all_regions(struct pci_dev *pdev, const char *name) { int ret; int bar; @@ -950,6 +950,7 @@ static int pcim_request_all_regions(struct pci_dev *pdev, const char *name) return ret; } +EXPORT_SYMBOL(pcim_request_all_regions); /** * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones diff --git a/include/linux/pci.h b/include/linux/pci.h index 4cf89a4b4cbc..5b5856ba63e1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2289,6 +2289,7 @@ static inline void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) { } #endif +int pcim_request_all_regions(struct pci_dev *pdev, const char *name); void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); From patchwork Mon Aug 5 08:01:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753238 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 6FF4214EC79 for ; Mon, 5 Aug 2024 08:02:11 +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=1722844933; cv=none; b=k6sCu708GD1cr0Q1hB3+QQDVqbDkbpUIXYY4WcM91/N5JvKYlFcl/IJGQISMzmvPCc383u2ra81YPGUc32EcCA3Zkj4uelt94PE5kZBSoxLqyFcmG/ua8S0Poge1R+AES81MonvPx0d4WsOkh5xnAFvqekfyBhDAQTjSkxe26kM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844933; c=relaxed/simple; bh=zFYt4YA/nxrpBwmvCREd85ce7Gyci93GVdK3Ep0M2pA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eBJ8CuQpYdHyisWpfWFM5UQEKGTeOh5SgmQFiVpDiRcLj7NrF/RXIsIADd03mEDyaTwsTag/9aHYdFiIuxGZkJfPAdD9ledPo1j/q9Wz+gzusjpg+1XYDydkSaZYAFiRo9j/Sl60DT9AX9rFSgqJpM/Bs82BJyhGiVCraNJBv0I= 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=bEgTZ285; 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="bEgTZ285" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844930; 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=18fF+PB7j6Y1mDUBH32CYamjOEignK7RbqTPKzQv2/I=; b=bEgTZ285B2m3nrSYwgg8AlNP7l2KHr6ILDI6y3gRdC64aMkfKXoIw984HoXUIIQPTsGfK1 FjMzRhWWzqpqmbJvsqrnZWVoKMgeiIU/1Eybvi/q6tiR7NazRhbbmUDOo4PB71/cq6IDno mXfZmC8PCbuZlYGo7BbMXSiZEBNj9ec= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-49-JWsoIxMCNlGAg5WOqBDS5w-1; Mon, 05 Aug 2024 04:02:08 -0400 X-MC-Unique: JWsoIxMCNlGAg5WOqBDS5w-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5b78e856a85so608118a12.2 for ; Mon, 05 Aug 2024 01:02:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844927; x=1723449727; 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=18fF+PB7j6Y1mDUBH32CYamjOEignK7RbqTPKzQv2/I=; b=K9xbV309qHlf2g0T7PVQnOn4Z8ZsXE+dj3D/56QkLMMHjai/8hV24AmGvVU9O6KdvD 3U9Yf9ExoRFQ99mKDKC0HHKbd4xsbwErn+gK1tnHAvhDfYIjYdIsaDw0LiK9AYjDgyfa mFOlK4e8YvFrWUwbVxkRp4/XZXv+RWibcqs5zrfXM2wCpExdlkgcZKZjHuPLeIjQYrrA BMEE2N6jDw13ky6erWT6AL5pC6441fxtDb3UCSGuxBNN+AJPKs9yjDZ8LbeHic4l2knu xHc6m107+DfYEyMOU2zaOd0PJoTkksWe6v8XVYn8xUJWiQKM0p/sW2CMdAg6nEVfD9qb 3/IQ== X-Forwarded-Encrypted: i=1; AJvYcCWMMkWWMZcLyEAB3SQBGxf9jqbm4sG/gSDFFnbYhLVrXLgmGvymBB2IWIhiZdQct4mph3/V6aYCC+8=@vger.kernel.org X-Gm-Message-State: AOJu0Yx49RGWPawT9TZlpdk8wDUcnGWB4e2RPoLZkYQP4nbldbLR7tNn gJ9CpkuNaaeaQ4KLSAzda6F3aE+TKfQTXClGRlbVdAuSnb6dGEd+AJCX6JlOvHspsSlBsiB4iBM TYAf0g8F0wOzexRT4Ni8l4IDkFduOvbR7GN3THKEaJQVn0Oi0OVfXhl0mNg== X-Received: by 2002:a17:907:3da7:b0:a7d:a4d2:a2a7 with SMTP id a640c23a62f3a-a7dc4e50c01mr456319166b.3.1722844927329; Mon, 05 Aug 2024 01:02:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHkXCT45DdZBHWQzoU0ORUWv+2ODBb2GUKjo+7GIEAxb39igJSvCRB2n7e9CZjTjRwueB8GGw== X-Received: by 2002:a17:907:3da7:b0:a7d:a4d2:a2a7 with SMTP id a640c23a62f3a-a7dc4e50c01mr456317566b.3.1722844926788; Mon, 05 Aug 2024 01:02:06 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:06 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 02/10] ata: ahci: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:29 +0200 Message-ID: <20240805080150.9739-4-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_regions_request_all() and pcim_iomap_table() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner Acked-by: Damien Le Moal --- drivers/ata/acard-ahci.c | 6 ++++-- drivers/ata/ahci.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c index 547f56341705..3999305b5356 100644 --- a/drivers/ata/acard-ahci.c +++ b/drivers/ata/acard-ahci.c @@ -370,7 +370,7 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ - rc = pcim_iomap_regions_request_all(pdev, 1 << AHCI_PCI_BAR, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) @@ -386,7 +386,9 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id if (!(hpriv->flags & AHCI_HFLAG_NO_MSI)) pci_enable_msi(pdev); - hpriv->mmio = pcim_iomap_table(pdev)[AHCI_PCI_BAR]; + hpriv->mmio = pcim_iomap(pdev, AHCI_PCI_BAR, 0); + if (!hpriv->mmio) + return -ENOMEM; /* save initial config */ ahci_save_initial_config(&pdev->dev, hpriv); diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index a05c17249448..905af6b68d80 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1869,7 +1869,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ - rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) @@ -1893,7 +1893,9 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (ahci_sb600_enable_64bit(pdev)) hpriv->flags &= ~AHCI_HFLAG_32BIT_ONLY; - hpriv->mmio = pcim_iomap_table(pdev)[ahci_pci_bar]; + hpriv->mmio = pcim_iomap(pdev, ahci_pci_bar, 0); + if (!hpriv->mmio) + return -ENOMEM; /* detect remapped nvme devices */ ahci_remap_check(pdev, ahci_pci_bar, hpriv); From patchwork Mon Aug 5 08:01:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753240 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 5F29414F9D9 for ; Mon, 5 Aug 2024 08:02:13 +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=1722844935; cv=none; b=HoYeTrUCIjkqa/nCUtn3UokgKYJldXpVOTaaDn1M7ILdG7cfkFZPsTWuivRNojrfN0KJekP8M7eEdXBdEga+bra/II3ChGfZBbgDTPKPQI1xJoooD3NAqEMBix+uRw2URsOaGLAuleKVNtS5ekHD6OjewASKjB1ZJZ/52RAWuGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844935; c=relaxed/simple; bh=o+aKZkNhYSkxjsiBLxN92YZQoCjUKOLuz8fa+WUkC9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eKWBbVEb4/8jkFRMmCXOlDP9S7N9S7aSejNBIO7X1T3i/vYI1zNrcw58DPRjV7V2cQEZYGcu/l2qmHW62kedXqQbK54AkPc/sQR2Q8V2Y4S1qJGUXStTPUYEpe9vObQpeH1OoAk0CYAYGj2N1l/qdeCwhtlJsLCHEiDmYtB5l3s= 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=WlI5ACIV; 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="WlI5ACIV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844932; 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=QRt7X9facTlkLTpy0pTbVW8nFCV0woh1LarfaLaM2gE=; b=WlI5ACIV23L/vNSSr++qqUKz2p28D31WvSLo+XPA7hXCyPMLelhVD5o1OC3KIlgNCP11hE MP4Y08EIJaZix92MJo9iGcPBgPHfCYiUqOGzwfjAryW+JASnbTkTbT8Ebrd9LEjhjO38D/ 8SnfF1PLOzDTaNkVSzVIAkYG+jbWL3U= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-507-sXU330DfPSSH7zCaX7onuw-1; Mon, 05 Aug 2024 04:02:11 -0400 X-MC-Unique: sXU330DfPSSH7zCaX7onuw-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-52f03635146so1225798e87.1 for ; Mon, 05 Aug 2024 01:02:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844929; x=1723449729; 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=QRt7X9facTlkLTpy0pTbVW8nFCV0woh1LarfaLaM2gE=; b=LRpvE712/dZAkU3nmFNFIMMfVxmB6mwFdZcm03f/dL31vHwy9i740Tzn72EnHKJJfY nd32mqPOFP3Y/ftHlUuYBPbBse+03jenisXbnc+mRyMwS8ysxoUh4bU77Zw6PA1KeLgO H6Z5f976w9fsSPQV+MXkHyzfW4sZIHwINE0bB8WEKENccII/lPCuRUdShy5Hw+QRIn2S gBdgRvAMOXAk6pkq8BFbQ1r+3QSRmRoorZLNz6qCKTkPLvSkm13eMXPmE0Uxyq4tRRMa EQs7xAvIJLrE6NKRdhhCRdV/v102Wnh2vPZKdAedwLQ8azjsXW+kkjaPwUQ3b6QEbcvu ugzA== X-Forwarded-Encrypted: i=1; AJvYcCW7euC8YtnWkfvCIQvH+5ipo0UjbudyZIJHDCzMFT4fGWICm60oFO9dJv3rXWXqz7WjjVRd+5Ca0Xk=@vger.kernel.org X-Gm-Message-State: AOJu0Yw7JE4g7lcapPwBMiOwWkMrSYgNQ94I2aryAYz2TbBFa5qzjdd5 HHZ9QdAEjwl0ke9sG84Yb9KRE1QQMLzImZRYrNP+SfFiKMmb8dVHf3D6DiV1b9XYsMdUUl9zKCK dDGA9fuSB4JZwXdymDV7zsDVAKSz9ZsmerNQq31ZDzw2xvqQOOngHEvP4Ig== X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr3610733e87.3.1722844929297; Mon, 05 Aug 2024 01:02:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZSQjMt/3VkbWFUtV5g6ia/+URDLy3tOpCumDaNeyTb8b7/S19GgTcmw6UBXa+EC6uh4peLA== X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr3610684e87.3.1722844928639; Mon, 05 Aug 2024 01:02:08 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:08 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 03/10] crypto: qat - replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:30 +0200 Message-ID: <20240805080150.9739-5-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner --- drivers/crypto/intel/qat/qat_420xx/adf_drv.c | 11 ++++++++--- drivers/crypto/intel/qat/qat_4xxx/adf_drv.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_420xx/adf_drv.c b/drivers/crypto/intel/qat/qat_420xx/adf_drv.c index 2a3598409eeb..c9edae8fdb04 100644 --- a/drivers/crypto/intel/qat/qat_420xx/adf_drv.c +++ b/drivers/crypto/intel/qat/qat_420xx/adf_drv.c @@ -129,16 +129,21 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask = pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; - ret = pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret = pcim_request_all_regions(pdev, pci_name(pdev)); if (ret) { - dev_err(&pdev->dev, "Failed to map pci regions.\n"); + dev_err(&pdev->dev, "Failed to request PCI regions.\n"); goto out_err; } i = 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar = &accel_pci_dev->pci_bars[i++]; - bar->virt_addr = pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr = pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret = -ENOMEM; + goto out_err; + } } pci_set_master(pdev); diff --git a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c b/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c index d26564cebdec..18d8819f1795 100644 --- a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c +++ b/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c @@ -131,16 +131,21 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask = pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; - ret = pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret = pcim_request_all_regions(pdev, pci_name(pdev)); if (ret) { - dev_err(&pdev->dev, "Failed to map pci regions.\n"); + dev_err(&pdev->dev, "Failed to request PCI regions.\n"); goto out_err; } i = 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar = &accel_pci_dev->pci_bars[i++]; - bar->virt_addr = pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr = pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret = -ENOMEM; + goto out_err; + } } pci_set_master(pdev); From patchwork Mon Aug 5 08:01:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753241 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 BA0231547C4 for ; Mon, 5 Aug 2024 08:02:14 +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=1722844936; cv=none; b=bzqf7VoZut1W9TTyONFO42hYlQAnnOnEYHMu9FmPVH82iSB9FsR//9P3OXGcRPa55pYiEnhavGx+YcVrxSmeVZFcPjSAxdmAJtYNi8H3yqi2Q0gzrQR1nKFcVG/tJhq4/yN2Y6/hjV/8XXxnRR+Gp8pP/0nvJBnQZCJSmS+qZog= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844936; c=relaxed/simple; bh=sx3ZEwTjacZymq7l5dYNsMmwiEx06cPeBRmHfSff+fI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M/dnp8z4jAwP+zoRo3/iIaEbKIlIUqg/z/RsMOO6Icicvl+vCRCQOfX5u42QMdVbvO6wiqONezu3QtdcNA8bZ24XyvEnKHSs4aPNuRsmZSuMuRk/ZZAo0MxPHpRG8kadR8Dinu2qBmfDHqH4p/G2Sp8Ic+bAWUqvklWwFktk5sw= 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=BKlfW4A9; 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="BKlfW4A9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844933; 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=i/TqVki/K+bVEwX1UU3KMe0GQzdgKV3EwUwnH23Fjlo=; b=BKlfW4A9EkNtkMnLLFw7UYhr/ufm/lTE0ZtqHlsyd2ch8fpeYd36OPtgRcKO+8LOVFv3ZH OB3kXtcIzLv1Lg8pyhXJ2raa+FYjDBYN/I/DoMndAIaOYPQXeJ75UsBC+QdA34EUNAZ8C7 8wfU/BSdwv1K5vpEdp1wt0iee9J8iCo= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-32-wTjY1ZObP2S_kt2ZUrfG1g-1; Mon, 05 Aug 2024 04:02:12 -0400 X-MC-Unique: wTjY1ZObP2S_kt2ZUrfG1g-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a7aa22266aaso95459866b.1 for ; Mon, 05 Aug 2024 01:02:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844931; x=1723449731; 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=i/TqVki/K+bVEwX1UU3KMe0GQzdgKV3EwUwnH23Fjlo=; b=M5foDJ87y0sYHDG/PpdSIesc+r4E8FSAT56HSnfwru9mo3hmAIDIJ3/oh1QD5wXoOz 1yUcgcjWq1uLB3KYe5txinEppsY2qAMfXZmnA+EiS9xdoAFR8Wpl7FQ3ewz3Vv+5ZMqf mY5gTueBzEDQRzvvPKKKaOaIJdtn6giC6MOj2V9gIXoN4n5/ocF4O14SBNK9ZzImrqXf AyHuvRVU7Q85gROmZrdRS0Fea1d+VtTVL83iA7a1A6n+g/gUEB6BjPXrWogcqcgazvHW cjTWvCzW5l80Jcir+4y5+h8IrEkCe5xljaCyibDikcmA9dk9/fCQtsI/fZiNEb8twUEe npXA== X-Forwarded-Encrypted: i=1; AJvYcCWjaHmb41tjLnK/uNC2wjFMsPz+31+ZTudt6b5pCaf1KtPtJhxPkoHscGVoVt0OZwoG9VjOpqLKcy8=@vger.kernel.org X-Gm-Message-State: AOJu0YyeuZIgIdTe6KUlHQxDfiSOmLMlRdLz2LBl8wzGMvVwAUrfAVqi b76sDI+QRn8kDwIwXo6dv/wo/fMv1H9mH+bVynh7Cf1OlnaYbmvjz7d4/60aPEvyeeWLDVXAjRW GEE1N7Jj7Kql2cqYHyHx7cb/u1e5eOWK7hCT/LyyjT5fJmjHlI1Ycy30xag== X-Received: by 2002:a17:907:3faa:b0:a7d:a4d2:a2c2 with SMTP id a640c23a62f3a-a7dc5167bcfmr402223066b.10.1722844931004; Mon, 05 Aug 2024 01:02:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYjjLsJD48h2GecBYBR7wt9098g8Cow53ABCQrETBiWavHTFkjy//1sxrj05YHxx3EiitJTQ== X-Received: by 2002:a17:907:3faa:b0:a7d:a4d2:a2c2 with SMTP id a640c23a62f3a-a7dc5167bcfmr402222366b.10.1722844930599; Mon, 05 Aug 2024 01:02:10 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:10 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 04/10] crypto: marvell - replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:31 +0200 Message-ID: <20240805080150.9739-6-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner --- drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 14 +++++++++----- drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c | 13 +++++++++---- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c index 400e36d9908f..94d0e73e42de 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c @@ -739,18 +739,22 @@ static int otx2_cptpf_probe(struct pci_dev *pdev, dev_err(dev, "Unable to get usable DMA configuration\n"); goto clear_drvdata; } - /* Map PF's configuration registers */ - err = pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM, - OTX2_CPT_DRV_NAME); + err = pcim_request_all_regions(pdev, OTX2_CPT_DRV_NAME); if (err) { - dev_err(dev, "Couldn't get PCI resources 0x%x\n", err); + dev_err(dev, "Couldn't request PCI resources 0x%x\n", err); goto clear_drvdata; } pci_set_master(pdev); pci_set_drvdata(pdev, cptpf); cptpf->pdev = pdev; - cptpf->reg_base = pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM]; + /* Map PF's configuration registers */ + cptpf->reg_base = pcim_iomap(pdev, PCI_PF_REG_BAR_NUM, 0); + if (!cptpf->reg_base) { + err = -ENOMEM; + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", err); + goto clear_drvdata; + } /* Check if AF driver is up, otherwise defer probe */ err = cpt_is_pf_usable(cptpf); diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c index 527d34cc258b..d0b6ee901f62 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c @@ -358,9 +358,8 @@ static int otx2_cptvf_probe(struct pci_dev *pdev, dev_err(dev, "Unable to get usable DMA configuration\n"); goto clear_drvdata; } - /* Map VF's configuration registers */ - ret = pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM, - OTX2_CPTVF_DRV_NAME); + + ret = pcim_request_all_regions(pdev, OTX2_CPTVF_DRV_NAME); if (ret) { dev_err(dev, "Couldn't get PCI resources 0x%x\n", ret); goto clear_drvdata; @@ -369,7 +368,13 @@ static int otx2_cptvf_probe(struct pci_dev *pdev, pci_set_drvdata(pdev, cptvf); cptvf->pdev = pdev; - cptvf->reg_base = pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM]; + /* Map VF's configuration registers */ + cptvf->reg_base = pcim_iomap(pdev, PCI_PF_REG_BAR_NUM, 0); + if (!cptvf->reg_base) { + ret = -ENOMEM; + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", ret); + goto clear_drvdata; + } otx2_cpt_set_hw_caps(pdev, &cptvf->cap_flag); From patchwork Mon Aug 5 08:01:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753242 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 93478155346 for ; Mon, 5 Aug 2024 08:02:17 +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=1722844939; cv=none; b=WQD2LS5r1z3VPlpHw/jP/IaOJlXD0Js4UPT//FJ+i3B9Q07dpedB9sVRP9i4dpDb36CElDOUmp3i5QEhBXJ92/xX4fqzosn0zxVciMurhnRECwFVvSlxCeb5bnKWvlvWApSDe0OIkIbyxW3+OIpFsD4QV9MU0/LC5MVnFZvooXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844939; c=relaxed/simple; bh=T/Lr5R3ZpRsNgk4LNzf4i3JOmIq6wzNv8zvkRdHooAQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TZPgT8GVS8QdqC62/nwixPY9A2g/gCdJ7XRxksiEIR10TFdHWHr4adPv/IvWskDP33X52rdjF82YG3hCshbVDgx9dpqYp1JIK+Q7S5Z0rXnSIc8nDVaDyojP24AT2AQKD7m06RWElUQPZjnpW5195D71Ng2cKSGUOH76wHJizaM= 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=JOHj6gTS; 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="JOHj6gTS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844936; 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=VIcu667vSRZRiKEHakO3GAIgbzPtgHQvNS3his8mZEo=; b=JOHj6gTSxw2RHUI3fLDTy2KoN14j6gEqkXxo/Y/jmfl7g40YvTc108L7xM7vteXDGjF2uA pJ291aZvBDpMd6NqVgFhkyS3hTsnJnTIk5+zvZ4/Dfr8KPB9LW3k4b3vwSuTD0v5igK4Qz +tbzWQ6tV82P+XkTaWdx+jEuPcOIAuQ= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647-rWh-NxzEO66d3_vqPiPZ5w-1; Mon, 05 Aug 2024 04:02:15 -0400 X-MC-Unique: rWh-NxzEO66d3_vqPiPZ5w-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-52f028a33aaso1063484e87.3 for ; Mon, 05 Aug 2024 01:02:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844934; x=1723449734; 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=VIcu667vSRZRiKEHakO3GAIgbzPtgHQvNS3his8mZEo=; b=FVuMUDwcYuv/gUqTar7lzfteTlYTPdts21Etv+AE4UecT+l2MtRVgdvk8/B4c9Kcs8 Dd3uoZfi8nEiGIx5SVGk85SKrtvkig/xFJUlHXsNncqwWwNrwFkGOKfvUUC37dl/iYaH 1q34KMak8pNBMPnbq5PvochynfPx2QsRJT04GQCDshb9Fp8bI7ErcqWDeTaijRkBMYwT gW1ojPXGEUNnBlDR2Y0ik8R1dgzb7mzuXSXniFxrgUPrzRZvbCqJoe/44NOKBNa5tZ55 pffTvFXqXfMpQ5qEt8jiIGz4VV2guAEDd+p+t+xfOqYZymF54q38mTEKd0KMjG8dJ/af l77Q== X-Forwarded-Encrypted: i=1; AJvYcCXMMLkNwlHN88tRhOm8gNMrsjRcd8upzoXXPjclRNdvKWX8ChDSXvqk0ayMUe+go039ZFWHJrr8xZk=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5WHnQVVn0O8RyS7qmscQv43nxfM/H2Df+e+lhxU1GXJ3fO4Kj l0C8mXblOCIdHDbMiY/nIXX0pkPhozC/UKzyNkhU4JPb/lT0avFUm7FVYSwYr9aXJjR14bxXK7A +y82PEMPO0WD3HwkUWXcAFG9qsJynenIxYNJz47/a+7k4VsijWUDEmmkOIA== X-Received: by 2002:a05:6512:1307:b0:52e:ccf5:7c3e with SMTP id 2adb3069b0e04-530bb3bd143mr3696389e87.7.1722844933755; Mon, 05 Aug 2024 01:02:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwcaUohyPPqlQalc7Ds7xBVbw16Nwe2cO8DiX+lGZ7pO2pVwTP2h5T41+23RRZFgk9XX2iTg== X-Received: by 2002:a05:6512:1307:b0:52e:ccf5:7c3e with SMTP id 2adb3069b0e04-530bb3bd143mr3696318e87.7.1722844932669; Mon, 05 Aug 2024 01:02:12 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:12 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 05/10] intel_th: pci: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:32 +0200 Message-ID: <20240805080150.9739-7-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner --- drivers/hwtracing/intel_th/pci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index 0d7b9839e5b6..e9d8d28e055f 100644 --- a/drivers/hwtracing/intel_th/pci.c +++ b/drivers/hwtracing/intel_th/pci.c @@ -23,7 +23,6 @@ enum { TH_PCI_RTIT_BAR = 4, }; -#define BAR_MASK (BIT(TH_PCI_CONFIG_BAR) | BIT(TH_PCI_STH_SW_BAR)) #define PCI_REG_NPKDSC 0x80 #define NPKDSC_TSACT BIT(5) @@ -83,10 +82,16 @@ static int intel_th_pci_probe(struct pci_dev *pdev, if (err) return err; - err = pcim_iomap_regions_request_all(pdev, BAR_MASK, DRIVER_NAME); + err = pcim_request_all_regions(pdev, DRIVER_NAME); if (err) return err; + if (!pcim_iomap(pdev, TH_PCI_CONFIG_BAR, 0)) + return -ENOMEM; + + if (!pcim_iomap(pdev, TH_PCI_STH_SW_BAR, 0)) + return -ENOMEM; + if (pdev->resource[TH_PCI_RTIT_BAR].start) { resource[TH_MMIO_RTIT] = pdev->resource[TH_PCI_RTIT_BAR]; r++; From patchwork Mon Aug 5 08:01:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753243 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 BD20C154BFF for ; Mon, 5 Aug 2024 08:02:18 +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=1722844940; cv=none; b=JIl/URuDb82FXRePpKrkHmUQYb+LBglmJLq2+LyTmjvQCKf8K9hcRIUtAWMTl7Ll+MWMwJV7qvM1YICY6Ce07jWcmrTxPCBxYNo5LLNGQS2BoKpv3dxASwyucp0N19RfcflUCkwSO9wkFmvne2/13riD7mX7ujk+PTCUddKEsLc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844940; c=relaxed/simple; bh=Yo+Ns2b3URhNU5TB+CvEDymuFVQ4WXMZyjfGA5NqkhE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ag7vY6Tdmj19DCRXX3EYtOynTOzGVQrsKhHVYQWP0U7F8/2eilDZuq5GfK5sY1+zNULZ7R0wmD+DJQE6RgfrVWE4imsfv87FBWw0CUvr+SMPUUAn33B7ScD1z4nLJnsMcE3X07eBgi/+qkfXmNNd6m7wkKwZa82DBu1AEh+/6h8= 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=IVnF7fd7; 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="IVnF7fd7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844937; 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=o1zjbMHqB0PmusT+nYJ2VtJ9oVjApsikg9aShs5wyaI=; b=IVnF7fd7AWzMjJs7iqJHAUX1AN+v0oYAxKaaleDB8jmsZYRtt3sio1/CFUaHWdp4vUE7cI Vi7gJ3yPDwRBdaov1I+hZkc0oJlWAsmMAerxa8M5IsrTiWELqPF5FMXPmswUwca8R7RW8k vyfXv+FhuZqEVAiKMIBA2MBqhtnOTNM= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-660-8t4Ii1-jMs6QimW7Y9Dvtw-1; Mon, 05 Aug 2024 04:02:16 -0400 X-MC-Unique: 8t4Ii1-jMs6QimW7Y9Dvtw-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a77cd5611c5so79462366b.2 for ; Mon, 05 Aug 2024 01:02:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844935; x=1723449735; 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=o1zjbMHqB0PmusT+nYJ2VtJ9oVjApsikg9aShs5wyaI=; b=Hc0IAQq7xWMgmTMyaEe2EE7NMfz9Q4VEnXmiMxiMa5fEPNtW7F3ddPkAi9cd0OCDzj f98wfZBwqchzCWHFgjxdRvWjEX67pFwtRTPo8MItacXNXosW1KnDp37fYXxZ6zWZgTGu DH2DtkG64FHxbv0T9mQU56JsGdDpSEVljCzVsxmG8NIXV164vZjNV9ThpXVpMNrm3kAK 86JPhoQVUvzj6/sR5T8/R3vDkQz0OQ0arUZLlhxzUJ2yAWH1tVEAOWt6SZR+VXAY+QaW c8kZHts0eXTCviMy/+BSZcWisRaYY6nwTg76qRnDmMqM/z9nQln62UwOSto04RKJDs0E 3cCw== X-Forwarded-Encrypted: i=1; AJvYcCUBDGLSj8Hmy3wVknKilFp0gTIyR3Js00rZ4iGjzveY4JryI40ILCZa/L6GiW9h88noR2w/s/tHMQE=@vger.kernel.org X-Gm-Message-State: AOJu0YyfU8OPwjAes5jOFvzMtFxDP8Aqee35jXa7YpGgd3ZcsJ1Nzv8t J/cp4h3qmIvntguZlizAuNXmcqesmDbUjipVupm3gtZ+Zb2YLpdg2w0W/WbqDOAxcq7bPIMin/J Caad3wwXGMmeoMKwe6bG4SLiwfqb/f7Fm37f50sfv0LFCQLDPfJ4DSvx9wg== X-Received: by 2002:a17:906:f583:b0:a7a:81bb:ceeb with SMTP id a640c23a62f3a-a7dc4ae7defmr473034466b.0.1722844935128; Mon, 05 Aug 2024 01:02:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKuHik2ajcs17LmubcaIaCUkrAqH7M1NRkgMmBZVBefF6pfGv29aIhP8ECYMtriJwflIFmgg== X-Received: by 2002:a17:906:f583:b0:a7a:81bb:ceeb with SMTP id a640c23a62f3a-a7dc4ae7defmr473031766b.0.1722844934632; Mon, 05 Aug 2024 01:02:14 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:14 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 06/10] wifi: iwlwifi: replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:33 +0200 Message-ID: <20240805080150.9739-8-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 719ddc4b72c5..6b282276e7b5 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3534,7 +3534,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, struct iwl_trans_pcie *trans_pcie, **priv; struct iwl_trans *trans; int ret, addr_size; - void __iomem * const *table; u32 bar0; /* reassign our BAR 0 if invalid due to possible runtime PM races */ @@ -3657,22 +3656,15 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, } } - ret = pcim_iomap_regions_request_all(pdev, BIT(0), DRV_NAME); + ret = pcim_request_all_regions(pdev, DRV_NAME); if (ret) { - dev_err(&pdev->dev, "pcim_iomap_regions_request_all failed\n"); + dev_err(&pdev->dev, "pcim_request_all_regions failed\n"); goto out_no_pci; } - table = pcim_iomap_table(pdev); - if (!table) { - dev_err(&pdev->dev, "pcim_iomap_table failed\n"); - ret = -ENOMEM; - goto out_no_pci; - } - - trans_pcie->hw_base = table[0]; + trans_pcie->hw_base = pcim_iomap(pdev, 0, 0); if (!trans_pcie->hw_base) { - dev_err(&pdev->dev, "couldn't find IO mem in first BAR\n"); + dev_err(&pdev->dev, "pcim_iomap failed\n"); ret = -ENODEV; goto out_no_pci; } From patchwork Mon Aug 5 08:01:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753244 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 9829E156C65 for ; Mon, 5 Aug 2024 08:02:21 +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=1722844943; cv=none; b=W9jAkV3t0X1ygVch1WKZoJwD5fL5nmAQGMwXwS2+lTAufwrreADPzOxkaALIeodl8yXzkoHYAc3tfvvBrwg0x37UdQeMB4MYOVgiTbJfELJB5i7PkkZqnmsHUaMxrgzsI1414PIFetV91KL9EO4ZeFmApnPxdfWFmGwGHVFaWNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844943; c=relaxed/simple; bh=7JtiDzH4j1fn6e/l1CbreMTpZlhxa3kkuVFDYh4FXvw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pwAh2TQYIkikJ91Jv33wOiWKwLhVCHqfDA4UwsI+VsHv7MKmB85X6QgbvQWVbMz25xinNjCJZyHDH8FnVQ+De44DwHIbWDbuVbBxfj3YbNU3wOJTGVslGQMJ0XWPa8uuB+irkzj32I7LYjNv+3Hu5rK7dad8hnniicyEAbN4dOY= 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=TqsWeXH9; 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="TqsWeXH9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844940; 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=0WfVVRPiytk6PFyUBJOpMrU1ppuGmgzu2AH1RznbocA=; b=TqsWeXH99ky0mF+8qzVV3B92fcc/fQoHv9z8VJG12tqqLfTeeQidG51jGq39/nsVCrCIyV pmUNQV7RHzKTNaXDEGXWiG1uuPFZ1ZmtNp5Z+QnnwW9DrtHSk3++VLZZK/5DWxFInRZKQb o4gmxALxoFRrs6gapJ0wan9t7vybbxU= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-610-AoJX1S7iM3uq9rpErt9xKg-1; Mon, 05 Aug 2024 04:02:19 -0400 X-MC-Unique: AoJX1S7iM3uq9rpErt9xKg-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a77cd5611c5so79466266b.2 for ; Mon, 05 Aug 2024 01:02:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844938; x=1723449738; 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=0WfVVRPiytk6PFyUBJOpMrU1ppuGmgzu2AH1RznbocA=; b=Rlao+7Gd6MvJ3HJZ6qm1XM5eTvoyZqIteBlUHPVHbQ/0pRj9Lslb275+DdO/95xxjq +wjTste/aZBPJLQukYcaOwHQH2RSNJcaEue53dqbulkM64VsDGXTYI+C7mHkQuM05in/ o8q6evkalr0DBLJXQ+H+cfx7rEx30Tzin0giT7YIpZiHtcgMhFHUw0OKVB0Sbe7BbbLK j7SWw23imnYtEb/HM/AbleEWUA3rdYl/mHUUka6TJ4gslH1jB9XwcuMXsBEI1QWgncMC gd1joM4QvxizcS/utXUzbDF3ueo7idiBbFIIdYX64toKEWWeV0iNP36QsKXfiZgyVvpl P7Kw== X-Forwarded-Encrypted: i=1; AJvYcCWZ1jIa7ukJpNrzvrpNAMEuIgwTCJ7nsab7ui3XzDGpRZTK6GpacGlzi2oqrZnkQwiKH/iR6CWCdxc=@vger.kernel.org X-Gm-Message-State: AOJu0Yw7KespCkEYkcfenMSTnq+uqluJQ9OAlVOre2+9+m+q6u/N2SAJ 2NrDmWQR1OXSPs5xT/W/H8zzljDN9GdCk5txBfiENNaVdOIjJfc1baXkdQ/5yLPq4ul9ChdtL7M n+6VIxLViYg3xRPgTtkXlrfxkxM/4N8vcvf/XHU8rUHiGlaTnVVi7/jJBpw== X-Received: by 2002:a17:906:794b:b0:a7a:87b3:722f with SMTP id a640c23a62f3a-a7dc4e50c8fmr559111866b.3.1722844937217; Mon, 05 Aug 2024 01:02:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG76bxvYb5Yaoc3VRVGn0E6yzVD6z6UB6d1yYJXJ3VBKVznVuoeO63AJt78w0QvkxaZORLkrA== X-Received: by 2002:a17:906:794b:b0:a7a:87b3:722f with SMTP id a640c23a62f3a-a7dc4e50c8fmr559107866b.3.1722844936734; Mon, 05 Aug 2024 01:02:16 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:16 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 07/10] ntb: idt: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:34 +0200 Message-ID: <20240805080150.9739-9-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner Acked-by: Serge Semin --- drivers/ntb/hw/idt/ntb_hw_idt.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c index 48dfb1a69a77..f1b57d51a814 100644 --- a/drivers/ntb/hw/idt/ntb_hw_idt.c +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c @@ -2671,15 +2671,20 @@ static int idt_init_pci(struct idt_ntb_dev *ndev) */ pci_set_master(pdev); - /* Request all BARs resources and map BAR0 only */ - ret = pcim_iomap_regions_request_all(pdev, 1, NTB_NAME); + /* Request all BARs resources */ + ret = pcim_request_all_regions(pdev, NTB_NAME); if (ret != 0) { dev_err(&pdev->dev, "Failed to request resources\n"); goto err_clear_master; } - /* Retrieve virtual address of BAR0 - PCI configuration space */ - ndev->cfgspc = pcim_iomap_table(pdev)[0]; + /* ioremap BAR0 - PCI configuration space */ + ndev->cfgspc = pcim_iomap(pdev, 0, 0); + if (!ndev->cfgspc) { + dev_err(&pdev->dev, "Failed to ioremap BAR 0\n"); + ret = -ENOMEM; + goto err_clear_master; + } /* Put the IDT driver data pointer to the PCI-device private pointer */ pci_set_drvdata(pdev, ndev); From patchwork Mon Aug 5 08:01:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753245 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 EFCCC156F40 for ; Mon, 5 Aug 2024 08:02:22 +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=1722844944; cv=none; b=ri3c+gpiz0FSGavIzVvt0gIiW3DBZqdSQeN8dV8MltXxhCfLXKtl8EiF6f1o+7s+RKOX3tChS9SHR/ufJip7lhexFinj8Q2BG2bxc/nqa2PBqq1MB6gKgR/+Z1VGp8QNlRcP2xtfm8+A7C9E20fsmcfUsVHkbps87YTeUVVzSGE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844944; c=relaxed/simple; bh=XVnRSeomOV2CcZ6TomefmLqSPd3/SQ4wMxlPfANkowI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FtxPs4YRjl61McS7c1KJ9yS14jPAndCE9wHPAfvIg3qPDpch/eu+7E+tU5o8+OcMkCeHfwfmXV/Dm5GkyefsoGs82LMGN1prLvX1kh1us7qaIS6LHY4Yy2b5718z4g0SWkhoEvU9ZspmHhaqgG8IWfOODg64i3DL016Aioy7eak= 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=fKOi/YdI; 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="fKOi/YdI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844942; 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=f0/Bizm19ADXNR3ICrhb9w7/UmlF3K0oMXeQfztA/nw=; b=fKOi/YdIvMMl9tg2rB6KEuJA0uSMPr0XNP/wch/ZTY0SsXHmvTacfoT8HZaWkNhky3qaVY NJiXzjLwBxMJ0FpDMSdjFqMQCRYwx7D5qg4kO8o0ls/eNmQWhJrQjise5zy9mhA6431ZT6 ZrNEbQa0/G9mB6kjy/T0luLLc+K3D7w= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-631-Q0DAeNNwPnmMFfLehl8cJw-1; Mon, 05 Aug 2024 04:02:20 -0400 X-MC-Unique: Q0DAeNNwPnmMFfLehl8cJw-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-58b1fe1cd9eso1900633a12.3 for ; Mon, 05 Aug 2024 01:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844939; x=1723449739; 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=f0/Bizm19ADXNR3ICrhb9w7/UmlF3K0oMXeQfztA/nw=; b=rZCSiaQI9Eju23EYIZI0BJp08UJ4a0WAaVRHXQbyoOkrMQz1P2g3opzi7TyhFMEn2y ku8Ws8Blzyk7wslTkvh2ZWBIQPtVRo4W5SZ53RRjZGvesKqNHEwiA5Mdto5nSsUwqN+E DN0OAxtr7Z9STs9GeY/rifjKE8rm5XyPCFZheaZP2YZtgKxoAdT6G5MbYDgxX84OPRpV nX2S8+GqfcIys7L1GJxrwfkrj9+OFklzcSsUju9ZF7cU0fISs4prbODr/9C2Xr0gHHo6 9rOTJ4MebPRNlOtt+5zVFmQy5yZJDVzH3xbLHajMBFu5vjgwI7jPX1TIliCFX0v6HcVe fbog== X-Forwarded-Encrypted: i=1; AJvYcCWjtpy/ddx+jn90TBfbqknTCcgg6dXhYo2Cy5M0A7p0HR9JQ2Db5Mkqnhme/PAx7dTPyu0/5hWhRzc=@vger.kernel.org X-Gm-Message-State: AOJu0YzJEMbIy7osM89N8Ua8fsTlfo2HsMHpi4nYmZl4B3YiQui+sBMi ll/qo9OfJ+VQRmoSVgvdAOgeyz9+V/2a6mNf1URUcl3atmk5CD395R5bHsJE3K2Wra7ejXHvJBw FAHB1MbGKwkJV1G47XKHMizABZl/l7R1XPQQdnXOuemFXTF8MK1TePrM4Lg== X-Received: by 2002:a17:907:6d06:b0:a7a:b895:6571 with SMTP id a640c23a62f3a-a7dc51b4cf1mr513584066b.9.1722844939183; Mon, 05 Aug 2024 01:02:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8SJB/SW4G2idNXeZQo9TGP1SQwm7yFqzOP7n5lB+7g8ap58Lk3/dgBFHgiZuUlpVVamp1Nw== X-Received: by 2002:a17:907:6d06:b0:a7a:b895:6571 with SMTP id a640c23a62f3a-a7dc51b4cf1mr513582166b.9.1722844938741; Mon, 05 Aug 2024 01:02:18 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:18 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 08/10] serial: rp2: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:35 +0200 Message-ID: <20240805080150.9739-10-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner Reviewed-by: Jiri Slaby --- drivers/tty/serial/rp2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/rp2.c b/drivers/tty/serial/rp2.c index 4132fcff7d4e..b6b30bb956fa 100644 --- a/drivers/tty/serial/rp2.c +++ b/drivers/tty/serial/rp2.c @@ -698,7 +698,6 @@ static int rp2_probe(struct pci_dev *pdev, const struct firmware *fw; struct rp2_card *card; struct rp2_uart_port *ports; - void __iomem * const *bars; int rc; card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL); @@ -711,13 +710,16 @@ static int rp2_probe(struct pci_dev *pdev, if (rc) return rc; - rc = pcim_iomap_regions_request_all(pdev, 0x03, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc) return rc; - bars = pcim_iomap_table(pdev); - card->bar0 = bars[0]; - card->bar1 = bars[1]; + card->bar0 = pcim_iomap(pdev, 0, 0); + if (!card->bar0) + return -ENOMEM; + card->bar1 = pcim_iomap(pdev, 1, 0); + if (!card->bar1) + return -ENOMEM; card->pdev = pdev; rp2_decode_cap(id, &card->n_ports, &card->smpte); From patchwork Mon Aug 5 08:01:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753247 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 3D1F414E2F5 for ; Mon, 5 Aug 2024 08:02:29 +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=1722844951; cv=none; b=A2zcznYjwZJThp97rQI/3GAgpPi5sBTudVebLDqBml0d1pZbTNqW7qHjd0DgbLcwH5E+gVW/uh4/4DD+hlae2NYYFi6INzJM4yc1n+GlIps4GE+Rmf9QptiPMjBfpZ9RI0s1gcASR0Q7y6hbQUPsC6uR0mwx6eBSbTfShQ6jFRk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844951; c=relaxed/simple; bh=eDX/oUhvMuTvOdEU35gML3pMZ3bHnmTWwtIB4yn4vRc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m+GDGzVm2+bwdXBulOhCMuoUFZ+SxmM6xI8jDqYYc75uGsANNcXMTVjwZ8OlKLMv6RU4konU+yl865o0kt6WgV3PDO/ZB6Od1kCGnOUevINB/r1L75tfSjfrt1JUs3vuQpieBmNvVmLA4LsR/H2R9TO4BZbLnctx/02sqajRws8= 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=Lpgiwlw6; 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="Lpgiwlw6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844948; 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=6elIcVAva6IdGos3xrpBxA061GwStf3eghsSoUI+FxU=; b=Lpgiwlw6Yzni8oZdZsXAJZKU51WMQbOAlS0RMvSm3eAgKu8INGw4B48EtTu0AfsmrIvM+R vRVytD+85GTW9hYl3mYN3N9K8YTN2yZsSn6Ww6K84evLqyW4mV49WzMiVhiAtN10dvFmba RNpimBuZ7P8vG8bJLgSXudsQycPz5iw= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-680-oF_ffyHsO9GLYWpvAf9X6A-1; Mon, 05 Aug 2024 04:02:22 -0400 X-MC-Unique: oF_ffyHsO9GLYWpvAf9X6A-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a77cd5611c5so79468066b.2 for ; Mon, 05 Aug 2024 01:02:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844941; x=1723449741; 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=6elIcVAva6IdGos3xrpBxA061GwStf3eghsSoUI+FxU=; b=OjUgo40k+5t8O43quJteqI0sIKymEw8i4Q4p2uALfvx4wQQlmKB/gLiLaO7ubu5Apt ZoMiyF1/Xw9pFqY8AxJcfjiD+lSX9FXzkwqpmoGPC60ygqWQjcNpGVMnGVYAay6pjURB hiXkTJmWNlRDeF4gXVH3aDVoJpPlAQ3IoFw1vwZaaxncke2rROvLQbULRICoUCkkkSDj O/yUIuYkA4KiuwUzqstytTLs8UkC2b+nYaibndtApLQRr8gfsd3IJ5hl0N80g5AKe0M8 ETWjTSoLvLr/kXyfacRGgSe2u9iJ790xHxXxPLcws2kPcXwtR4S3yKXPIXrcn2zkAzhP 48jw== X-Forwarded-Encrypted: i=1; AJvYcCXhtnSdQ2RFcor7joIMcQ28/wDy6BInG9/c4GyQEQsiLqcm/kfjEeIzatihZnKOTDrjECfGTTOXu8o=@vger.kernel.org X-Gm-Message-State: AOJu0YxcjAZN9ehq2BZNt9lJSflwpX13oljSVxbCTmslICgOLMyIZynm mgERbORu4fjm2MR3ENst+saDQCujOHcGDkuNEN8GLW2BErn8AMDytKMf86WDuYQuwtZbiMOChLx LsjlFDBSo3eb728oiLaZ2aKdD2N9WGTXMHNeM1w6Q4HiU1/4bpHCv0Cio4A== X-Received: by 2002:a17:906:bc0b:b0:a7a:9a78:4b5e with SMTP id a640c23a62f3a-a7dc50ff341mr387930066b.8.1722844941107; Mon, 05 Aug 2024 01:02:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkK5Lt7n9jXqXSSRLA1PwUtBlM1U1xQiwgfbtLyFZ2DIUDAUIZgCzu48VuDRqWx5Z3WdARVA== X-Received: by 2002:a17:906:bc0b:b0:a7a:9a78:4b5e with SMTP id a640c23a62f3a-a7dc50ff341mr387928066b.8.1722844940701; Mon, 05 Aug 2024 01:02:20 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:20 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org, Takashi Iwai Subject: [PATCH v2 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:36 +0200 Message-ID: <20240805080150.9739-11-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner Reviewed-by: Takashi Iwai --- sound/pci/korg1212/korg1212.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 5c2cac201a28..b5428ac34d3b 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -2106,7 +2106,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci) for (i=0; ivolumePhase[i] = 0; - err = pcim_iomap_regions_request_all(pci, 1 << 0, "korg1212"); + err = pcim_request_all_regions(pci, "korg1212"); if (err < 0) return err; @@ -2128,7 +2128,9 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci) korg1212->iomem2, iomem2_size, stateName[korg1212->cardState]); - korg1212->iobase = pcim_iomap_table(pci)[0]; + korg1212->iobase = pcim_iomap(pci, 0, 0); + if (!korg1212->iobase) + return -ENOMEM; err = devm_request_irq(&pci->dev, pci->irq, snd_korg1212_interrupt, IRQF_SHARED, From patchwork Mon Aug 5 08:01:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753246 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 CA8211586C4 for ; Mon, 5 Aug 2024 08:02:26 +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=1722844948; cv=none; b=ji4i1mmv8Q8WMSe/qenJf1QzxTJz4ZFZoG/fEKc7mk9AYsvk/yIu2qH7LerlMt66AwWdXKZMs624Kbi8voc8K6hH7jR/hazitANXGud8+WV25OmIbvs1Tnu2CIQScgMwZG9ot2Njw99RPAAggNcPDq+Na6CMXdLImm6+H8Udlfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844948; c=relaxed/simple; bh=+Vm9OnIcejlQrHC+fUOsuOHdlE3r5QhdQyIHmCJJHiM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KalzN/vDWo0uMGINp/Y8BVC5z0rlbxpZCjxPc+nJymNCXWvil7sUiEv3rZk2bdzfdtRZ2R8eXQGbrIsQrZRjZt6X13wfXsZYbS7gjqvU2jwqxerYoju7OEboYz3wbkBbpA8zAvR5dHIhHug0Rx9eQaqv/Wdt1jfn2k+E0LP9NrY= 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=FVVbRkOV; 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="FVVbRkOV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844946; 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=vfEZOSpUlm3iGBljRVh5bMCTZxfFQAshsGvE6Xk1c3w=; b=FVVbRkOVxq8642o5vBxMZpacB1VcP+6QwAw4nweQnqqsJjByDbFztJCyD3dFJrjKyFy9DI SgxZJScqcKllkj7s31BfK8N5bdW1CKiOAjQqgGjtaehWiAOlTOxrTM9L9Io7K9FmkO+sTz riVjWQYapR/BhmRkCr81/je5+TmqnHA= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-k-XOCzk_OzOJAHKeNQFczA-1; Mon, 05 Aug 2024 04:02:24 -0400 X-MC-Unique: k-XOCzk_OzOJAHKeNQFczA-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52f028a33aaso1063510e87.3 for ; Mon, 05 Aug 2024 01:02:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844943; x=1723449743; 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=vfEZOSpUlm3iGBljRVh5bMCTZxfFQAshsGvE6Xk1c3w=; b=qySs9td0G24PTl3z2YZTDHT0CnMk/BKI3SjFXp68+bgYuMtWTrlSgm6HvzDUlQqu8C COKtqwnq4t0v4gi1QX9aDa35dNZgWYiwTlblGqYl8zRJEA96x1hiVgELMg1+MHGfFQan GmbQwBYM9gP1bi44Pw8G2jSrd45NtndOAtng8nCCg5HmKKZlbszpliCsdAnax4uaFVRi FBGdFgSkBEOUIuFtuxcahhd8CAXFxbTA4tk4BIihMSPrDxuZIHy2bzmAVWit6RDNMSBq mDry4A5QNsIT0n4mWuZlcvTNN51ycf6m5Y/WISM7NfmBkrgvngcpheLJA0prH+P+PqkR Q9Xg== X-Forwarded-Encrypted: i=1; AJvYcCUCls5Z2Whb/LS/J2giiAQFAQAWvx7TW3UeKsmkw2PQLs0HbbM7fCd3Lj5g9bXj09htOV1TECcvZyk=@vger.kernel.org X-Gm-Message-State: AOJu0YwZYVaH1NuNlruZUYD2hgVVPkwESJtlLXatl1eoWxwz5M8Y/IFB SDtokUwp/xloNyfeAW4JbcTf4zLcTKHEgm6YtJuoP6FOgDw88/JIrnBaFFvvdNMDcUxTMJNipkl 29vNJw6bqWAeTuBnhGuXfDz3m0s0Ja3/LJiHA9sOxoklwluFzqKTqFWnzig== X-Received: by 2002:a05:6512:3a6:b0:530:bc24:bfc4 with SMTP id 2adb3069b0e04-530bc24c039mr3271849e87.2.1722844943094; Mon, 05 Aug 2024 01:02:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLrQUH6nLB0tosEaFXlZobSC/44isugq3n0Zf5l544zGhgNP/6Ntw7hCPDneElIUaU4eFGBw== X-Received: by 2002:a05:6512:3a6:b0:530:bc24:bfc4 with SMTP id 2adb3069b0e04-530bc24c039mr3271816e87.2.1722844942669; Mon, 05 Aug 2024 01:02:22 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:22 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Mon, 5 Aug 2024 10:01:37 +0200 Message-ID: <20240805080150.9739-12-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_regions_request_all() had been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). All users of this function have been ported to other interfaces by now. Remove pcim_iomap_regions_request_all(). Signed-off-by: Philipp Stanner Reviewed-by: Damien Le Moal --- .../driver-api/driver-model/devres.rst | 1 - drivers/pci/devres.c | 56 ------------------- include/linux/pci.h | 2 - 3 files changed, 59 deletions(-) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst index ac9ee7441887..895eef433e07 100644 --- a/Documentation/driver-api/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst @@ -394,7 +394,6 @@ PCI pcim_enable_device() : after success, all PCI ops become managed pcim_iomap() : do iomap() on a single BAR pcim_iomap_regions() : do request_region() and iomap() on multiple BARs - pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs pcim_iomap_table() : array of mapped addresses indexed by BAR pcim_iounmap() : do iounmap() on a single BAR pcim_iounmap_regions() : do iounmap() and release_region() on multiple BARs diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 0ec2b23e6cac..eef3ffbd5b74 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -952,62 +952,6 @@ int pcim_request_all_regions(struct pci_dev *pdev, const char *name) } EXPORT_SYMBOL(pcim_request_all_regions); -/** - * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones - * (DEPRECATED) - * @pdev: PCI device to map IO resources for - * @mask: Mask of BARs to iomap - * @name: Name associated with the requests - * - * Returns: 0 on success, negative error code on failure. - * - * Request all PCI BARs and iomap regions specified by @mask. - * - * To release these resources manually, call pcim_release_region() for the - * regions and pcim_iounmap() for the mappings. - * - * This function is DEPRECATED. Don't use it in new code. Instead, use one - * of the pcim_* region request functions in combination with a pcim_* - * mapping function. - */ -int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, - const char *name) -{ - int bar; - int ret; - void __iomem **legacy_iomap_table; - - ret = pcim_request_all_regions(pdev, name); - if (ret != 0) - return ret; - - for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { - if (!mask_contains_bar(mask, bar)) - continue; - if (!pcim_iomap(pdev, bar, 0)) - goto err; - } - - return 0; - -err: - /* - * If bar is larger than 0, then pcim_iomap() above has most likely - * failed because of -EINVAL. If it is equal 0, most likely the table - * couldn't be created, indicating -ENOMEM. - */ - ret = bar > 0 ? -EINVAL : -ENOMEM; - legacy_iomap_table = (void __iomem **)pcim_iomap_table(pdev); - - while (--bar >= 0) - pcim_iounmap(pdev, legacy_iomap_table[bar]); - - pcim_release_all_regions(pdev); - - return ret; -} -EXPORT_SYMBOL(pcim_iomap_regions_request_all); - /** * pcim_iounmap_regions - Unmap and release PCI BARs * @pdev: PCI device to map IO resources for diff --git a/include/linux/pci.h b/include/linux/pci.h index 5b5856ba63e1..8fe5d03cdac4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2294,8 +2294,6 @@ void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name); -int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, - const char *name); void pcim_iounmap_regions(struct pci_dev *pdev, int mask); void __iomem *pcim_iomap_range(struct pci_dev *pdev, int bar, unsigned long offset, unsigned long len);