Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp922066lqb; Fri, 15 Mar 2024 09:57:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWR26CT+ej99fGCrGRokf4kFqNn6XxuB9nyn9ksV3FefLhz3NuNz0JmniM1+NSMUnGCNYqYsl6bN9rvHIvwXI2B2CqyM8n3OYePsNTY1Q== X-Google-Smtp-Source: AGHT+IESFb1juv+4avSeg1AY3zlAimk9Elw66Vqoh4OVvbLXK0vvnXxuB0LQQs+fUpUeRn+1zBvg X-Received: by 2002:a2e:6a07:0:b0:2d4:5ce9:f909 with SMTP id f7-20020a2e6a07000000b002d45ce9f909mr3865032ljc.17.1710521851520; Fri, 15 Mar 2024 09:57:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710521851; cv=pass; d=google.com; s=arc-20160816; b=kNqEqvqausnDdPSWaEHjjiMVaV3LygVQRypQMEHd0e58UJ/z+9tp3zLl8KMY75s3eN sHpuBs6UvymJU3ZNYXi9n8fEiCwAoI/kiLokq7ywpreKZ68s11hqEDz4xPVvg+9EaxD6 haJGnvZ01AY7NANJJqjHqOsht8qMHlVbnlD/h0F657ufbUwwkfV3lopGt0n0VZ3N56B8 ay1J4cVr6soGsi55boIwFF7g3/IseLt82T0uPo/BSiFIp1VV+dhF6aPdfD+iG/sOmfXl t9CsRvRCk9R0HFyFzEzFQSUHsLKs7IGd9T5e9GMpev+qNexvuGelAdsE+R1CcU+g1rfO 0xHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=b2OvpjB4R1d9adGfalyHvthJrYinwBmI4g7rGdH7XvQ=; fh=vxwmO19AUIBHZsRHTi3IYm4Dxwz5IuHwKkDDOPwwHnM=; b=c5YhyLzAsfnjLCdeMwg7+z2+9+6ElaIbw5LoydOnfIriPw+1gdXuoVR1Yf3dGEhirj bBtuPjn3UG0smLahlncQ1xb+zsg3NbpjKq269MZ6AWpluYURhKNOQ4/tZnJT8MNuAIgb w8xfoSjUnpearmREH37myYpJugwcOlDHHRVL4ZUndoMHrvG11Vjsk7fVMIBJGeq9kT1X uybKZnpi9jmRfZ4nLx162MxzaSuklc5qusTUP+T/zYgivyMuQI72G9QgUG/gkS8pXyS5 izrOBnLGkQ68lQTlI1zIqPIjnwdc8bwndof18486k1Ezua1XrEtfCOA9zx2qYvj2cPmE y+Nw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bYMrTgRi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-104648-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104648-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qx27-20020a170906fcdb00b00a466b52eb97si1785487ejb.602.2024.03.15.09.57.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 09:57:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104648-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bYMrTgRi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-104648-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104648-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 5E9431F26CB5 for ; Fri, 15 Mar 2024 16:47:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E55E245030; Fri, 15 Mar 2024 16:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bYMrTgRi" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EBD928F1; Fri, 15 Mar 2024 16:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710521264; cv=none; b=JntgiFsXtl7F824DeAECqn03nhkQWEmdwJGPjuRDRNhzvMm7+a25sADovINWZhA1Qk68cfgoa2mMfXkPmf/kyzC0e3fsBkIBMcJUlQB3BEVoMY9dVgbonZjaknDBXiO4OcDfoH9Qb1cQFwkDW6M3oyacP2suTNAB8YUR9x4legM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710521264; c=relaxed/simple; bh=JL5eSL26L69YUqhQ5+zJQo9l0y8hKk3BZ+EnlZ3I0ew=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mgX752XL4uINe/JMTIx/fTAia9Rmhmzv+1qLbDvVzIoOx0CQ3YAlt3JFlzjO+VuvVt/8IXIuQ3Qtf4rbQvrk2HnJgGPU7M8n+GoZFMAEX9bXXJSka5KWuDESQQ5wyxVdQEezJ+VcGZbK3RP1ql34dB40eOb72D6vd8HTKnjOj4c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bYMrTgRi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAA8AC433C7; Fri, 15 Mar 2024 16:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710521263; bh=JL5eSL26L69YUqhQ5+zJQo9l0y8hKk3BZ+EnlZ3I0ew=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bYMrTgRi1fAF0uJpaHYkRyXi7WMU9CRq/YAAwuGPJ96W4PBq+7ovToG4kCo/Wh9he 0FQhO8q2MPRkIiOYC/kBvrSn17yLoSkOuf8FKSraqnI1nDrVkmSWd3b9HAIjxCrUcW GTxUZ399ds/6rak0w56+JGj/BG6zNMnfuW+UzYueaEGHBHoExb0TPtkcV3wbwpWsl6 DC4p1cxQETsHR1wh8l06vm6qbgmR+PM1DhCRCJlViSSpd4bvVAPp7WSIZTZiNxLqdi +8v6sqK2++UPI8NRxHA+pHQBRnmAJnqj/speZyq2TwAD/ieIOKwMoDFbRCcM8YZN3A UWzjd3bXJuYZg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rlAim-000000000Nn-3x3C; Fri, 15 Mar 2024 17:47:53 +0100 Date: Fri, 15 Mar 2024 17:47:52 +0100 From: Johan Hovold To: Konrad Dybcio Cc: Bjorn Helgaas , Bjorn Andersson , Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: Re: [PATCH v2 2/3] PCI: qcom: Read back PARF_LTSSM register Message-ID: References: <20240215161114.GA1292081@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Mar 15, 2024 at 11:16:59AM +0100, Konrad Dybcio wrote: > On 2/16/24 07:52, Johan Hovold wrote: > > This makes no sense. As Bjorn already said, you're just polling for the > > link to come up (for a second). And unless you have something else that > > depends on the write to have reached the device, there is no need to > > read it back. It's not going to be cached indefinitely if that's what > > you fear. > > The point is, if we know that the hardware is expected to return "done" > within the polling timeout value of receiving the request to do so, we > are actively taking away an unknown amount of time from that timeout. We're talking about microseconds, not milliseconds or seconds as you seem to believe. > So, if the polling condition becomes true after 980ms, but due to write > buffering the value reached the PCIe hardware after 21 ms, we're gonna > hit a timeout. Or under truly extreme circumstances, the polling may > time out before the write has even arrived at the PCIe hw. So the write latency is not an issue here. Johan