From: sashiko-bot@kernel.org
To: "Alim Akhtar" <alim.akhtar@samsung.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 3/5] pinctrl: samsung: Add Exynos8855 pinctrl configuration
Date: Mon, 15 Jun 2026 08:49:32 +0000 [thread overview]
Message-ID: <20260615084933.0D93D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260615085252.1964423-4-alim.akhtar@samsung.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [High] The CMGP pin controller (instance 1) is missing the `.eint_wkup_init` callback, but its pin banks are configured for wakeup interrupts (`EINT_TYPE_WKUP`).
- [Low] The ALIVE and CMGP controllers erroneously configure `eint_gpio_init`, triggering spurious boot errors.
Pre-existing issues:
- [High] Calculating the PMU wakeup mask using the newly introduced, extremely sparse `eint_offset` values triggers C undefined behavior by shifting beyond 63 bits.
--
commit 9e3fddb96151cd82aa6084b7afbcf1a84a9843ef
Author: Alim Akhtar <alim.akhtar@samsung.com>
pinctrl: samsung: Add Exynos8855 pinctrl configuration
Add pinctrl configuration for Exynos8855. The bank type
macros are reused from Exynos850 SoC.
> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
> index fe9f92cb037ea..db120ae4d847a 100644
> --- a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
> +++ b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
[ ... ]
> +/* pin banks of exynos8855 pin-controller 0 (ALIVE) */
> +static const struct samsung_pin_bank_data exynos8855_pin_banks0[] __initconst = {
> + /* Must start with EINTG banks, ordered by EINT group number. */
> + EXYNOS850_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00),
[ ... ]
> + EXYNOS850_PIN_BANK_EINTW(1, 0x260, "gpj0", 0x4c),
> + EXYNOS850_PIN_BANK_EINTW(1, 0x280, "gpj1", 0x50),
> + EXYNOS850_PIN_BANK_EINTW(1, 0x2a0, "gpj2", 0x54),
[Severity: High]
This isn't a bug introduced by this patch, but the new Exynos8855 pin
definitions expose it. The new pin layout introduces extremely sparse
eint_offset values up to 0x54 (like gpj2 here).
In exynos_wkup_irq_set_wake(), the wake mask bit is calculated as:
unsigned long bit = 1UL << (2 * bank->eint_offset + irqd->hwirq);
...
eint_wake_mask_values[0] |= bit;
When computing the shift for an offset of 0x54 (84), the expression evaluates
to 1UL << 168. Since 1UL is 64 bits wide on ARM64, this left shift invokes
C undefined behavior.
Even ignoring the undefined behavior, the result is implicitly cast to u32
when OR'd into eint_wake_mask_values[0], effectively truncating it to 0.
Does this completely break PMU wakeup configuration for all pins with an
eint_offset >= 0x10?
> +};
[ ... ]
> +static const struct samsung_pin_ctrl exynos8855_pin_ctrl[] __initconst = {
> + {
> + /* pin-controller instance 0 ALIVE data */
> + .pin_banks = exynos8855_pin_banks0,
> + .nr_banks = ARRAY_SIZE(exynos8855_pin_banks0),
> + .eint_wkup_init = exynos_eint_wkup_init,
> + .eint_gpio_init = exynos_eint_gpio_init,
> + }, {
[Severity: Low]
Does the ALIVE controller need to configure eint_gpio_init?
Neither the ALIVE nor the CMGP instances contain any EINT_TYPE_GPIO banks
(they only contain EINT_TYPE_WKUP and EINT_TYPE_NONE). Because wake-up only
controllers typically do not have a generic hardware IRQ mapped for standard
GPIOs in the device tree, exynos_eint_gpio_init unconditionally attempts to
retrieve it, prints a spurious error, and returns -EINVAL:
dev_err(dev, "irq number not available\n");
Could this cause unnecessary boot log pollution and attempts to initialize
GPIO IRQ domains for zero eligible banks?
> + /* pin-controller instance 1 CMGP data */
> + .pin_banks = exynos8855_pin_banks1,
> + .nr_banks = ARRAY_SIZE(exynos8855_pin_banks1),
> + .eint_gpio_init = exynos_eint_gpio_init,
> + }, {
[Severity: High]
Is the .eint_wkup_init callback missing here for the CMGP pin controller?
The CMGP pin controller banks (exynos8855_pin_banks1) are exclusively defined
using the EXYNOS850_PIN_BANK_EINTW macro, which sets .eint_type to
EINT_TYPE_WKUP. However, this instance only configures .eint_gpio_init and
omits .eint_wkup_init.
During initialization, exynos_eint_gpio_init() skips any banks that are not
EINT_TYPE_GPIO. Because .eint_wkup_init is missing, it looks like the wakeup
interrupts for gpm0 through gpm21 will never be registered, leaving them
without functional external wakeup interrupts.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260615085252.1964423-1-alim.akhtar@samsung.com?part=3
next prev parent reply other threads:[~2026-06-15 8:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260615083410epcas5p162d288f0bb2431bdd3653011d7a72688@epcas5p1.samsung.com>
2026-06-15 8:52 ` [PATCH v2 0/5] Add minimal Exynos8855 SoC support Alim Akhtar
2026-06-15 8:52 ` [PATCH v2 1/5] dt-binding: ARM: samsung: Add Samsung Exynos8855 Alim Akhtar
2026-06-15 8:52 ` [PATCH v2 2/5] dt-binding: pinctrl: samsung: Add exynos8855-pinctrl compatible Alim Akhtar
2026-06-15 8:44 ` sashiko-bot
2026-06-17 10:20 ` Krzysztof Kozlowski
2026-06-23 10:44 ` Alim Akhtar
2026-06-15 8:52 ` [PATCH v2 3/5] pinctrl: samsung: Add Exynos8855 pinctrl configuration Alim Akhtar
2026-06-15 8:49 ` sashiko-bot [this message]
2026-06-15 14:14 ` Peter Griffin
2026-06-17 5:38 ` Alim Akhtar
2026-06-15 8:52 ` [PATCH v2 4/5] arm64: dts: exynos: add initial support for Samsung Exynos8855 smdk Alim Akhtar
2026-06-15 8:46 ` sashiko-bot
2026-06-15 14:37 ` Peter Griffin
2026-06-17 5:41 ` Alim Akhtar
2026-06-15 8:52 ` [PATCH v2 5/5] MAINTAINERS: Add entry for Samsung Exynos8855 SoC Alim Akhtar
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=20260615084933.0D93D1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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 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.