Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp228028lqp; Mon, 10 Jun 2024 02:02:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHmk2mzzUCzNRrqhKYKNfqE2gsu6Famt/KMTL+DVbvAHp+l9xdjk8rUa0ph/wUvVttFqgwaOSAwvVtkOuf488KsX/Zl++OGey123ZTug== X-Google-Smtp-Source: AGHT+IFsals43xG7syhg9lnfF85qA52bBUu3HFS6GTn1yJo0Ui+D1rRiqGxK0RmFjQ4M9YBLPoDp X-Received: by 2002:ac8:5703:0:b0:440:a22f:ac61 with SMTP id d75a77b69052e-440a22fadf0mr34599531cf.32.1718010165266; Mon, 10 Jun 2024 02:02:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718010165; cv=pass; d=google.com; s=arc-20160816; b=gUfzN6Y99rM2RoIKgGpg6WpH9pzz7yEVKpQqjwwXuwjDwbPstHSSGHppdOEKH9QUIC RdvgxYSkpQSDyK8yHGL/vMkE4YjHL3qRzthnRczmImp6JCCBYnp3LMS2wN2SyL5KxED6 gph0gUnVdcKHO5HpFiAsb6dyXttGcujqBPP38zlGIW3QIAtS+DPDYCel8NHfHfEKx3Q4 AoP4qrHWLR77ydovgRpyCWQZsQ2Kax33rM6NfjufeBmKx0AVwwisEpy75AxYmnEQNJNh Wak8dVVzZWjmhxpzvlmJCy3yKMFTN68cYtt2CvsEK4Oi3UXG6LMjtQpbFm6xKsqmnefg PjbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pYMi+HEz+M0C476H6fiYotisy9pBIqvsnl2HVtBxVxY=; fh=oMfgzkEw/ooUXqvARCgNaSZrpwGw5y27+DEhhPidNdU=; b=jRjANN4h8Is+sh2nlnvhH2peja0N7Pz+2ifExF3jhrKMQ1mZNlthQiXD5FjeigV1TQ LzIwNsMNIDgr0FB98LHDy5ei1MA3hEEN0VQw5r2er5yvgLDA/AbaUVfq9gmNh3z/3st9 Gq8KaRLTX/l1f0zyYKKM8xmuZx/MvJG2m8khcPPlGgTGoJCRVEIeyEqWGxMOoi3Py4Mu 9pRVd04s9kVAERVtPPaKq5Uo8rU6CJ0NNVLGFIUC9aR5AIkSGVoJGAFE7fdAwRcCET+y Ox4CoGmXqeI4jhMdd/TJGhtNGqtpKLc7Pfv0QZLNczc/JNy+hmN+lr2IeqTaIuhIo95N 6C7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Cb8HUsia; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-207899-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038b15f35si104511501cf.282.2024.06.10.02.02.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 02:02:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207899-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Cb8HUsia; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-207899-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 017D31C21E79 for ; Mon, 10 Jun 2024 09:02:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 676C280C0C; Mon, 10 Jun 2024 08:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Cb8HUsia" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 3A60B77F2C for ; Mon, 10 Jun 2024 08:59:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009950; cv=none; b=TduXdOxldkgpHu3asNDD5ilo7HDxdfhGKbnWSjWiTm2N9p+/8/2EDcoeuCFfs8VS3BXwTzx+N4FK5us+hJLsd2g576yrfAUFfjyKNK4wl/MIXUzZC6rfVFms1jKWRyEpMEtDibv8yOG/0utqIMFXU+jvW+/jshTwAtB648X1OGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009950; c=relaxed/simple; bh=I+6ZV6/EEpnAgWEguwHFARLKzGNGpw6wFQ/PVZkM/0g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q+KJCCpAd81ok9kMWp+5FLUgO06KLHOxNkX6g5v4mrB/2X0ZLL/KAbPrwRhrcq6y8QI2g0rb13ASHhupSYwCmM0WtYCbsaMZ4MpQrqm5cFUvb2iuHOtFoHFvZHfNRwNeeANgjgF4NRm9w5mG8bxazvS4JQGBb7WM5dmLvnohC7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Cb8HUsia; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718009949; x=1749545949; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I+6ZV6/EEpnAgWEguwHFARLKzGNGpw6wFQ/PVZkM/0g=; b=Cb8HUsiavp6loa1sEd+Q9+rmPxBhSitBblWJ6EWmKGqiOa+aD+ZvkXCn YTHexH7TmDZdMpHSPVQHAGlGyTXb9hgR6WBxvwzmsiMCaUB/65ZwMAZdD kbs/tAmUfSa9f0FMV9+UzRBsNf2nNBtqStIsEcLnNWTJAVxBFlpiEMvLq V0TZONnMccoTDYGO+j+517l9uXhlnyzJZQajSlt9qncIlgHn2Js1vDeie 6twBgUy2IuroOcBN9grU0N4MN5Iyi5Ovk+nB9uuYvn6SvB+YcvxV53EtX h4ffxQ6qiBGD5kHgEJONDIbIB8JEyLPRRCPlMr4t8Gi52isVTvFTxiEjA A==; X-CSE-ConnectionGUID: HP8E37TLTmm9wqGTALkTEg== X-CSE-MsgGUID: 7g9K866rQsuTM2TmHMxAaw== X-IronPort-AV: E=McAfee;i="6600,9927,11098"; a="17581715" X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="17581715" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2024 01:59:08 -0700 X-CSE-ConnectionGUID: DWaGHBPtRWWyKoZXzOPdmw== X-CSE-MsgGUID: mAUB1mHyQdCuNi096HBmIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="43432626" Received: from unknown (HELO allen-box.sh.intel.com) ([10.239.159.127]) by fmviesa003.fm.intel.com with ESMTP; 10 Jun 2024 01:59:03 -0700 From: Lu Baolu To: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian Cc: Yi Liu , David Airlie , Daniel Vetter , Kalle Valo , Bjorn Andersson , Mathieu Poirier , Alex Williamson , mst@redhat.com, Jason Wang , Thierry Reding , Jonathan Hunter , Mikko Perttunen , Jeff Johnson , ath10k@lists.infradead.org, ath11k@lists.infradead.org, iommu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH v3 10/21] wifi: ath10k: Use iommu_paging_domain_alloc() Date: Mon, 10 Jun 2024 16:55:44 +0800 Message-Id: <20240610085555.88197-11-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240610085555.88197-1-baolu.lu@linux.intel.com> References: <20240610085555.88197-1-baolu.lu@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit An iommu domain is allocated in ath10k_fw_init() and is attached to ar_snoc->fw.dev in the same function. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath10k/snoc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index 8530550cf5df..0fe47d51013c 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -1635,10 +1635,10 @@ static int ath10k_fw_init(struct ath10k *ar) ar_snoc->fw.dev = &pdev->dev; - iommu_dom = iommu_domain_alloc(&platform_bus_type); - if (!iommu_dom) { + iommu_dom = iommu_paging_domain_alloc(ar_snoc->fw.dev); + if (IS_ERR(iommu_dom)) { ath10k_err(ar, "failed to allocate iommu domain\n"); - ret = -ENOMEM; + ret = PTR_ERR(iommu_dom); goto err_unregister; } -- 2.34.1