Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp222504rdb; Thu, 30 Nov 2023 03:09:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjSjbl00ukxHchUpsPeGN2FyQMiQH8u9p2EnEEghwd3mkZKNQvgBnfFYBcYR/bzaKes7xX X-Received: by 2002:a17:903:41ce:b0:1cf:c3fb:a982 with SMTP id u14-20020a17090341ce00b001cfc3fba982mr16761647ple.63.1701342575490; Thu, 30 Nov 2023 03:09:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701342575; cv=none; d=google.com; s=arc-20160816; b=JSSs+xCCCEllOhFxYl5vQHH75BTMzp4BD9k/Oriqa8a9PcoRSs07mmxkLv9cqOkR+r X/HcnE0cQzDR2cYPD+h1seHyKm9IQoytznotQMXAWxbLZS9ATYt4BiVPpgU5wUu6MuEI BvKAz8kRKxsdYBQwBlUEvPhGR+D/AwaijUjRVZFMo04McBEBiEcm7DRruHrMxU24AuwJ Fm5LEwU8CPqorT2n8uVEAszU+8uQTHxph/+0yaWHR6l9y4qoYs4Gqeh5gMjxOddspNod 7iURXQ+5n70JABNqC0KnaUcZIhRieGvHp5RcsqMbSSojju0G79O6CmrLOkGKu4Q6VBG+ t5lw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JCmK8OY2WGXA1urE5/0p6YZ/LWKl8hq+oP4bzwF/kWw=; fh=Gt3dvVwkI9aXON0jnyQiOTHydopSGjc9s9B2A1aKkkI=; b=z9jDx0qPeQ1pKSjWo9vagGXjsY/ZS4Abf2lfioUbpn6T8bnonDPWCi+GThWCyi8DbT 3tHmTefGEzIJ9IYroc+Az5APTGTX+jubKLI+0/LXQvLb0phJ1jMg9vkExec4/JmdGTaM AotKLdwAICFNI5x+/wz/Rzp0mEVhnhc+pw3vEIjeC8uP5+W9EMX0pkLOPKgmY185bkv6 kUWDNSR7MPX6wKP2ZOrb4xK27bGtk0GMX1ySoXThKXEterN9HLU78cwd3ZEYDBN/82JX WH1um4HBTlP6NP4aYScrt837ToTdZ3Dqv0/rJpBIUTT6tmhXRq9IWKVinbr0TSr5eXue BrSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OYzBZDxD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x17-20020a170902ea9100b001cfc16938f1si992699plb.253.2023.11.30.03.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 03:09:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OYzBZDxD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 758A580B0256; Thu, 30 Nov 2023 03:09:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231847AbjK3LJR (ORCPT + 99 others); Thu, 30 Nov 2023 06:09:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231784AbjK3LJQ (ORCPT ); Thu, 30 Nov 2023 06:09:16 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEAA8D50 for ; Thu, 30 Nov 2023 03:09:22 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2070EC433C7; Thu, 30 Nov 2023 11:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701342562; bh=Ru4WQmcJUKrycn4IJ/0atltkGnWEKud46x+afC3D4ys=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OYzBZDxDRw0pSYCLScCWeeGgqgDTVIqDbXAuhJIvEfYo0ielkyz2KFHq3b9qfxKGV rV9EPS9Bifaidvw4JJetCCRXy7L3tfoUEDe7W5l4bdOzqiSt3YIOKJGd4TBORIZrMv 7lbdAYMv01VGCOIk2CgfYHVjCQnw9Wz4E170T+mnh+XQF/qD8SNfovvG8Wlh7RBaGP Ee0dKV0IBoFoJ7+s7pqsBsGaxTtRqf5APKKKIvdGa2F0yPbmq6x0J9rKTD0SrZ2SlK Uel90TkuVj2/IuJt8JyX3gMtk5FbTG3A75j1M/KJpdF9omBE8DrWp1QjPrU1+JDbyC mb1DSAQS9rPDw== Date: Thu, 30 Nov 2023 16:39:09 +0530 From: Manivannan Sadhasivam To: Konrad Dybcio Cc: Manivannan Sadhasivam , Mrinmay Sarkar , agross@kernel.org, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, robh+dt@kernel.org, quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, dmitry.baryshkov@linaro.org, robh@kernel.org, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, quic_parass@quicinc.com, quic_schintav@quicinc.com, quic_shijjose@quicinc.com, Lorenzo Pieralisi , Krzysztof =?utf-8?Q?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 Subject: Re: [PATCH v4 1/3] PCI: qcom: Enable cache coherency for SA8775P RC Message-ID: <20231130110909.GQ3043@thinkpad> References: <1700577493-18538-1-git-send-email-quic_msarkar@quicinc.com> <1700577493-18538-2-git-send-email-quic_msarkar@quicinc.com> <20231130052116.GA3043@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Thu, 30 Nov 2023 03:09:32 -0800 (PST) On Thu, Nov 30, 2023 at 11:09:59AM +0100, Konrad Dybcio wrote: > On 30.11.2023 06:21, Manivannan Sadhasivam wrote: > > On Tue, Nov 21, 2023 at 08:08:11PM +0530, Mrinmay Sarkar wrote: > >> In a multiprocessor system cache snooping maintains the consistency > >> of caches. Snooping logic is disabled from HW on this platform. > >> Cache coherency doesn’t work without enabling this logic. > >> > >> 8775 has IP version 1.34.0 so intruduce a new cfg(cfg_1_34_0) for this > >> platform. Assign no_snoop_override flag into struct qcom_pcie_cfg and > >> set it true in cfg_1_34_0 and enable cache snooping if this particular > >> flag is true. > >> > > > > I just happen to check the internal register details of other platforms and I > > see this PCIE_PARF_NO_SNOOP_OVERIDE register with the reset value of 0x0. So > > going by the logic of this patch, this register needs to be configured for other > > platforms as well to enable cache coherency, but it seems like not the case as > > we never did and all are working fine (so far no issues reported). > > Guess we know that already [1] > Bummer! I didn't look close into that reply :/ > The question is whether this override is necessary, or the default > internal state is OK on other platforms > I digged into it further... The register description says "Enable this bit x to override no_snoop". So NO_SNOOP is the default behavior unless bit x is set in this register. This means if bit x is set, MRd and MWd TLPs originating from the desired PCIe controller (Requester) will have the NO_SNOOP bit set in the header. So the completer will not do any cache management for the transaction. But this also requires that the address referenced by the TLP is not cacheable. My guess here is that, hw designers have enabled the NO_SNOOP logic by default and running into coherency issues on the completer side. Maybe due to the addresses are cacheable always (?). And the default value of this register has no impact on the NO_SNOOP attribute unless specific bits are set. But I need to confirm my above observations with HW team. Until then, I will hold on to my Nack. - Mani > Konrad > > [1] https://lore.kernel.org/linux-arm-msm/cb4324aa-8035-ce6e-94ef-a31ed070225c@quicinc.com/ -- மணிவண்ணன் சதாசிவம்