From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD540C433E0 for ; Fri, 26 Feb 2021 15:53:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A3CB64EE1 for ; Fri, 26 Feb 2021 15:53:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A3CB64EE1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=cosmicpenguin.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lT8GFdtqxrWXEbTTG4PGXWernFuVGHOea4AJtRaMNZM=; b=F9V0flYgJA0jwMlTgp3jeE0zc vNpQpcqeF0lfBgVPzzlkNKgZKQbNdIUGOhtfjg8UNdYuH/qB8STtJzid0bJi6KM1L+uAedpthgumX 32kWCL40f7chp6DUH3arOx2vQ8UpaeaIjtMT3s+T2qMFFHi8pZEqrzRJY+yil0DwAcbGpcz9pTfxF DSxCW85db6mp63QyQT/yPlXVUZF1QnDXW1by5zTp/xEcj26uLUCXdeI3XTf2SF8adgtjRsAIO3WxY Sl5I/Ly7hG8a9g+r3nWYeqrbQ/WlVmKoHk4TrAaTWNYsnnH00XodWVCFG/+adfLS3/JDE3FyOVKPz sPzejV8rg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFfPN-0006w9-Mx; Fri, 26 Feb 2021 15:52:01 +0000 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFfPK-0006vE-FH for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2021 15:51:59 +0000 Received: by mail-io1-xd41.google.com with SMTP id p16so10092253ioj.4 for ; Fri, 26 Feb 2021 07:51:57 -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=i7YXT9lleZ/76qyYRfcOZmj+m97YkCORMpGVHtFnERGfRqgGcbQfySTG3qnPwKhANP EhBP120+dwYABEs5Wm40YPMsfQ/FmtRX53QZaR08XN6fF59B3miUduX/uWnFh6eNk/xt w05LwNDLGqQzTLuFNFR1P9EwUJBkjvLSv43fSDrgnmRX962cDUfugscC62L7/QTrZtn6 S21PveIgP6ubIDgausT+sh1xspYcrABVdq2QA+1SZ7613kH7yuJVlt++Z976pOWIy0Uk tIwYx4PUPm4/PqQdWnk1W4zovHk164N0pkkRXxyRd907BnW+OaXibGYATDYmG6Uac9Z8 bcEA== X-Gm-Message-State: AOAM533HUbAV4G28YCLRZP7uOKoAqsD1SSNk/Tv9hAgiMmkMXS7FFIw3 yu3fba8td3zU1HAjsV06mlKs+w== X-Google-Smtp-Source: ABdhPJybY+lyWGeUH63O9EiT5RbFYk40RqM956Cpnw1zMp2nsbHLSjayPHOEFz7mm78dvhz8ZRfB1g== 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 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210226_105158_853148_E3AADF8C X-CRM114-Status: GOOD ( 24.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Will Deacon , Joerg Roedel , Akhil P Oommen , iommu@lists.linux-foundation.org, Bjorn Andersson , Jordan Crouse , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Robin Murphy , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel