Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1318156pxb; Fri, 26 Feb 2021 07:55:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9mAgZKR957fu27fe41Qb+TgTJtMcI3mU7No+lDWyFhcIhLyAgC+Ni2jFOr5MdwpJ72n+V X-Received: by 2002:a17:907:77c1:: with SMTP id kz1mr4144895ejc.481.1614354907539; Fri, 26 Feb 2021 07:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614354907; cv=none; d=google.com; s=arc-20160816; b=dNiOVmTfIsjvz/dydBBp956hOsfMgIc8/zJjD3IAZNygRT41oKIveGdLtImIa/AzMK LuqOrEJf7axQ3HhWtwZzixaVurRhJKDk1DewmJzyA3NZXK1e6GIYSm5Ra5b4LvfzNnZT gVW/Y0kc1JsZBqY1U20YdxWU+tn8TYalCwY8DpA9CM9wYsSKJh69ol9e3wTGiMwWUqt1 ecPQfDISM/w1nLfYpZamPjZaVQ4KBKj4jSrYuGgIRCtD2ux7t5anpUddb3otvYr5qtP/ mbM96JxNLT8SdbAfSigupAb3auvzDitEDiZpkRoHtVKAfOBOwWOiKPnW1p8WUFz8f0lp fGiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=PmQJ/wCqtIlu3S88Te9ir+UW9MMaqsG5GrPeEyYHyh0=; b=DuGxG7DMHczuaM9medUvNw1FEAZBMEY6CxHDIVqc70lioTOVxW7ddK5Vf/LUGR4bwf gCJMB3PSpoUsZLdk0xitNgUY/tr3jd08RITkITQAiSe3ABElgUdGP0GyarlQTU1m98KT ixbMLAr7KXL0yj4hHG0UWaun3cDFfkI2od4Qm94MLqhAWUd6JNVo/KmgDNR+tF5OCd3i wQ3MIXaNGYh7rRyawyJeVo4WZyuzwG0iIoNIQwmrfBCQpUIzTL9PwLwGDRkmtNX4uxax Pas4uP1lHHDQqyb7mJfeZvppWkwFZGP7K+ejGYHC4Os11QF4tcz48DFla2xy8WJAjB27 gU+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cosmicpenguin-net.20150623.gappssmtp.com header.s=20150623 header.b="aZY/J7an"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i15si5835361edl.581.2021.02.26.07.54.43; Fri, 26 Feb 2021 07:55:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cosmicpenguin-net.20150623.gappssmtp.com header.s=20150623 header.b="aZY/J7an"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbhBZPxJ (ORCPT + 99 others); Fri, 26 Feb 2021 10:53:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230113AbhBZPwj (ORCPT ); Fri, 26 Feb 2021 10:52:39 -0500 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4BE1C061756 for ; Fri, 26 Feb 2021 07:51:56 -0800 (PST) Received: by mail-io1-xd42.google.com with SMTP id g27so8716102iox.2 for ; Fri, 26 Feb 2021 07:51:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cosmicpenguin-net.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=PmQJ/wCqtIlu3S88Te9ir+UW9MMaqsG5GrPeEyYHyh0=; b=aZY/J7anpYuk/uRjqkDTGMWbd9MZU4rUpdc7WUZU1OEKm9FUJhYZXTkGrFOY3dWy+A I8HBk0MTBD2QSpQ9AqUcnTdY7xPqYuYBzsk/UEshMmR5zD7WpAZDeFQLagx8Rwm9lDxB G4IM/pwK4tHUcx5btcObn3Em5OMwtuaHj7keYF/iYrxZpFX3KyTLutncyzOWfY18zS/x +wvwWmKRQWh6Ar2k40OiAjrkhlteJfCQ8nfv3ZJXCKRnb4/qQuJn4Y//y4gyjXhM39Bd v/f1yryI5vqGtfeTwqsFf8jyEJW5BUvwgSh1+H/tg1I6TYe5vN8vokcGbP270w9phUSd 49Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=PmQJ/wCqtIlu3S88Te9ir+UW9MMaqsG5GrPeEyYHyh0=; b=sS/a7GOUadoFzJh0kEml4q+mhLg/9lGnJyAfwwkhxoals6a/UL07g8b0rCy6I49wwA Q954A60xf7eaHj6XLKK9c7eUJQ0u/IHbXknYGBp3tyAguyTDBlR4l1QY+szfzY1QbLdR kCXgf//Yp+7fHx1IWCE199IGzEXVBs82S3y9zpohNludXBt33+Ez1UNg5zpFg8C+gsWL zb2B2lyvkrF3A6HMktvvFmo917uwD2sIU+HP8b/K/5SZzzkan/se14o4+lhOmelcE4ko SjQgfC+4OiwFZNahHaDLNtB/FjNe7YUiRunrl5eybvevMOU8q4tA8eEn4KBzFwKgF4bz 6IGQ== X-Gm-Message-State: AOAM530bUmesCkdWiDrtthsaIdEIRgwxv4PjvdccIzK77ZhMnbnZmffh +pD8mCJ/8N37Abrj5a0iqTH5sv8HXT7lEnpu X-Received: by 2002:a05:6638:bcb:: with SMTP id g11mr784354jad.96.1614354716291; Fri, 26 Feb 2021 07:51:56 -0800 (PST) Received: from cosmicpenguin.net (c-71-237-100-236.hsd1.co.comcast.net. [71.237.100.236]) by smtp.gmail.com with ESMTPSA id e2sm5451041iov.26.2021.02.26.07.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 07:51:55 -0800 (PST) Date: Fri, 26 Feb 2021 08:51:53 -0700 From: Jordan Crouse To: Sai Prakash Ranjan Cc: Will Deacon , Robin Murphy , Joerg Roedel , Jordan Crouse , Rob Clark , Akhil P Oommen , Bjorn Andersson , linux-arm-msm@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier Message-ID: <20210226155153.hzcesc2gr2qmleh2@cosmicpenguin.net> Mail-Followup-To: Sai Prakash Ranjan , Will Deacon , Robin Murphy , Joerg Roedel , Jordan Crouse , Rob Clark , Akhil P Oommen , Bjorn Andersson , linux-arm-msm@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 03:25:40PM +0530, Sai Prakash Ranjan wrote: > Adreno(GPU) SMMU and APSS(Application Processor SubSystem) SMMU > both implement "arm,mmu-500" in some QTI SoCs and to run through > adreno smmu specific implementation such as enabling split pagetables > support, we need to match the "qcom,adreno-smmu" compatible first > before apss smmu or else we will be running apps smmu implementation > for adreno smmu and the additional features for adreno smmu is never > set. For ex: we have "qcom,sc7280-smmu-500" compatible for both apps > and adreno smmu implementing "arm,mmu-500", so the adreno smmu > implementation is never reached because the current sequence checks > for apps smmu compatible(qcom,sc7280-smmu-500) first and runs that > specific impl and we never reach adreno smmu specific implementation. > > Suggested-by: Akhil P Oommen Acked-by: Jordan Crouse > Signed-off-by: Sai Prakash Ranjan > --- > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > index bea3ee0dabc2..03f048aebb80 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > @@ -345,11 +345,17 @@ struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu) > { > const struct device_node *np = smmu->dev->of_node; > > - if (of_match_node(qcom_smmu_impl_of_match, np)) > - return qcom_smmu_create(smmu, &qcom_smmu_impl); > - > + /* > + * Do not change this order of implementation, i.e., first adreno > + * smmu impl and then apss smmu since we can have both implementing > + * arm,mmu-500 in which case we will miss setting adreno smmu specific > + * features if the order is changed. > + */ > if (of_device_is_compatible(np, "qcom,adreno-smmu")) > return qcom_smmu_create(smmu, &qcom_adreno_smmu_impl); > > + if (of_match_node(qcom_smmu_impl_of_match, np)) > + return qcom_smmu_create(smmu, &qcom_smmu_impl); > + > return smmu; > } > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation > > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu