Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1322974lqj; Mon, 3 Jun 2024 18:58:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZiObDe0w3B1EQZIxd9Xqap1IWqZeC9TJdQuFG/uZH/YJPkO7HJoLwWU6ENwWejoYSJmxMulpTLXkyzZSufd6G/BY21rR/+lbEJAztrQ== X-Google-Smtp-Source: AGHT+IHQPbAyfrCjP2JrIweBGGyKqaLZCHsOvE/fOXiJvyOHlcqy28Ww44rXPw4g1FAm60U/WaIR X-Received: by 2002:a05:6512:308e:b0:52b:9b8d:1d33 with SMTP id 2adb3069b0e04-52b9b8d1df4mr3375226e87.62.1717466298306; Mon, 03 Jun 2024 18:58:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717466298; cv=pass; d=google.com; s=arc-20160816; b=h4v8nPMan3prGaGWl7rM/29j/gnWtD/MmK7M5ljGSeKQKqlvijkVhapbwKd1SB3Oo0 0trhdTXClfuz8mYmQDB0bqTkkgdcyIxyxxet4wJ8Y2tKr0L/Qzb0Xom+/1cuLvOjA6dq I//JmkgTtYPYHsr1gsdzfEKmemYUxXulx+s0vkdDw2Pu38aKWCI3reKaF3XI+gFopFh9 gyExOG0W7C6WzlENoSzGRViBSfQGNGBrhEZ/0zyBE0Du/xPmqAF3grSD2kzuOo9bUFAH geZ4sWZ49+1hbpRpTbmz158iCnB0pXF6LDnLh4aFMlS2TgbZej3R9U47tyU4RNp95l3k wB+w== 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=V/OpfTvPBK5bf8PlPeRXPkb+/HfJ/scOizj3hs0KYHM=; fh=u7VIfotmvhCnFPKh0R845OAh004BwcT1TGiZ1dQEGzo=; b=L53QSztYujN9DoQskGGGPidO+Nvd9NogSZgSMjd8MfbSkNZ0TKOYN9P4rQgx8UT5ry XydkPR6jV7ARnLSMB1kDt51mOjCJ3K5awkBW8PF1nFUR/KSpUVg6uLAXPPENI2/86cFz t4A5+f3cJ1m60k15OXFCelqJqtMReA2e7rAFWoIqYhXPD1vKbACWFk1sI/t4kTWvqCUk sn6pmj6T5BwMHFsbdNafbHZ86YFKRdBMrUCjWlQBhyPt1SrXgSYGkUWSFgPRVH1KDHi0 0w2ry6nIIQQrPsQv1v/YHKsxt4QRk3ihVOi+AI5CLHOcd67km0taWFkm1axySLRpnRdb h0OA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Nn7l0nOS; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-199935-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199935-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 a640c23a62f3a-a68a0f610b6si354729766b.939.2024.06.03.18.58.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 18:58:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199935-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=Nn7l0nOS; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-199935-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199935-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 0B30F1F26BDF for ; Tue, 4 Jun 2024 01:58:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7481D14264A; Tue, 4 Jun 2024 01:55:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Nn7l0nOS" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 60FD3142645 for ; Tue, 4 Jun 2024 01:55:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717466126; cv=none; b=TI5kYWaq8RKPYGpzGRpwJbcQjsiYn2fjBeivFOzhYS4ejwAe7Xe1XAt0jUADoGtv07LODTyJpttQbHiDrvtZgPq8mUYK5vVP3mHz/goYP1r6tw0W3ZblxfMv69iW2NmRgb+u1v6PHCRB+LOPxKCLOP+f12szTjTs+qEqf5sOo9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717466126; c=relaxed/simple; bh=9YhH5rA1b+ID5Xo/cB0X+5j1j2KZOf2zs+wByq5adpQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hfMYeIoevkjh7svtPnvWTcwDToDhmDFEBCCPOZy/A8F9DnHXtUStYz2JXrPqSq64dyjx2zXlsPUU2H2O/DCzhHOjckT70H4ZhF4+Uja/ssr1R/PzV5fccipu38vzsuvVm6NJBQHZVPuSlI+n7B1FPl+mVVpk859Rubaqv8t2SgE= 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=Nn7l0nOS; arc=none smtp.client-ip=192.198.163.10 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=1717466125; x=1749002125; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9YhH5rA1b+ID5Xo/cB0X+5j1j2KZOf2zs+wByq5adpQ=; b=Nn7l0nOSktkuJJtwluKnuA5MVDsA8MaGFRnzT2tU/5W8dCN3Kjq3b8gy O0Msoco0kgrCd+2NnOOaFHjMPl674zrJI8ZGnGTC6c+qukWjMC3jpifwR L4hI2LddPywPwrPTOCcOWEbG9wYoIsjV+at7aF3LrxvOiISWUzuZc7jXa HKCRgdxIyi57TG99mCMTj4255oo/CADnlxL3y8SCOeUO79BO0vA3nQQFB SdaKJC7iCTsozBsMreoDFgWn6AXLZzK3DnaFAHJQt8U5WUF53hFE42/lh 6C/vO7gvibvU/wBDVkcwG0gqXtAHKYzK2it4eeT4CMJUzELe9r1y3dGCE g==; X-CSE-ConnectionGUID: 4wqgtdAMTmeXplMoC/UDYA== X-CSE-MsgGUID: zrIXSETqQq6tq6/YoQYETg== X-IronPort-AV: E=McAfee;i="6600,9927,11092"; a="25385159" X-IronPort-AV: E=Sophos;i="6.08,212,1712646000"; d="scan'208";a="25385159" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 18:55:25 -0700 X-CSE-ConnectionGUID: T4omcRksRbOOdlHyphpw8A== X-CSE-MsgGUID: c7zTJVNbQXuNhzYvb42Urw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,212,1712646000"; d="scan'208";a="37662045" Received: from unknown (HELO allen-box.sh.intel.com) ([10.239.159.127]) by orviesa008.jf.intel.com with ESMTP; 03 Jun 2024 18:55:21 -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 v2 18/22] ARM: dma-mapping: Use iommu_paging_domain_alloc() Date: Tue, 4 Jun 2024 09:51:30 +0800 Message-Id: <20240604015134.164206-19-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604015134.164206-1-baolu.lu@linux.intel.com> References: <20240604015134.164206-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 Since arm_iommu_create_mapping() now accepts the device, let's replace iommu_domain_alloc() with iommu_paging_domain_alloc() to retire the former. Signed-off-by: Lu Baolu --- arch/arm/mm/dma-mapping.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 52f9c56cc3cb..88c2d68a69c9 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1585,9 +1585,11 @@ arm_iommu_create_mapping(struct device *dev, dma_addr_t base, u64 size) spin_lock_init(&mapping->lock); - mapping->domain = iommu_domain_alloc(dev->bus); - if (!mapping->domain) + mapping->domain = iommu_paging_domain_alloc(dev); + if (IS_ERR(mapping->domain)) { + err = PTR_ERR(mapping->domain); goto err4; + } kref_init(&mapping->kref); return mapping; -- 2.34.1