From nobody Fri Dec 19 20:14:23 2025 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 8FD7C16937D for ; Wed, 29 May 2024 05:36:22 +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=NE4hEIcNlr7MSe1EghFNtx8vDR0dyKv16uc3qmnFlIIvLRVUMthZtxqplR28d8JE6zSxniUS7d+wg/iTtM9qWqk84Cd0TwSGp+lVfl5PjPU+KLO+NnEO4Yr+jDM7Pspa7DimJZ8ZYwwfZtR5PdK2X/HskqiMdUVpODMWBV60TKY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716960983; c=relaxed/simple; bh=kDJcZN33ntEvZZurzXrpsoEVgCNzk8vicnqImPO/kUg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pkzs+9JOVOTSq2c70QZRgd47yGND/X9tKB8+0Llsovcoqsq5YATypEXRyIJEaTjkH2RI0x7AfVd/YpPkASk6Th4R/KYxd5ScDt3vdLv/vIwnOxYB/KlOtyCr1M3gPelizvaLEcXDBXJjFu9x1x7dAV1OqnTAxkmreBU1pdlyIZs= 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=msjvBQ5A; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="msjvBQ5A" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716960983; x=1748496983; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kDJcZN33ntEvZZurzXrpsoEVgCNzk8vicnqImPO/kUg=; b=msjvBQ5AeugDg2h9Q2H01zTo32O0iQ378MU/i/0agnkuU87UDqLyRChX qtcWy10Bg96qx/1T/5gIhLoHvDJFOOu75rkavxZcQehc43uY1DHz4dMED sMp1BJUa1ioM1vjvMVqvUJQHRb6MspKgbIK+wfY88RtsgdMhUHGpXQUNO yYJvnBRbI+U84kac3mRs/zucx6ygM6FbLXdHd2he84mFHWsOohnoMf2Eq bapb0/xlP+guMaCDP4+reEDm5g5LK+WJUY1fAt4wiSEUNzqeoB9TamKo0 AzfuogObITrY5yFDrkTygL+xoGVMn6kyWzO4LjJ4/UiJTrj4F95+BnnZ4 g==; X-CSE-ConnectionGUID: t1L+z4u0T46qjzZBu1SUXA== X-CSE-MsgGUID: c2v95/S0SEqR6AokqfE4xw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13569021" X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="scan'208";a="13569021" 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:36:03 -0700 X-CSE-ConnectionGUID: ENb7rn90RI6j1x4NRe3Etw== X-CSE-MsgGUID: Ih7YA2CfRI2pwJKPhSeR1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="scan'208";a="35257728" 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:58 -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 13/20] remoteproc: Use iommu_paging_domain_alloc() Date: Wed, 29 May 2024 13:32:43 +0800 Message-Id: <20240529053250.91284-14-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: quoted-printable Content-Type: text/plain; charset="utf-8" An iommu domain is allocated in rproc_enable_iommu() and is attached to rproc->dev.parent in the same function. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu --- drivers/remoteproc/remoteproc_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remo= teproc_core.c index f276956f2c5c..eb66f78ec8b7 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -109,10 +109,10 @@ static int rproc_enable_iommu(struct rproc *rproc) return 0; } =20 - domain =3D iommu_domain_alloc(dev->bus); - if (!domain) { + domain =3D iommu_paging_domain_alloc(dev); + if (IS_ERR(domain)) { dev_err(dev, "can't alloc iommu domain\n"); - return -ENOMEM; + return PTR_ERR(domain); } =20 iommu_set_fault_handler(domain, rproc_iommu_fault, rproc); --=20 2.34.1