Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp335565lqp; Mon, 10 Jun 2024 05:54:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1Spk4DGdvNcvjC+sstnv8E5lasJOYoU77UBlACFIlMQEZyJGrC+loskMYwruyUuu9CGMvoHLbjjmPU1Wa4CMFNZniZa+/u/3dhJXB3g== X-Google-Smtp-Source: AGHT+IFUCo8ji0HxLNzyP1o7trdduUYaM9+Zv7YeCdzoVb9JvIKcXGIPr0Mv2BIoOYT8Nz7fxoiW X-Received: by 2002:a05:6a00:4b44:b0:705:a669:8acf with SMTP id d2e1a72fcca58-705a6698ffdmr104102b3a.26.1718024071639; Mon, 10 Jun 2024 05:54:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718024071; cv=pass; d=google.com; s=arc-20160816; b=fDmn6zf0vGQC8sRuysFv+BjVTzfqlgNhlh2U/xz66wq8lpGAR5iCfVf+siP5l6fe3a rahAUa/dV4R9bTebNhy8fXyu5dH49F//yHD75l5RvvNK7SAQB6R0AQddY8/w45oMCkz/ 6Bk7sERNcHpiqg+KheWQkrJaIexyTNStH3lRyivfa3oeHw3May5Shx6Bx9HytybIDwVV TbjKir8ppDxWyhkdsvsD2v6H+Q3TI2PnjC8rRDZxuF0BFg/2gA8TlbY/05l11mB80WdC GBG13NQmsNx7ALwQO28q0mYmGXSEg4eZCzs7X/WWkSNFaBWJzOcK6BUf+mTdFxfi1BGG M06g== 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=oMfgzkEw/ooUXqvARCgNaSZrpwGw5y27+DEhhPidNdU=; b=Sz46mxxoZNrHSfPsIn5/5Om7AVEhx4ya+ylcfUQ1w2ASS0QvTD5G2ezzOA16Aob1+y grhtOAtzk1jwISQWYmbJNWmlFVbz6u4/Ta+HCUKmsw3TfBle9TY3gDtImj1c9D/XyZte Sfvel9eT2hm9PXou4ZlH5Zi1YS5qg40KSsv9w0B6RWpmi/o+BcP/JttLFNEBhjiHGHiS qQZ4H+sN6Z4ji0oa5KnGo6Y4jrK760OQv4WU15ZvT6JWISUwDfptXP0L5h9jOb82YkDJ SUw41nfPLF0O/pctsm0O6vTtgWa9Y17DRHtzDmhhqbpuG6gNrRUlck7pQ2sYkN+Yy8fX 179Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d5ixajlR; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-207902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207902-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-7042d99a039si3475355b3a.23.2024.06.10.05.54.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 05:54:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d5ixajlR; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-207902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207902-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 266A5B24208 for ; Mon, 10 Jun 2024 09:03:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A06298249B; Mon, 10 Jun 2024 08:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="d5ixajlR" 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 80570823C8 for ; Mon, 10 Jun 2024 08:59:20 +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=1718009961; cv=none; b=jjkceryJs/2ZrFsPIOA+kaxES+VtbHfaRlSsHfdyVyNKAulme4hVNBlteRjutoF8MZhPwnTSru6lk/iNo1SiN2kdOARGsQjs04K6KEyGwCZrLWLfenw6WipbAKM89LRRTYvcTLToc1GBaSPW61WdIcpBdhxiX80lAzj4ugj5i18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009961; c=relaxed/simple; bh=kDJcZN33ntEvZZurzXrpsoEVgCNzk8vicnqImPO/kUg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aYPRzqpta1+6Hp9hwHhQM4DVpNLt1jJAvjUcev9QVUux8oh+tPBGspnx3W/wc1vcb8HymmLkLbMb+0CuTyzQjUur9xhMbht+Xkwx2xzcNs8+U4ffl/hmdH5GpAXq8GhnNEp18L+uf4xPD79MIS4G7wNnQ3vhUgC67RC4TTjmSrE= 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=d5ixajlR; 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=1718009960; x=1749545960; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kDJcZN33ntEvZZurzXrpsoEVgCNzk8vicnqImPO/kUg=; b=d5ixajlR0VlEDAD6p0Trd1HWwg/4Sbfztg9worcJAzO8YDfzHnxb3Y5k s61SUUaRqBL49HF/pGhwZznQJlLTeI+tsZNFRoxLNrxDpGBNXBjX6Ix7m l3wee7jXg9tCmbobH+UCUyRlQIgQtILlKZbth2hBz0j+X7YV70+zW6ZlG M8i/ueETI0KBA1kG0eDjEzLXZglEl5wJ+RfwSlFoX+5LRHXKM+IgIPVEO WWELbQkISUvlUC0XgyNgxukbCeBkF78ZLBQGU26IABHSRbt8fTgtoIaE1 zu0nmZIk5xvLiAC+SltQHO8DhZyXt9UuVJB+8hrqwlWYKUP7G0qG/+Kj4 w==; X-CSE-ConnectionGUID: yR8fbHLPQ4GQ6EGhOw9ZjQ== X-CSE-MsgGUID: FsyRLOtBTU6RW2SjUzGmsg== X-IronPort-AV: E=McAfee;i="6600,9927,11098"; a="17581797" X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="17581797" 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:18 -0700 X-CSE-ConnectionGUID: NfOkwSpKThicZbLMfICvvA== X-CSE-MsgGUID: AQGFlrAZSA+rn/BX4z4/mg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="43432718" 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:14 -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 12/21] remoteproc: Use iommu_paging_domain_alloc() Date: Mon, 10 Jun 2024 16:55:46 +0800 Message-Id: <20240610085555.88197-13-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 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