Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Thierry Reding" <thierry.reding@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 9/9] soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard
Date: Wed, 06 May 2026 22:37:13 +0000	[thread overview]
Message-ID: <20260506223714.A7F71C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260506-pmc-v1-9-a6de5da7216b@nvidia.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Moving `tegra_pmc_early_init()` entirely behind `#if defined(CONFIG_ARM)` drops critical interrupt polarity configuration on 64-bit ARM platforms.
--

commit 3d33d60e285505a610396bfade1e54d01280574f
Author: Thierry Reding <treding@nvidia.com>

soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard

This commit wraps legacy power management controller (PMC) code in a
CONFIG_ARM preprocessor guard. This separates legacy code from code needed
on modern 64-bit ARM platforms.

> diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
> --- a/drivers/soc/tegra/pmc.c
> +++ b/drivers/soc/tegra/pmc.c

[ ... ]

> @@ -4833,6 +4721,125 @@ static struct platform_driver tegra_pmc_driver = {
>  };
>  builtin_platform_driver(tegra_pmc_driver);
>  
> +#if defined(CONFIG_ARM)

[ ... ]

> @@ -4911,3 +4918,4 @@ static int __init tegra_pmc_early_init(void)
>  	return 0;
>  }
>  early_initcall(tegra_pmc_early_init);
> +#endif /* CONFIG_ARM */

Will wrapping tegra_pmc_early_init() entirely behind CONFIG_ARM prevent
interrupt polarity configuration on 64-bit ARM platforms?

Since CONFIG_ARM is only defined for 32-bit ARM (64-bit uses CONFIG_ARM64),
this skips the early initialization entirely on modern systems.

However, tegra_pmc_early_init() is the exclusive caller of
pmc->soc->setup_irq_polarity() after parsing the nvidia,invert-interrupt
device tree property.

Several 64-bit ARM SoCs (such as Tegra186, Tegra194, and Tegra234) define
and rely on this callback to configure the Wake AOWAKE control registers.

Does bypassing this initialization leave the hardware in a default state
that could cause system wake functionality from suspend to behave
incorrectly?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260506-pmc-v1-0-a6de5da7216b@nvidia.com?part=9

      reply	other threads:[~2026-05-06 22:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 13:41 [PATCH 0/9] soc/tegra: pmc: Clean up legacy code Thierry Reding
2026-05-06 13:41 ` [PATCH 1/9] ata: ahci_tegra: Explicitly specify PMC instance to use Thierry Reding
2026-05-06 13:54   ` Damien Le Moal
2026-05-06 13:41 ` [PATCH 2/9] drm/nouveau: tegra: " Thierry Reding
2026-05-06 13:41 ` [PATCH 3/9] drm/tegra: " Thierry Reding
2026-05-06 20:41   ` sashiko-bot
2026-05-06 13:41 ` [PATCH 4/9] media: vde: " Thierry Reding
2026-05-06 13:41 ` [PATCH 5/9] PCI: tegra: " Thierry Reding
2026-05-06 20:55   ` sashiko-bot
2026-05-06 13:41 ` [PATCH 6/9] usb: xhci: " Thierry Reding
2026-05-06 13:41 ` [PATCH 7/9] soc/tegra: pmc: Create PMC context dynamically Thierry Reding
2026-05-06 21:40   ` sashiko-bot
2026-05-06 13:41 ` [PATCH 8/9] soc/tegra: pmc: Remove unused legacy functions Thierry Reding
2026-05-06 13:42 ` [PATCH 9/9] soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard Thierry Reding
2026-05-06 22:37   ` sashiko-bot [this message]

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=20260506223714.A7F71C2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko@lists.linux.dev \
    --cc=thierry.reding@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox