Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7036054rdb; Fri, 15 Dec 2023 16:11:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyZEHbh1FBcxMzEIUElbyk8VbW+MWkJu5rOS4VPcIepuWLfXzP9Bsg6T0wMUFCoxToiPN+ X-Received: by 2002:a50:8e4b:0:b0:552:7433:23ee with SMTP id 11-20020a508e4b000000b00552743323eemr1996074edx.0.1702685504340; Fri, 15 Dec 2023 16:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702685504; cv=none; d=google.com; s=arc-20160816; b=ko7Xwt5nY4kd/f+ga5CN3avEOX7HTVlue57TTVtzLJVRmMQFTZLY5ksF/0wZd2Mh8G dsiSt4KqpwaW4LsurpI+4LuaKPBftoVePwUa0N8o+9bHTmi9aaFQVZ3q4Z3IG/1APmlR LO1r/Bp9RhT/j4TwPhD4sMu5ZxcbOAZlM8K78/eBhN5SVzPwJVnNoTC/TX8ne6fmgiFC 5HA2tvyDmsJKPUC+Qu+yFATs9bs5S0Bg2GGGoReEYvduJOpZvmxFrOZktVbBq/Lar8kJ xn2jEvG6LEJAvURcDdeHenCFiLGFiAjU+Hos6Cz911kcqEgvpB643uUldNyzbqs6PxWT 7Z/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=BmSdErHsr1zbuomX2DsSYiMRXQ5ZJPIl91wZ8zgMNQI=; fh=S9nU56dpq/TBBREQ9ccNhnPJVxYSE791dKxTBUAxuyY=; b=u5Ufy77gRohR+4UbbnahP1O4Jg8wL2hVbsB8+wRHXYhcmTBFAxQ3L9MKJjTLt+cgvJ o40HT0jh6hmOXy3pudvTs4HRUswaPZGUncDgcdcaZD5bFyArkAlEEy5lKdwFYrE4xnqC gudx13uMMjCFD90kdStNQnDO2Pjsm/0M5/zZvpV1igHAjev3DR4nrwgBs8osp4n4f5ZY GvaQfvh/TwHa6q4oqafcZ4sRoelG2k0QwEZi8ljx6b91F9dIUknJc+oPNT0cGz20lFP9 eoVES7L2x8xAjcWGqjf5/7LQqFe0W/u0G6ODRjW+sRo0IBkAAFL1Awo7wsUZzsCgVIeO 52qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HBOdAaWZ; spf=pass (google.com: domain of linux-kernel+bounces-1840-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i28-20020a0564020f1c00b00552bcb4752csi1022539eda.2.2023.12.15.16.11.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 16:11:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1840-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HBOdAaWZ; spf=pass (google.com: domain of linux-kernel+bounces-1840-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1840-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 322051F260F6 for ; Fri, 15 Dec 2023 23:55:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E813145BF2; Fri, 15 Dec 2023 23:55:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HBOdAaWZ" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 7D04048CF5 for ; Fri, 15 Dec 2023 23:54:58 +0000 (UTC) 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-ej1-f54.google.com with SMTP id a640c23a62f3a-9fa2714e828so145766266b.1 for ; Fri, 15 Dec 2023 15:54:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702684497; x=1703289297; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BmSdErHsr1zbuomX2DsSYiMRXQ5ZJPIl91wZ8zgMNQI=; b=HBOdAaWZWvhxUk5pWV4L0p26J8rs1OUaDr0Y5xnalciUpctDdLlF2QY021nrNlNUDt 4DTUbKbqACTZkoWZWp3ive5LyA0s8aNsRib26DbgWZjX7nUbNdZuYNJEmbuln+4IeHqr fnWHF8d3hUHrfwYTaHRxmH4ZUR/pUC/s0GttQyxQ8eF1QnVcnqTzc5CnOTKQcMHtEzSo 7pU8K4ICThxSiKIsbg0gvj5ZHH5n7X7idv+dNYADLpEQssbfy1wgNOTMfd3GlJWC6tJz 9lTSRw7nRiy1KryGAOMSI3SkIE+rv1rkLU2l8YxENTXmo8+DleqEPitd5ZrgHawOAZxo 2iog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702684497; x=1703289297; h=content-transfer-encoding:in-reply-to:autocrypt: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=BmSdErHsr1zbuomX2DsSYiMRXQ5ZJPIl91wZ8zgMNQI=; b=reYyOI7iSO6QeZPmJDFYoOcQbBJWqnzA6q6QLCRoajXY/Etov5Cr0H2M6+pPlnlh4+ CWdUeKETEB+HP4UkGhEJmxQgyWE648d6EW7Bz3OUQHY0TKmOIZFI6Fs5cLrYLoA/srnQ toifRNn+74LSxur6mCCMFAroUudLbH82igjuCsLrB8n5pVAy8kDREu+Xkpu6XlbysDpU AWbSVAymAitPTPFouzbhDXmqHLqCiQfGaf7T8Pj5xKwpRoosqi9pNFjkOfwM+3Kiasaw KmzlQwrOR9BDngSVQMmeSlmivmeWacWVr9bTPmFmydeLTvXl5gimBvVLESH5Cxsmgy/w 2JZw== X-Gm-Message-State: AOJu0YzgNE3D7EkGcdi+Y6p9wjQNO0Qy5VXGcsN8cKHT4RMmXAd/AjAL 09g1oBIA8qxo+gZJqFtQNRNfBg== X-Received: by 2002:a17:906:41:b0:a23:b67:cb1b with SMTP id 1-20020a170906004100b00a230b67cb1bmr2019929ejg.17.1702684496604; Fri, 15 Dec 2023 15:54:56 -0800 (PST) Received: from [192.168.199.59] (178235179137.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.137]) by smtp.gmail.com with ESMTPSA id tz4-20020a170907c78400b00a1aad4d92dbsm11210558ejc.123.2023.12.15.15.54.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Dec 2023 15:54:56 -0800 (PST) Message-ID: <3c7b8c2c-7174-4ced-8954-5a249f792c1e@linaro.org> Date: Sat, 16 Dec 2023 00:54:52 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 5/5] 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, jsnitsel@redhat.com, quic_bjorande@quicinc.com, mani@kernel.org, quic_eberman@quicinc.com, robdclark@chromium.org, u.kleine-koenig@pengutronix.de, robh@kernel.org, vladimir.oltean@nxp.com, quic_pkondeti@quicinc.com, quic_molvera@quicinc.com Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, qipl.kernel.upstream@quicinc.com References: <20231215101827.30549-1-quic_bibekkum@quicinc.com> <20231215101827.30549-6-quic_bibekkum@quicinc.com> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3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Dxz7rFFGX1KmTkdRtcgC6F3NfuNYkYDAQgHwsF2BBgBCAAgFiEEU24if9oCL2zd AAQVR4cBcg5dfFgFAmQ5bvICGwwACgkQR4cBcg5dfFju1Q//Xta1ShwL0MLSC1KL1lXGXeRM 8arzfyiB5wJ9tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20231215101827.30549-6-quic_bibekkum@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 15.12.2023 11:18, Bibek Kumar Patro wrote: > Default MMU-500 reset operation disables context caching in > prefetch buffer. It is however expected for context banks using > the ACTLR register to retain their prefetch value during reset > and runtime suspend. > > Replace default MMU-500 reset operation with Qualcomm specific reset > operation which envelope the default reset operation and re-enables > context caching in prefetch buffer for Qualcomm SoCs. > > Signed-off-by: Bibek Kumar Patro > --- This probably deserves a fixes tag, but I can't find a good commit for it, so I guess not having it is fine as well. Also, since it seems to be independent from the rest of the patches, please reorder it to become patch 1 in the next spin, so that it can perhaps be easily picked up independently of the rest. > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 23 +++++++++++++++++++--- > 1 file changed, 20 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 c8f5dd4186b7..70d2a5d43993 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > @@ -516,11 +516,28 @@ static int qcom_smmu_def_domain_type(struct device *dev) > return match ? IOMMU_DOMAIN_IDENTITY : 0; > } > > +static int qcom_smmu500_reset(struct arm_smmu_device *smmu) > +{ > + int i; > + u32 reg; That's rather nitty/codestyle-y, but: - reverse Christmas tree would be nice (it's in a week! :D) - "reg" to me sounds like "register address", "val" is used widely for register values > + > + arm_mmu500_reset(smmu); We should check the return value here, in case the function is modified some day in a way that makes it return something else than 0 LGTM otherwise! Konrad