Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1039038rdf; Sat, 4 Nov 2023 04:31:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnCP7bDSe0iMlf9VTFAmfBI98Nf6SRz4f0EE67y/LWwOejwjBPK3Jfbn9uyjMxbN0CEgjh X-Received: by 2002:a05:6808:114:b0:3b2:d8cb:8e14 with SMTP id b20-20020a056808011400b003b2d8cb8e14mr23217975oie.28.1699097469295; Sat, 04 Nov 2023 04:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699097469; cv=none; d=google.com; s=arc-20160816; b=nb+0qCLe/hp9wJb2zFSewaW9EAO/Ew3XqFKwH1jO9RZJBLlZEjwQm6xhKTiuvhYTXD SLx3ygXf/uZNJxQtP1lKf0Tl5v5aoTEP4NU8Sa4xXfWZCv3PROUMgwvXNhC69ySnfOiZ tKpZESfIcpdP1/KNIiVNCzflK1WgDj86yslNj1e8Ju81yYQyUR+OPsCReONsXTK1wmp7 UzauTT4MQrtrQQOXeyUTvqV2ZP+H2qaGia6HDFBLUWKfLm7b4Szl+BYZCBSBgAsINb/z iVgtxnoS/delJbdR06IKF6BolcPJviExbkTkhow7EiWulxV+U6oaltvY42ysEQ7hIbJN vbNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ViIC/HSzRl49SaVz7Ic3OZfsB5CjZfB5vtLnKKRw0ic=; fh=ql4/1y9OBWPYbWSpKa+rxbs+pXeRKCiEnt+jAzmdjZE=; b=VGgVu69JloHSNt7tuc7w35zk00ZYhMwxMQDP8kmGbqqcIg6ltPLFBFaNsdG7mrlqMF 6uMj9a0NwMZcs3woEsIBME3a8GmLcWGC/DzKOKfTNYXgE+aRs6t6hTA6a4nexvH/bZcz Y5WXPBlLjBjswllTie6YzxSE3fFblZT84rUJ0rxeq2PQfC7+kOhww9rX2FItP6LsZys5 7osgnDyo8XMeR7VB+dSYXrz1xnExv2Z/b/5GvZjhB/EN8f8c9F/IPx4rV8sw17upVPu8 GGwhzL1qreJaCBsyRJ9Tb3zkeNRjsDiojWnt/qD+b5Pw04h+wrNH1KuKfrOTmCk5nN62 cjwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bN37xAML; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id cp5-20020a056a00348500b006be322191desi3570431pfb.112.2023.11.04.04.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 04:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bN37xAML; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8CF3880206E6; Sat, 4 Nov 2023 04:31:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232025AbjKDLbA (ORCPT + 99 others); Sat, 4 Nov 2023 07:31:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231998AbjKDLa7 (ORCPT ); Sat, 4 Nov 2023 07:30:59 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05283D4E for ; Sat, 4 Nov 2023 04:30:57 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9d2c54482fbso450568266b.2 for ; Sat, 04 Nov 2023 04:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699097455; x=1699702255; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ViIC/HSzRl49SaVz7Ic3OZfsB5CjZfB5vtLnKKRw0ic=; b=bN37xAMLBydVthpkcYcuqR8RA/51gq3HIAdsWyB4uB1kKNtZR4cVN52Q8I5mEI8z8U DTyt4kfdcOkAARrYqU5awhEktFiPF1aWLiJAN3G0FnPfpU9CjaU1IsXts+LcCwCs+KqT bu5gJBTPQ3tpQTx5Gnl89OoO1C13nuwn4N6QNWvCp/KRIcFuVkqGWh1tBNCsNGpRKqk7 cnWtwnI/HEVpMIiFQ4FFA1VwjzlYU9Mh3XxO6DSV0R0cABSQrJ8C37Lb+XRQctikKiKi DabmrpRX9Hww9Vpxhw7VOXghOAj+y62xfbCtcDlTAzF7X5tFdhawyi7gLtELlgdmYIUe 98YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699097455; x=1699702255; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ViIC/HSzRl49SaVz7Ic3OZfsB5CjZfB5vtLnKKRw0ic=; b=r4hf1+3JskGGqh7dubAj0J0sdZNTMYt5LSsMtFradEbRzVMPx4VQEkyPqUa0cXAOtU LwkUW/iiEwYbEJk+99287cDtV3uyxxRnRdVE58nHu5uBIK3p92gfaJL43/07A7J39HOR Eomk66zz3P0aME7zV2hr5Tye1+VWFhjcs6PfetsEQ1zc+NP7G6uw5J/zb/1DMRiQYpcN sP8ydy96PiXBjhL773oE+IHbjKe8a4jKVy7SCrLLfsJnQyTf+wGCn6OwTKo6K9iKdp+F xkIEW5JIvuuAoTcuPp4uStnQfdmT9BMvy7VA45Fwf6lsE4bORpR4FslTVVip1rI4tnmF bR2w== X-Gm-Message-State: AOJu0YybnogmN96FCEAaZD1SBzZ/YXloXpieKYL+jy/8nXN33RoutOKy 9nKPgKakgdB1pk0c223zo8vnX0A/I+HQat1JX7Q= X-Received: by 2002:a17:907:70b:b0:9d2:20ee:b18b with SMTP id xb11-20020a170907070b00b009d220eeb18bmr8758416ejb.42.1699097455299; Sat, 04 Nov 2023 04:30:55 -0700 (PDT) Received: from [192.168.0.153] (178235177017.dynamic-4-waw-k-1-1-0.vectranet.pl. [178.235.177.17]) by smtp.gmail.com with ESMTPSA id s5-20020a170906454500b009c7608eb499sm1878707ejq.94.2023.11.04.04.30.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Nov 2023 04:30:55 -0700 (PDT) Message-ID: <26af3ecc-8b3f-4b10-b594-eae57de501cb@linaro.org> Date: Sat, 4 Nov 2023 12:30:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] iommu/arm-smmu: re-enable context caching in smmu reset operation Content-Language: en-US To: Bibek Kumar Patro , will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, dmitry.baryshkov@linaro.org, a39.skl@gmail.com, quic_saipraka@quicinc.com, quic_pkondeti@quicinc.com, quic_molvera@quicinc.com Cc: linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, qipl.kernel.upstream@quicinc.com References: <20231103215124.1095-1-quic_bibekkum@quicinc.com> <20231103215124.1095-4-quic_bibekkum@quicinc.com> From: Konrad Dybcio In-Reply-To: <20231103215124.1095-4-quic_bibekkum@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 04 Nov 2023 04:31:06 -0700 (PDT) On 11/3/23 22:51, Bibek Kumar Patro wrote: > Context caching is re-enabled in the prefetch buffer for Qualcomm SoCs > through SoC specific reset ops, which is disabled in the default MMU-500 > reset ops, but is expected for context banks using ACTLR register to > retain the prefetch value during reset and runtime suspend. > > Signed-off-by: Bibek Kumar Patro > --- > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 26 ++++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > index 590b7c285299..f342b4778cf1 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > @@ -457,11 +457,29 @@ static int qcom_smmu_def_domain_type(struct device *dev) > return match ? IOMMU_DOMAIN_IDENTITY : 0; > } > > +#define ARM_MMU500_ACTLR_CPRE BIT(1) > + > +static int qcom_smmu500_reset(struct arm_smmu_device *smmu) > +{ > + int i; > + u32 reg; > + > + arm_mmu500_reset(smmu); > + > + for (i = 0; i < smmu->num_context_banks; ++i) { This loop deserves a comment above it like /* Re-enable context caching after reset */ Konrad