Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp425921lqb; Tue, 28 May 2024 22:39:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJwZcmALnSlq4cTWwvSSJIAhk3sIcvSrAsDJuBxB0hunNXKasX2+htu8UxdYexEgiijJxKyFoymsV+xkugh2Rg2YpcdqGucfFdDo9LsA== X-Google-Smtp-Source: AGHT+IHtE7jx9UunGptZWmuYaFEQtLmEDpCOwUjl6gHXnfEOA5eSKiWU/1Uih61s7Rs8EDQFQmkH X-Received: by 2002:ac8:7fd4:0:b0:43d:f7df:b9ff with SMTP id d75a77b69052e-43fb0e512a5mr141352761cf.6.1716961188524; Tue, 28 May 2024 22:39:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716961188; cv=pass; d=google.com; s=arc-20160816; b=dVNJ847w6MEaJ57lXZglpcAl/3eLi6hSZRT7rczb+U3oKTB58idqleItMbxFE6LLei BCQBqUulbCR5rOCfGJxoQqU4/gTlxfPvU+LB9r35fiFeXyIEoaZop/v64iznIH6PbOqW gecbD2rZS687jZCDZD95QLNvs5hwvOfaaRzp8g8cUfkfkWywdERULxZXqu/2Hudkinne In+ws8v1GIv4MH/6D8DufLbtVPe3U8DTYQ1v/7HjjeaQl+dNN3n57MYUsr1GYANSFr5A rEdVGiwT/GujjTt6qDVpaqjmdnwkPAI3AVqvqVaJRLUvoe66qTnD/llT4iE/XdFyJt2m ygkQ== 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=+SaPIMF83XQCia0fFIVvLuSpi/oDiT5VPT9VzY2loG8=; fh=u7VIfotmvhCnFPKh0R845OAh004BwcT1TGiZ1dQEGzo=; b=EHY7cwkqWsK9Rq5Q9NPnRt2S37IDldHFfG7qcByHBI9UsVLcDhY97Iin08vSRTrUE4 7Odam4RTYP6UmhTqxD9xWxlrdOk7U0YWsmtIJOc2HJIZFk5tkyGMjFO665QpUfTNTAlu UXlzckvZYtzNxUHMgF3EsIBrWF6b0KFgVqja1BRu/1PgFtSQ3A5ThS5ql84Y06cjPzN7 40bE5I3M1rKcuB+BIAdzKvM1nkab8EIqQOLT2UNvgH6qd3yaEyTxaSfQ+qly56kQiigK /sgHFYmIHpaG5QH5fckbQab0dkOlNGxORQ7Zsa/XowzMRBYeW5y93/zv3AM1lMXJXU6J uEUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=msjvBQ5A; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193463-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193463-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-43fb17babe5si114005931cf.23.2024.05.28.22.39.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 22:39:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193463-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=msjvBQ5A; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193463-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193463-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 EA1F01C24120 for ; Wed, 29 May 2024 05:39:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4269169AFF; 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="msjvBQ5A" 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 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: 8bit 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/remoteproc_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; } - domain = iommu_domain_alloc(dev->bus); - if (!domain) { + domain = iommu_paging_domain_alloc(dev); + if (IS_ERR(domain)) { dev_err(dev, "can't alloc iommu domain\n"); - return -ENOMEM; + return PTR_ERR(domain); } iommu_set_fault_handler(domain, rproc_iommu_fault, rproc); -- 2.34.1