From: sashiko-bot@kernel.org
To: "Tim Michals" <tcmichals@gmail.com>
Cc: linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 6/7] remoteproc: sunxi: add KUnit tests for da_to_va address translation
Date: Tue, 22 Sep 2026 03:54:49 +0000 [thread overview]
Message-ID: <20260922035450.1C8861F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922034711.190253-7-tcmichals@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] remoteproc: sunxi: test logic diverges from driver and misses PubSRAM C DA view
--
commit 2e1cbebc465781878f472c97dd7ec7e6f704ea63
Author: Tim Michals <tcmichals@gmail.com>
remoteproc: sunxi: add KUnit tests for da_to_va address translation
This commit introduces a KUnit test suite for the sunxi_rproc da_to_va()
function. It verifies address translation logic across various memory
window types and boundary conditions.
> diff --git a/drivers/remoteproc/sunxi_rproc_test.c b/drivers/remoteproc/sunxi_rproc_test.c
> new file mode 100644
> index 0000000000000..ea1a3331bc264
> --- /dev/null
> +++ b/drivers/remoteproc/sunxi_rproc_test.c
[ ... ]
> +/*
> + * Mirror of sunxi_rproc_da_to_va() logic from drivers/remoteproc/sunxi_rproc.c.
> + * Must be kept in sync with the driver. Divergence is a bug.
> + */
> +static void *test_da_to_va(struct test_sunxi_rproc *priv,
> + u64 da, size_t len, bool *is_iomem)
> +{
[Severity: Medium]
By duplicating the static driver logic into test_da_to_va() instead of
testing the actual sunxi_rproc_da_to_va() code, does this circumvent the
System Under Test and fundamentally defeat the purpose of regression testing?
Any future changes to the actual driver will not be tested by this suite,
and it relies entirely on manual synchronization.
> + if (len == 0)
> + return NULL;
> +
> + /* 1. Dedicated MCU Local SRAM Space 0 */
[ ... ]
> + /* High SRAM Space 0 fallback views */
> + if (da >= 0x3ff80000 && (da + len) <= (0x3ff80000 + priv->r_sram_size)) {
> + if (is_iomem)
> + *is_iomem = true;
> + return priv->r_sram_va + (da - 0x3ff80000);
> + }
> + if (da >= 0x3ffc0000 && (da + len) <= (0x3ffc0000 + priv->r_sram_size)) {
> + if (is_iomem)
> + *is_iomem = true;
> + return priv->r_sram_va + (da - 0x3ffc0000);
> + }
> + }
> +
> + /* 2. Switchable MCU Local SRAM Space 1 */
[Severity: Medium]
Does this duplicated logic introduce a silent coverage gap by completely
omitting the PubSRAM C DA view (0x00020000) block that is present in the
actual driver's translation logic?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260922034711.190253-1-tcmichals@gmail.com?part=6
next prev parent reply other threads:[~2026-09-22 3:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 3:47 [PATCH 0/7] remoteproc/mailbox: add Allwinner A523/A527/T527 E907 RISC-V support Tim Michals
2026-09-22 3:47 ` [PATCH 1/7] dt-bindings: mailbox: add Allwinner sun55i msgbox schema Tim Michals
2026-09-22 3:54 ` sashiko-bot
2026-09-22 8:54 ` Krzysztof Kozlowski
2026-09-22 3:47 ` [PATCH 2/7] mailbox: sun55i: add Allwinner sun55i/sun60i 4-port Message Box driver Tim Michals
2026-09-22 4:00 ` sashiko-bot
2026-09-22 3:47 ` [PATCH 3/7] mailbox: sun55i: add KUnit tests for routing and registers Tim Michals
2026-09-22 3:54 ` sashiko-bot
2026-09-22 3:47 ` [PATCH 4/7] dt-bindings: remoteproc: add allwinner sun55i rproc binding Tim Michals
2026-09-22 3:56 ` sashiko-bot
2026-09-22 8:58 ` Krzysztof Kozlowski
2026-09-22 12:46 ` Rob Herring (Arm)
2026-09-22 3:47 ` [PATCH 5/7] remoteproc: sunxi: add allwinner riscv remoteproc driver Tim Michals
2026-09-22 3:59 ` sashiko-bot
2026-09-22 3:47 ` [PATCH 6/7] remoteproc: sunxi: add KUnit tests for da_to_va address translation Tim Michals
2026-09-22 3:54 ` sashiko-bot [this message]
2026-09-22 3:47 ` [PATCH 7/7] arm64: dts: allwinner: add a523 msgbox and remoteproc nodes Tim Michals
2026-09-22 3:59 ` sashiko-bot
2026-09-22 6:34 ` [PATCH 0/7] remoteproc/mailbox: add Allwinner A523/A527/T527 E907 RISC-V support Chen-Yu Tsai
2026-09-27 0:20 ` [PATCH v2 0/7] remoteproc: sunxi: Add Allwinner XuanTie E907 RemoteProc and Message Box support Tim Michals
2026-09-27 0:20 ` [PATCH v2 1/7] dt-bindings: mailbox: add Allwinner sun55i msgbox schema Tim Michals
2026-09-27 0:30 ` sashiko-bot
2026-10-01 6:16 ` Krzysztof Kozlowski
2026-09-27 0:20 ` [PATCH v2 2/7] mailbox: sun55i: add Allwinner sun55i/sun60i 4-port Message Box driver Tim Michals
2026-09-27 0:33 ` sashiko-bot
2026-09-27 0:20 ` [PATCH v2 3/7] mailbox: sun55i: add KUnit test suite for sun55i msgbox driver Tim Michals
2026-09-27 0:31 ` sashiko-bot
2026-09-27 0:20 ` [PATCH v2 4/7] dt-bindings: remoteproc: add Allwinner sun55i-rproc schema Tim Michals
2026-09-27 0:27 ` sashiko-bot
2026-10-01 6:17 ` Krzysztof Kozlowski
2026-09-27 0:20 ` [PATCH v2 5/7] remoteproc: sunxi: add Allwinner XuanTie RISC-V remoteproc driver Tim Michals
2026-09-27 0:33 ` sashiko-bot
2026-09-27 0:20 ` [PATCH v2 6/7] remoteproc: sunxi: add KUnit test suite for sunxi " Tim Michals
2026-09-27 0:32 ` sashiko-bot
2026-09-27 0:20 ` [PATCH v2 7/7] arm64: dts: allwinner: add a523 msgbox and remoteproc nodes Tim Michals
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=20260922035450.1C8861F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tcmichals@gmail.com \
/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