From patchwork Thu Aug 1 17:46:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816196 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 168D71BCA14 for ; Thu, 1 Aug 2024 17:46:39 +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=1722534401; cv=none; b=Kq0KAoUnFQ3Vkf7OMIyDqR0rp5Q4yE5h+xmG/nDqMAhDBRETtip9mkMf4chRjpfztpTzbHcjy3i49Llkgk0otzooqdmczMmi+7tgzlHLW1GrnF3Tq/cLxUSTZN2BRCNknCUepMe7Zx+4KjjpA8fUTUHBnFptpnJiCkfmuQidDMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534401; c=relaxed/simple; bh=T/Lr5R3ZpRsNgk4LNzf4i3JOmIq6wzNv8zvkRdHooAQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=afC8bFaCgoipZQtXyUjxwSTopD+gP1BZreRpC9t02qN9NFoWrPyS92JWOdtDsMTZ3DXyNljvT5pctxG8oWGkD1S2FfjukpAhQlVgJzyey3Ffu7g4Myi5saMYcANx0PfAWvarhzTPYU09FOFEMj9n+fyg+5sBIzqJPz80R8HM6s0= 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=M7OIGhWk; 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="M7OIGhWk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VIcu667vSRZRiKEHakO3GAIgbzPtgHQvNS3his8mZEo=; b=M7OIGhWkpV5EoG6DWwv7eO0eZXRAYfer/DUaMLfA+SSnIrQcu0JwMhez6AZcvsOYN2c8Ev GmcD12Tl466NPg9AGD3/aXTKdVu1cu1iNVLXBuVY5ysETgpctIZc6+MaTlmMlkHq8mte9n riQmutMA1OU2/dDsp3oxa7EiqDTGcXA= 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-296-_UoEhBePOuyaw-TB4UewSg-1; Thu, 01 Aug 2024 13:46:36 -0400 X-MC-Unique: _UoEhBePOuyaw-TB4UewSg-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-58aec36a89dso887435a12.3 for ; Thu, 01 Aug 2024 10:46:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534395; x=1723139195; 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=ikrVgr7QSa0YHfSv1cLOnKVW77kcz7KMtJ7gpkkJtmJlB270oSNZF6Avm5c/T1VA5I hyKXmi3foMW3iQWqgie3a6+9wDcvdKnEEDTe/BFznYw0M1TS1/rPsGVLqwM5cjNtEJR4 MHcf5Uyjpck4gkM4DCTxVuMnPRpqJC3s86gYRzs4SbJQSRYqV51mCh/TIPnkIVjEKKA0 Kxzyf2EGRPoDfkRFWjS7vDJWWUmJgwCTFQwqR7Ypp9lRRb5oLceqDo56V81Y4zZ8ICHt AElQ/+IsGycspqef5ukk/gFmRRi8b3+gyNl1N2j3MbmEVnb7W6YFFDv6rPFZA5SPzAOe gBDA== X-Forwarded-Encrypted: i=1; AJvYcCWletfBc/ndJylNKVjj6VAwWbAWrVspqb+Lgh7H+AlzbGshUUkDkwUXlmyO3IVXYDozX0DK8HOSIYNCR7w=@vger.kernel.org X-Gm-Message-State: AOJu0YzsCSbGA4sj63Ht8GuLXlYOnKk3FLvqKgpB0q1TvZx9QPLpkYR4 +EYl9OdgBNyC0pW1zgIpS9LZohZBP3HrzgMMRonEw0aXkSs1+wLacr8WrM2TzM/oAAjcRHC3Om0 /TphQ7P2vI2FGHXeuj4iZEOUK4PkKy2+ci+tM03X5bCj96n3OXB+a17+8ADZ+/Q== X-Received: by 2002:a17:907:2d21:b0:a7a:9f0f:ab1b with SMTP id a640c23a62f3a-a7dc509f24fmr31653366b.7.1722534395629; Thu, 01 Aug 2024 10:46:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHsAm8ay3YLV5X2CKZi8aqVdjkY/Zte8gQFe54oKpkGHtEojyFbBE+V0V3Lk+EwhBeWW6VAw== X-Received: by 2002:a17:907:2d21:b0:a7a:9f0f:ab1b with SMTP id a640c23a62f3a-a7dc509f24fmr31648666b.7.1722534395021; Thu, 01 Aug 2024 10:46:35 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:34 -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 05/10] intel_th: pci: Replace deprecated PCI functions Date: Thu, 1 Aug 2024 19:46:03 +0200 Message-ID: <20240801174608.50592-6-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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++;