Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp425874lqb; Tue, 28 May 2024 22:39:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWRyQ1oK9xWzVnOLpL8DLwgk+jpC2J9g2f6FL1bHw59Wfe9aIdux0Ks2ldCo3JsglPvCbDPZ7a/DIZNG6md2Eu96PORSliDJGEugu0mg== X-Google-Smtp-Source: AGHT+IGU5wdgBNzKswkFH7EfNyBNuvP7h9ggWv5gX8PkAoB8HoDcX3ZM+f4TGqacMKSLtD/rQ9za X-Received: by 2002:a50:d498:0:b0:578:6c3e:3b8f with SMTP id 4fb4d7f45d1cf-5786c3e4351mr6978036a12.2.1716961176444; Tue, 28 May 2024 22:39:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716961176; cv=pass; d=google.com; s=arc-20160816; b=qEp88TH3QPj/LiuTDXTYQbOzMyAORgjxzutftAdTFS28Izgolw2HaQ3YaQoHumo4r3 6/OManWHeJwAzOL5LBFx1zXbhWMW14WoJIgjytXL/q0IPxIDqHstOrCsC7Etv3Wud6yE 2qPCo8vD86+LHR5iCey2fUen5k+9vjpi9/CKe5JYTm9XpnmfdQ01f8ruQnfweYPOdJt8 Ssk8bH+YLsY2Fi7eszEVUC3UG5or3k93tk/0xIsjnwrgjPkN5IdBv+uWtjcYFnZReBH0 W8zwYETcWfAGvLP2ABuTkBOTTLJ96o68hBv7V10f/0Kms9ezDiQlASF0ePr8yQ5g1pQb PXvA== 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=2EajYBBNHrVfGE9kzE2Tvxs2ytCrpSaPArmsWry9kto=; fh=u7VIfotmvhCnFPKh0R845OAh004BwcT1TGiZ1dQEGzo=; b=wu49USKAJqcpvyMArU2G64gHZp9WZ6aDM+Q2dBtiWrTcW/pRD49KHyUSodKBNGFujl VTrks2+26FL7GWU2fGDhW+bhHFdGEwTkf5NAm4Cu5jO+LF3SkjF83vV03dS0fFdjMx9A gLekgF/H9Pg7lPOOdAczoG5jzLqJRId9W61RCxEUQ6d9lK5mkwf8wOyIZFrexYSN+qCZ YHA0IfY36hp34L03VFpCLuwnp6HwDDeOIIt2KFEXajjyrtMKXLuJgDpj0EtbyEn/TzS3 6lxxOauB8ttMHvV5m38vsiaPakFLKJ+rbsYvP33ON3MVZgpkQL7VPUbbY2+IJTPSMJo4 6dOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MtQRuAwV; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193462-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193462-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57852496033si5927309a12.451.2024.05.28.22.39.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 22:39:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193462-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MtQRuAwV; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193462-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193462-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 317B61F264EA for ; Wed, 29 May 2024 05:39:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C470169ADB; Wed, 29 May 2024 05:36:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MtQRuAwV" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 DD2BD169361 for ; Wed, 29 May 2024 05:36:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716960983; cv=none; b=Bz1Sgt7vv5TWLfxUfKkRPnMMaE0JirwxEYFFQHq2i3RzACxzl/LGecvzYtyYOOVA0TvhV0oo+SnyTCK7BykSWAdxpJC3sLeQc7aE8rG3HC0qGJbPG+xJQVJFpR0W3C4NqOqCgs+b/82FRthvn5yUGUcEUg9Z4ts6EAvSYGTrCfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716960983; c=relaxed/simple; bh=b4g7oPuUpFCf7ehXVGbGAAANzK1lpGoRJJpR32Cbgc4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dCoN4wbOc1twV5RTOL5l0ktpbqiJBxxAcEf+eR0vn7ffcyHJ4WoIPJ7W18+IfDti4XOqXHmhp31Yp4/nRTfkdZCHR0Lp75365T94j2ge5G88VGqoEn3hVk9GgOK57QT2pVhb+AvD7TRSv9Ny9GHd+8xB2K/Ke9U84Mg8gBfpGEY= 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=MtQRuAwV; arc=none smtp.client-ip=192.198.163.14 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=1716960982; x=1748496982; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=b4g7oPuUpFCf7ehXVGbGAAANzK1lpGoRJJpR32Cbgc4=; b=MtQRuAwVDwjaHlFy08UV2efRhFgL668SHjzjjOQ6h6LwkSe98pVEn+Pm 7Ccpv86MFUxka+FjC2IrhSQjTjqXY5KmhKLAt/lX53XNvEPZ/bFPuRXeF t5iCibF8Z+S2S//9GYL1dWLPwKP3faQnkh4u+OBJ+YiSP506pyB+fVL+O dnWiTwDFw8f29zziTo06+9PBi9lrVc2nnJ/t8OigYR73E+1FXz7ZPZk5S fP/jy6pq3fCO8fjNmrv2H/tlN68J8ZMPMJyluymCDyi4CHksK+bYRZDua gkVYnVYVRx5YJaiINQjE7nfSUJ1ZfrxS4mj11hZvrrcS7ScA63JeGFfmP w==; X-CSE-ConnectionGUID: ia63W5EGT56wWlHk+88+AQ== X-CSE-MsgGUID: d8kRWINnSd+aDbBwXzIDHw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13569008" X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="scan'208";a="13569008" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 22:35:58 -0700 X-CSE-ConnectionGUID: V3zZjpVoRS2Q2WQoWQMxtQ== X-CSE-MsgGUID: 5T9hg/jYScSPheKhITTpNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="scan'208";a="35257707" Received: from unknown (HELO allen-box.sh.intel.com) ([10.239.159.127]) by fmviesa007.fm.intel.com with ESMTP; 28 May 2024 22:35:53 -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 , iommu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH 12/20] wifi: ath11k: Use iommu_paging_domain_alloc() Date: Wed, 29 May 2024 13:32:42 +0800 Message-Id: <20240529053250.91284-13-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240529053250.91284-1-baolu.lu@linux.intel.com> References: <20240529053250.91284-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 ath11k_ahb_fw_resources_init() and is attached to ab_ahb->fw.dev in the same function. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu --- drivers/net/wireless/ath/ath11k/ahb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index ca0f17ddebba..a469647719f9 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -1001,10 +1001,10 @@ static int ath11k_ahb_fw_resources_init(struct ath11k_base *ab) ab_ahb->fw.dev = &pdev->dev; - iommu_dom = iommu_domain_alloc(&platform_bus_type); - if (!iommu_dom) { + iommu_dom = iommu_paging_domain_alloc(ab_ahb->fw.dev); + if (IS_ERR(iommu_dom)) { ath11k_err(ab, "failed to allocate iommu domain\n"); - ret = -ENOMEM; + ret = PTR_ERR(iommu_dom); goto err_unregister; } -- 2.34.1