Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1429559lqj; Tue, 4 Jun 2024 00:48:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwlCnZQtylgrhsWtBn10vQpKVvEW0zCUj0nL86FxMfP7+WPWHfNMN0sQLlnHDvgml9VYpS5ni/ZmIQJdDXfMTg6Tr5wQbGJlEAs+fW7g== X-Google-Smtp-Source: AGHT+IGOeULLvfDYwcPXMIKvWmuO4LviR3yW9W+/5XzDn5err28zYHN5g98uzgR6RJIpyuubxY08 X-Received: by 2002:a05:6214:2f05:b0:6af:f766:c6c3 with SMTP id 6a1803df08f44-6aff766d1b3mr21151886d6.35.1717487316742; Tue, 04 Jun 2024 00:48:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717487316; cv=pass; d=google.com; s=arc-20160816; b=Dc9SfiZBmYgf0HANZ73lc6VuJBOcwa1sicX+aWXjq4R+Oox7MPwl/UUb4+UjkhUNdR hWXJrh3hkSinJmEmt7/fisgXPfAkVFOK5NDoeELQ/lytoXZB2NnHVIJ9LsfS1/Hk/Xj2 L4khitl1WZhnsmD29vY1SqixhYLy2JGK2ElsnBl06fnIk8V1NmdIiwaFj+jeLnbMHbR/ mz+PVdikfGHBZZsL5M5T7pJO9cb32cZ4bAT9dSlmS8UUAO4jMiDew9XtrXTYVWv/hYBg RO2OvQuquvrjunxJzMSfTpkHiCBSVoeAPAGqoixuDK2cegt/XsNnbOtNlL3GnUkKt+Dj /KMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OlJzONumJ7hGmF7Lx8HSrbgepz7pi58FM6gnNMiUIJU=; fh=bNdWPQdmePlJUJOHLO/AzoZwAlmdHObQ/bfLnIGEr0Q=; b=EUcre41ULmsO/8fU1APkyTS5usZgkrKKFcEFz9Vfg6dAH5V7FtchC0bgp2kfqYGt8m Y8KIkUcQvoUBG2wSfumULiqH5NPIgMzpz7VRzWl8rzgwTs9wwOpK/mOEIh7pAGuXwnkQ 1hYwpARR2o2XSf+Hzm6yhQNjbYUXKpXTJrOG7tJl6NZF4Zbg6mB0sAzNJ4HzRHU8/5A8 TaNfGgPFXe8ESdjQXitv72FPDKFu22agVIh0JIZBt6DoiKOL7uE27CJURmb/oTRtCb7S su6ecotQz+Lm1gFEq362Ny1BUj3PPunvTYOuJgFaiakefZqIM28Nk99b7QycwbvZSbgg d94A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B+tFdWwK; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-200180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b415240si25051276d6.369.2024.06.04.00.48.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 00:48:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200180-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=@linaro.org header.s=google header.b=B+tFdWwK; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-200180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 7A4FE1C2102D for ; Tue, 4 Jun 2024 07:48:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CA811411E8; Tue, 4 Jun 2024 07:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="B+tFdWwK" Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C75D14037C for ; Tue, 4 Jun 2024 07:48:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717487310; cv=none; b=KEe5bEj4jdW7d/MWOfqks+/42S6KRcxi5cCbtGTlBpNqbzTRiX9E825k1mVnW+4J6IJJJZUbUHXlAc8wkKDF5iDaqeaqNRLgjruJgImxlQFZg9x/2Qx1twY92GvmdKtKIcyDf30ydmpsGpHvNWiBpMeLBOWJzqCKgO/y7rHeGig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717487310; c=relaxed/simple; bh=vCitIq86zHiouZSAKcvxwEFguJ/k1OQJuGOVFY1W6dI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d1JBfhXQyi4fdhcYH12uvbiAw6kTbmf48Xwthc0gOoqY78T6ugb4FVO4OzOlhnt4NU1QC7mso2Pb8rvqJdM52vLbtZxDT08K2t8MfpJBjC2Lbj0x/Lb+xESnbopQQO+RD0CoxW7BX3SQQmN19V2uIPbKc9KdDx1gsMX5FrJ7BcI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=B+tFdWwK; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-52b894021cbso4642462e87.0 for ; Tue, 04 Jun 2024 00:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717487307; x=1718092107; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=OlJzONumJ7hGmF7Lx8HSrbgepz7pi58FM6gnNMiUIJU=; b=B+tFdWwK/H9uAblUEOeZv2eExnYxrp0T/KPeEGwiaPb/mvOMr2J9VnxnOL/q3x67Fq wJaj2N1BIKesVNl4fXox8mOh8zOVI3bBLhPDAl8MTNx16uVjjRtqSbTa2Xe8+8vfDAZY q831llwPD7KCb2ADyHxjwvc4dHTJeKsvSYjmk+xA503z5K47NIuq6kxn8Vd5l4v26Jcz F9b6Hd4dDxIrM734oa+17qfQdFjAq+zfqh0We8MIIQ4u7LEArhvekw9SGkYkQzk1xVSj 9m2+7TE3IcgTxwa+MDpEfSTu6KHhxonvceofK3wkL1Jxe+xeGk3mLZ4WHCCBf8VhJFum rIQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717487307; x=1718092107; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OlJzONumJ7hGmF7Lx8HSrbgepz7pi58FM6gnNMiUIJU=; b=VO2XHpMchiVTbJiRvIoWCXPk5ST3Zn/BH+5W1Dug7WwpwuKy1AiitGU2J+9Un3yc2v ex1H58YmCldFBH7zkcwdYBQ8WG3T2ZR74u42X2uVFbh5RqOnq4QFAHHfrAoQRX2s1BFy 2HhDCy9h/OI6zl0JbdRUuArHocM9BWwaj3VpfaFOjuUjTPY05BTE8gHyEsHUcZ7o2qej qyDRwO8coxcmB2XUcZu3D0dIEi/TKjNclcwN5cN4D6Q3g3fhryZ+9ERNa54ohzHTg54U pf8mIN66wzn++En4YEVS9XV7NY42QR2SW54kVYfUY9d/uMo0OEGB21MLTOPIx1vNHp2R OTUw== X-Forwarded-Encrypted: i=1; AJvYcCVaoHX38b1/1jCpmYKtAU9i8g33/RLbvuIingbuTVQNIPV7T8aXz15k7xWJNbIKgSOC/L5DbqFg1Ix40oWdcKmEiMKYxpuGILsZ7Ea4 X-Gm-Message-State: AOJu0YyfLyTQfba1V2cVG1lxZzXMVfU9ccB9fK9msjOvMUA+r8AI2iWW IhQFCIMWszMSQ7kveHhXPDE/lBo8J3LvavLVgvNEYixiWKxrRzKqGKQ3aF47mJc= X-Received: by 2002:a19:9110:0:b0:52b:8417:fa95 with SMTP id 2adb3069b0e04-52b896b6e1emr6758126e87.41.1717487306746; Tue, 04 Jun 2024 00:48:26 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzdbxzyyyyyyyyyyyykxt-3.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::227]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ba4c99cb8sm142098e87.62.2024.06.04.00.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 00:48:25 -0700 (PDT) Date: Tue, 4 Jun 2024 10:48:23 +0300 From: Dmitry Baryshkov To: Lu Baolu Cc: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian , 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 Subject: Re: [PATCH v2 06/22] drm/msm: Use iommu_paging_domain_alloc() Message-ID: References: <20240604015134.164206-1-baolu.lu@linux.intel.com> <20240604015134.164206-7-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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240604015134.164206-7-baolu.lu@linux.intel.com> On Tue, Jun 04, 2024 at 09:51:18AM +0800, Lu Baolu wrote: > The domain allocated in msm_iommu_new() is for the @dev. Replace > iommu_domain_alloc() with iommu_paging_domain_alloc() to make it explicit. > > Signed-off-by: Lu Baolu > --- > drivers/gpu/drm/msm/msm_iommu.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) Acked-by: Dmitry Baryshkov Thank you! > > diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c > index d5512037c38b..2a94e82316f9 100644 > --- a/drivers/gpu/drm/msm/msm_iommu.c > +++ b/drivers/gpu/drm/msm/msm_iommu.c > @@ -407,10 +407,13 @@ struct msm_mmu *msm_iommu_new(struct device *dev, unsigned long quirks) > struct msm_iommu *iommu; > int ret; > > - domain = iommu_domain_alloc(dev->bus); > - if (!domain) > + if (!device_iommu_mapped(dev)) > return NULL; > > + domain = iommu_paging_domain_alloc(dev); > + if (IS_ERR(domain)) > + return ERR_CAST(domain); > + > iommu_set_pgtable_quirks(domain, quirks); > > iommu = kzalloc(sizeof(*iommu), GFP_KERNEL); > -- > 2.34.1 > -- With best wishes Dmitry