From: sashiko-bot@kernel.org
To: "Andre Przywara" <andre.przywara@arm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org,
linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 4/7] pinctrl: sunxi: support A733 generation MMIO register layout
Date: Thu, 10 Sep 2026 14:05:19 +0000 [thread overview]
Message-ID: <20260910140520.82EEE1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260910133519.459011-5-andre.przywara@arm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] sunxi_irq_base_reg() fails to translate the logical IRQ bank index to the physical hardware GPIO bank index for NCAT3 layout, ignoring `irq_bank_map`.
--
commit 45892bb17e985dc02bb352c830f93cc75106e307
Author: Andre Przywara <andre.przywara@arm.com>
pinctrl: sunxi: support A733 generation MMIO register layout
This commit adds support for the A733 SoC generation MMIO register layout.
It introduces the SUNXI_PINCTRL_NCAT3_REG_LAYOUT flag and updates bank
offsets, sizes, and IRQ register positions to accommodate the new hardware
design.
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.h b/drivers/pinctrl/sunxi/pinctrl-sunxi.h
> index 15aa6fe62dbbc..d09467ed437a3 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.h
> +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.h
[ ... ]
> @@ -238,6 +248,10 @@ static inline u32 sunxi_irq_hw_bank_num(const struct sunxi_pinctrl_desc *desc,
>
> static inline u32 sunxi_irq_base_reg(const struct sunxi_pinctrl *pctl, u16 bank)
> {
> + if (pctl->flags & SUNXI_PINCTRL_NCAT3_REG_LAYOUT)
> + return pctl->bank_offset + bank * pctl->bank_mem_size +
> + A733_IRQ_REGS_OFFSET;
> +
[Severity: Critical]
Does this new branch need to translate the logical IRQ bank index to the
physical hardware GPIO bank index?
By directly using bank * pctl->bank_mem_size instead of converting the
logical index via sunxi_irq_hw_bank_num(), could this calculate the wrong
physical addresses on SoCs with sparse IRQ capabilities?
For example, when sunxi_pinctrl_irq_handler() iterates over logical
IRQ banks and calls sunxi_irq_status_reg_from_bank() which then calls
sunxi_irq_base_reg(), will the handler read the wrong hardware register?
Could this cause the handler to see no pending interrupts and exit without
clearing the actual interrupt, leading to an infinite interrupt loop and
hard system lockup for level-triggered interrupts?
> return IRQ_REGS_OFFSET +
> sunxi_irq_hw_bank_num(pctl->desc, bank) * IRQ_MEM_SIZE;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260910133519.459011-1-andre.przywara@arm.com?part=4
next prev parent reply other threads:[~2026-09-10 14:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 13:35 [PATCH 0/7] pinctrl: sunxi: Add Allwinner A733 support Andre Przywara
2026-09-10 13:35 ` [PATCH 1/7] pinctrl: sunxi: rename SUNXI_PINCTRL_NEW_REG_LAYOUT Andre Przywara
2026-09-10 13:35 ` [PATCH 2/7] pinctrl: sunxi: only use PortK special handling on A523 Andre Przywara
2026-09-10 14:56 ` Chen-Yu Tsai
2026-09-10 13:35 ` [PATCH 3/7] pinctrl: sunxi: refactor IRQ register accessors Andre Przywara
2026-09-10 13:35 ` [PATCH 4/7] pinctrl: sunxi: support A733 generation MMIO register layout Andre Przywara
2026-09-10 14:05 ` sashiko-bot [this message]
2026-09-10 13:35 ` [PATCH 5/7] dt-bindings: pinctrl: add compatible for Allwinner A733 Andre Przywara
2026-09-10 13:35 ` [PATCH 6/7] pinctrl: sunxi: a523-r: add a733-r compatible string Andre Przywara
2026-09-10 14:15 ` sashiko-bot
2026-09-10 13:35 ` [PATCH 7/7] pinctrl: sunxi: add support for the Allwinner A733 Andre Przywara
2026-09-10 14:30 ` sashiko-bot
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=20260910140520.82EEE1F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=andre.przywara@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=robh@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox