Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp162978rbb; Fri, 23 Feb 2024 16:09:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUBsFXtpxWTmJqkLjLfdbKwH81YXAY7d4887qbWzHzHmlXABo2N27kgEIU1Up4uLieRre0Vhqi3XePMjcN+bHAd0wxptC9oI8FH/0nrMA== X-Google-Smtp-Source: AGHT+IFqurKOW+m4jlzmHJ3/o1rFPeZeUPrheEjJBQY7mfkGymjUi6svHg2RPOouz52EClakullx X-Received: by 2002:a17:902:ea09:b0:1db:f696:b09 with SMTP id s9-20020a170902ea0900b001dbf6960b09mr1651405plg.14.1708733354080; Fri, 23 Feb 2024 16:09:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708733353; cv=pass; d=google.com; s=arc-20160816; b=skJ7ZCWswEYneX7piVH2QqPDkSY+DWi4weByma0CYvgh6B/8PDG4LCqOn2aC6eTFY9 fwQAnFblJBJGPDlZ7YkUKZEN3WcGuLIKH9ZT9rPu6PCBhE1WUd9GN9RhsF+9Zp2sCAob zDYVHQYQ13O+ZeJpqkMi0vehOjJIBaeFQEm8yq4vjjFQPE72hipengwxdthBDAPw9sX8 qJpv9+/jRSfNAVhZVyYH+dZkKCnfNC7pDlgGDQFgKz+S3ZkOizYEcu7KL3p5obR2t1KD nwUK0FHuMsgcmWISNG9JAfcyt6+gpG/4eLB2d5LtvSqZRYg5kwFDI4r3Z5eIYxbxTXXk V3ew== ARC-Message-Signature: i=2; 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=6SOHcP8DrDhZ2e1SgGmWFGExWevqxMGqoGRYxVcIJl8=; fh=qwce0Ie6t3mWqNDvyf4iGwx6ru6AZsBy17WxEPQ2Obk=; b=QZRRc4NvPlQHnbjHG3p9r/VOKbbgKcLzl4z2LYPgzGIymaD2drBdrl8GC481hmkn0W JD/ptgbYJqrI+5EOc+9wQ1iND9e8V6/80pAs3i51iLuFIGa0c0GxXVA/Epudd0V0bYm/ eqlNCfj1/IXkck0q7RICLNJK9k1Pg+FUCBmFb6UuwhHtv/4vIW1kEhQ7PG/9mk6LrMBq andAgjyJT61pzzsshVKstRNWjDCZF8UxOECmv5nzRDAG4dK9WSkuGWa+My/mOjqenmt7 0jH3hriilJsiqD/YxXH2GZocPYXRQAD1eN9CuB9a8RrPLV436+Ah4w0InmmZAoNsvv0h W7gw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hLMTI8JS; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-79338-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79338-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ma4-20020a170903094400b001dc64999b6dsi11313plb.48.2024.02.23.16.09.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 16:09:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79338-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hLMTI8JS; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-79338-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79338-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B7A21B24313 for ; Sat, 24 Feb 2024 00:07:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A897383; Sat, 24 Feb 2024 00:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hLMTI8JS" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 5E37C19A for ; Sat, 24 Feb 2024 00:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708733254; cv=none; b=QO3Aa7JL4rAI0goRbTWTdffc6DVQCfu3JlvG9gqjivb0YUhccvQXEzdztzCdkyvnigfG/5uw/2seNpW7+/XZF9s1jysEuoWPvrrvbrAqfgY64x69mCLtY4QPFYGm63+0bGjdj+/c3N24bI6t1hf2OCqEtPyXwBeCwG3/7mnsP+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708733254; c=relaxed/simple; bh=2o21MVF3HyO3lY0XRfIs2jlh9WAVsOYPA8puXNidXdw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aNnHI4ny061cFPVP1fo7l9z3O2GXYGoAXawgU9LFu/bgWlKAty32Ix8cqtQOFTCEQFCBWxkWonjszvsTz4XXvibk84MYm6APYkuah+mIp6bfTX15+A++TZFhNWZesTxUcLktFYRsRnCkqVM4G4+IZ3xTX4Q+rD9MfxZIpH6AiuI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hLMTI8JS; arc=none smtp.client-ip=209.85.208.48 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-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-56454c695e6so2533617a12.0 for ; Fri, 23 Feb 2024 16:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708733251; x=1709338051; 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=6SOHcP8DrDhZ2e1SgGmWFGExWevqxMGqoGRYxVcIJl8=; b=hLMTI8JSpC6OyOCpDQqlWMeZMs2/xNJ+McMAZDnKJd+QLq/X/JhT90b5QJqGZlidyi MEI7Daan/CrTW/ifqAmmwkO87/aTRs6UTY29pZX7sXPI9vV2DE3AmDMkEMC/kEAidGFF IoQNJ6xTVOyLn59kduEdwnQa/2UXkJv8YZUKa+JuecC+eIugIJlVz0gOUbNZObD5RUYH D4NDAjLDunMTn24GV+NRYhDDz3Xk7aJdol+x8CqhRGPuEgJUoWlc1Kxb749WkdxhZhbp vvPv67SDxgvW3q7J1bMzI+WXfCS9Ddw9zP24WG9DZuHIRS7/NwYUw+zfpAtvXohAexef 4kzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708733251; x=1709338051; 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=6SOHcP8DrDhZ2e1SgGmWFGExWevqxMGqoGRYxVcIJl8=; b=qCZseNm7g1/d/cN9Z6zPL/NqvzUs5juubv3ykKY9pEp4mnAUyRCmByAwrX5jeN/oO5 3+1COu59LR21ExuMfiA7jGgHk4iXwb3O+Hcp7Jhcyp82zoRnyeCfhGMqIZPC0k2aH7lc Mp65Aj4yMIhm6fwfhqWw37+ggflNAAOLOpj/N6bTW8MK3CRBf2qJpji8MqhyfAgbw1Rw w9qVlQy5Y5xEvSMwG2RRq1vSnnypPyswTa501EqVKEhX9MyGMoyDMUuPc4kLu8r3iLBW qfloeKOHvJErPQwhebQHTI0SjUXDgyxAAPJdwvUE9tg5Ea7nKjpdLzETEbBUmRdhDw27 u78A== X-Forwarded-Encrypted: i=1; AJvYcCV55xsP1dx1VQDgbsRcL/BNNOjUcDbrYaxCFbKobJDKFkMiSqpUxLsncuy3Nv1ZduXFh2K/yjuUKuldU5Y6CeDcJV9GwZL9I88Aikce X-Gm-Message-State: AOJu0YxV8NaUY4gcXv2+4wE+ZM7wBWfRvuTp/dZnEMezR3jSxhewII/W H+B11jztgbSCcOzwNVpyOVykWqIg6G4kCrHTHCAsSeBw17Hey4KE2v4N4pjiEsE= X-Received: by 2002:a05:6402:528c:b0:565:26e7:4987 with SMTP id en12-20020a056402528c00b0056526e74987mr1257577edb.5.1708733250749; Fri, 23 Feb 2024 16:07:30 -0800 (PST) Received: from [192.168.179.2] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id z6-20020a50cd06000000b00563918a48cfsm40041edi.40.2024.02.23.16.07.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Feb 2024 16:07:30 -0800 (PST) Message-ID: <640775cb-3508-4228-aa94-2e4b7b6b2b6d@linaro.org> Date: Sat, 24 Feb 2024 01:07:26 +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 v5 2/3] PCI: qcom-ep: Enable cache coherency for SA8775P EP Content-Language: en-US To: Mrinmay Sarkar , andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, manivannan.sadhasivam@linaro.org, robh@kernel.org Cc: quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, dmitry.baryshkov@linaro.org, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, quic_schintav@quicinc.com, Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org References: <1708697021-16877-1-git-send-email-quic_msarkar@quicinc.com> <1708697021-16877-3-git-send-email-quic_msarkar@quicinc.com> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJH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XgB+IW8ESflz6nDY3b5KQRF8Z6XLP0+IEdLOOARkOW7yEgorBgEEAZdVAQUBAQdAwmUx xrbSCx2ksDxz7rFFGX1KmTkdRtcgC6F3NfuNYkYDAQgHwsF2BBgBCAAgFiEEU24if9oCL2zd 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: <1708697021-16877-3-git-send-email-quic_msarkar@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 23.02.2024 15:03, Mrinmay Sarkar wrote: > Due to some hardware changes, SA8775P has set the NO_SNOOP attribute > in its TLP for all the PCIe controllers. NO_SNOOP attribute when set, > the requester is indicating that there no cache coherency issues exit > for the addressed memory on the host i.e., memory is not cached. But > in reality, requester cannot assume this unless there is a complete > control/visibility over the addressed memory on the host. > > And worst case, if the memory is cached on the host, it may lead to > memory corruption issues. It should be noted that the caching of memory > on the host is not solely dependent on the NO_SNOOP attribute in TLP. > > So to avoid the corruption, this patch overrides the NO_SNOOP attribute > by setting the PCIE_PARF_NO_SNOOP_OVERIDE register. This patch is not > needed for other upstream supported platforms since they do not set > NO_SNOOP attribute by default. > > Signed-off-by: Mrinmay Sarkar > --- > drivers/pci/controller/dwc/pcie-qcom-ep.c | 20 +++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c > index 89d06a3e6e06..369954649254 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c > +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c > @@ -45,6 +45,7 @@ > #define PARF_SLV_ADDR_MSB_CTRL 0x2c0 > #define PARF_DBI_BASE_ADDR 0x350 > #define PARF_DBI_BASE_ADDR_HI 0x354 > +#define PARF_NO_SNOOP_OVERIDE 0x3d4 Any reason for this to be unsorted? Konrad