Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1389224pxb; Fri, 26 Feb 2021 09:28:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmytTZBx7xW0h1CUFR43tsoq1MbD1PYBE+NQAynWM3Y02EDaVE5qUYqF26bCvyVjizIx6L X-Received: by 2002:aa7:c717:: with SMTP id i23mr4472624edq.81.1614360535477; Fri, 26 Feb 2021 09:28:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614360535; cv=none; d=google.com; s=arc-20160816; b=VSvQrfD0G1EY5JLssLoq8zMJwDXVFek7/ZfB7qApIN77RzDjm3jeB5ZkLY01K6im8J 8pQpBip4BfvetqrVfK/nqhDYZMdR03J6IcQfxwr7sS0kqahrSD+cY90zOetpIqJdLTg2 BXEFbn1y+5soxE06QuZtyMq7P2L5/VvmnFVbYV7Z8XsGcNsSsV7UfH8DRnk515vHvJ9V LdoXEq0qm8eIF6y91eE1JgcNiRqhbPhJqkBTpcP8ncNZXwWXQSzC6b4cw92ks3wNokCQ wCce+3F4X+tQ2CV0ibq4tX1CJ/B6OILyHuGlJn4PyJSyTJUKcRcyLHfmUQaWnj8wAEwV cULw== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=46MifqQE4f/PAS/QIgiSzbDRBfO/hWIxYDCH5F8gOGo=; b=fg9Iv/LL1bXYqB53sASsslFAdVrUjFt7K881Bn3f5PWm1XW8lCEgzvNiRjx0sgcaoP xuXHq0n3/bQVITDGu+X2KmTBOOmitrrBpR8PnsTmLKraldUnBBbgSvzlVUys7IDMRaru dPwSw92Os2pU1ZqpnKNksyT+QHs/5Sbq36c6iNp6smJKfz1RDYePR0TitzFnSHGeNrVG rbHXCsCx1xaSjZ6QJ5oTG2qCFrISsMtCmeYm40C88SURTFj7kreRoxWUbC+HHpXTEVIK HWwVKrADeTYU89xoQgAQZr3F5oek46M4+g5eugeTT5qew+pOkpafnhpR2522MVy4BzSr o+Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h6LA10EZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si6155566edt.398.2021.02.26.09.28.30; Fri, 26 Feb 2021 09:28:55 -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=@linaro.org header.s=google header.b=h6LA10EZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbhBZRZh (ORCPT + 99 others); Fri, 26 Feb 2021 12:25:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbhBZRZg (ORCPT ); Fri, 26 Feb 2021 12:25:36 -0500 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACC20C061756 for ; Fri, 26 Feb 2021 09:24:55 -0800 (PST) Received: by mail-ot1-x331.google.com with SMTP id b8so9723322oti.7 for ; Fri, 26 Feb 2021 09:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=46MifqQE4f/PAS/QIgiSzbDRBfO/hWIxYDCH5F8gOGo=; b=h6LA10EZslChayy3Ur3LXT2ugyZAipLvkbzRswQ2gMM8RTpMC49WQpw317mvKPkbKN cGggGXn06t6hx19TERjXoLlIDHfz7WFiDxk8qwla7OsM0Qwdc++LfVLlXrF5Z7ukbm5/ alyMQyCoFDUcHcSjRSXUwPrpkxYypingOrvvN80bnpImQYs/vSWL2Pr5GsqfmRzwjVWj hDFkdPU6+RV8kpxyPIDjBQHN0e1yZL5f2KdfOufP9nw9t9i0nlFS0raBKIA2Hxf/N8TC YSjQiMadpDWhTgmlTHaJd3/2eUCRXs+nqnCYrRfPW5CQxlV/WfzYBT26Uu53MlTOiz7v yLYA== 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:references :mime-version:content-disposition:in-reply-to; bh=46MifqQE4f/PAS/QIgiSzbDRBfO/hWIxYDCH5F8gOGo=; b=G/vU5h6BBX7eXg93/gh+H/xBrxtGr09eYl9PSnen9o4+nwN7O5gpvsI/zwOyolKKlr jzjXpu4GTYx7yvUtJx/vYPe8H440fk4wzqROUbrQue0wRFBIVOfqTdNJUvUKuSOvTw3t uUBEU5gUefyZcKWpzwV72yXb9C9Xm8JvTQClkol9iClRrmSa2RCR/2/oddN69ndyA9RC By5Qd/SGu+hc6/BvJrIL02aB396fRLaoV1dpxf4oJoVWqwUkfnDz2o2MZi2dLW2oPx41 ZktWRgKD2AwQFTpWrr6nsLhUeWE3wJRQ2+/ZCH4WjT7rXeceYm92nTlEADiSR3S6qHEJ Kpxg== X-Gm-Message-State: AOAM533ibD+1oQa7hNWWV+cmYomoosEaB4sRRtJUriuym0GSakIApaQa SndAsSJluwHt/K4H2tvlD0bYrg== X-Received: by 2002:a05:6830:232f:: with SMTP id q15mr3180613otg.165.1614360294902; Fri, 26 Feb 2021 09:24:54 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id e17sm1938869otl.75.2021.02.26.09.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 09:24:54 -0800 (PST) Date: Fri, 26 Feb 2021 11:24:52 -0600 From: Bjorn Andersson To: Sai Prakash Ranjan Cc: Will Deacon , Robin Murphy , Joerg Roedel , Jordan Crouse , Rob Clark , Akhil P Oommen , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier Message-ID: 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 26 Feb 03:55 CST 2021, 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. > So you're saying that you have a single SMMU instance that's compatible with both an entry in qcom_smmu_impl_of_match[] and "qcom,adreno-smmu"? Per your proposed change we will pick the adreno ops _only_ for this component, essentially disabling the non-Adreno quirks selected by the qcom impl. As such keeping the non-adreno compatible in the qcom_smmu_impl_init[] seems to only serve to obfuscate the situation. Don't we somehow need the combined set of quirks? (At least if we're running this with a standard UEFI based boot flow?) Regards, Bjorn > Suggested-by: Akhil P Oommen > 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 >