All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Manikanta Maddireddy" <mmaddireddy@nvidia.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v3 2/2] arm64: tegra: fix aspm-l1-entry-delay-ns L1 latency cells
Date: Fri, 15 May 2026 07:45:12 +0000	[thread overview]
Message-ID: <20260515074512.7D727C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260515070753.3852840-3-mmaddireddy@nvidia.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Modifying device tree hardware descriptions to work around a mathematical bug in the driver's latency encoding logic.
- [Low] The commit message incorrectly states that the driver converts aspm-l1-entry-delay-ns to 'whole ms'.
--

commit bbff94096c8fb5346fe688ef1d463490a2efe6df
Author: Manikanta Maddireddy <mmaddireddy@nvidia.com>

arm64: tegra: fix aspm-l1-entry-delay-ns L1 latency cells

This commit updates the aspm-l1-entry-delay-ns property in Tegra194 and
Tegra234 device trees to larger values to adjust the L1 entrance latency
codes programmed by the driver.

> The Tegra194 PCIe driver converts aspm-l1-entry-delay-ns to whole ms
> with ceiling division, then derives the Synopsys DesignWare PORT_AFR L1

This isn't a bug, but there's a typo in the commit message. The driver
uses DIV_ROUND_UP(val, 1000) which converts nanoseconds to microseconds,
not milliseconds.

> diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> index 1d659454a6f9f..7bbf0e892724d 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
> @@ -2382,7 +2382,7 @@ pcie@14100000 {
>  			nvidia,aspm-cmrt-us = <60>;
>  			nvidia,aspm-pwr-on-t-us = <20>;
>  			nvidia,aspm-l0s-entrance-latency-us = <3>;
> -			aspm-l1-entry-delay-ns = <4000>;
> +			aspm-l1-entry-delay-ns = <8000>;

Does this work around a driver calculation bug by modifying the device tree
hardware descriptions?

Device tree properties are generally expected to accurately describe physical
hardware in an OS-agnostic way. The issue appears to stem from the driver
using order_base_2() to determine the latency bucket. For exact powers of
two, this returns the exact log2 value. For example, order_base_2(4) is 2.
Code 2 maps to the "2 us to <4 us" bucket, which is insufficient for exactly
4 us.

Could the driver's calculation logic be updated to handle boundary conditions
properly, rather than artificially inflating the hardware values in the
device tree files?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260515070753.3852840-1-mmaddireddy@nvidia.com?part=2

  reply	other threads:[~2026-05-15  7:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15  7:07 [PATCH v3 0/2] PCI: tegra194: ASPM L1 entrance latency from device tree Manikanta Maddireddy
2026-05-15  7:07 ` [PATCH v3 1/2] PCI: tegra194: Use aspm-l1-entry-delay-ns DT property for L1 entrance latency Manikanta Maddireddy
2026-05-15  7:07 ` [PATCH v3 2/2] arm64: tegra: fix aspm-l1-entry-delay-ns L1 latency cells Manikanta Maddireddy
2026-05-15  7:45   ` sashiko-bot [this message]
2026-05-15  8:38     ` Manikanta Maddireddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260515074512.7D727C2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mmaddireddy@nvidia.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.