From: sashiko-bot@kernel.org
To: "Martino Dell'Ambrogio" <tillo@tillo.ch>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: mediatek: mt7986a-bananapi-bpi-r3: add ramoops region
Date: Thu, 28 May 2026 09:58:13 +0000 [thread overview]
Message-ID: <20260528095814.2C8B01F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260528093038.1945245-1-tillo@tillo.ch>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The `ramoops` reserved-memory node is missing the `no-map` property, leading to initialization failure and preventing the driver from loading.
- [Low] The commit message mathematically miscalculates the memory layout and fundamentally misrepresents how `ramoops` allocates space for ECC parity.
--
commit b448b96b8ca8171732f9a19b1cb33fbb0c73f34d
Author: Martino Dell'Ambrogio <tillo@tillo.ch>
arm64: dts: mediatek: mt7986a-bananapi-bpi-r3: add ramoops region
This patch reserves a 64 KiB memory region for pstore/ramoops on the
BPI-R3 board. The carve-out is intended to store kernel log data to
persist across warm resets.
> The carve-out is divided into 8 KiB kmsg records, a 32 KiB rolling console,
> 8 KiB ftrace, and 8 KiB pmsg, leaving the remainder for the per-record
> Reed-Solomon ECC parity (ecc-size=16) which significantly improves dump
> readability when the panic path truncates writes mid-record.
[Severity: Low]
Is this description of the ECC parity location accurate?
With 32 KiB for the console, 8 KiB for ftrace, 8 KiB for pmsg, and two 8 KiB
kmsg records, the allocations sum to exactly 64 KiB, leaving 0 bytes of
remainder.
It appears the ramoops driver implements ECC by carving the ecc-size
directly out of the payload capacity of each individual zoned region, rather
than placing it in a separate remainder pool.
Could the commit message be updated to clarify how the ECC parity is actually
allocated within the zones?
> diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
> index 19f538d160ab5..31ee189dedc73 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
[ ... ]
> +&{/reserved-memory} {
> + ramoops@42ff0000 {
> + compatible = "ramoops";
> + reg = <0 0x42ff0000 0 0x10000>;
> + record-size = <0x2000>;
> + console-size = <0x8000>;
> + ftrace-size = <0x2000>;
> + pmsg-size = <0x2000>;
> + ecc-size = <16>;
> + };
> +};
[Severity: High]
Does this reserved memory node need the no-map property to function correctly?
Since this region sits within the system DRAM starting at 0x40000000,
without no-map the OS will incorporate it into the kernel's linear mapping
as Normal Cacheable memory.
When the pstore/ramoops driver attempts to map this region using ioremap_wc(),
will ioremap_prot() on ARM64 detect the attempt to remap active RAM with
different memory attributes and trigger an aliasing violation warning,
returning NULL and preventing the driver from loading?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260528093038.1945245-1-tillo@tillo.ch?part=1
next prev parent reply other threads:[~2026-05-28 9:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 9:30 [PATCH] arm64: dts: mediatek: mt7986a-bananapi-bpi-r3: add ramoops region Martino Dell'Ambrogio
2026-05-28 9:58 ` sashiko-bot [this message]
2026-05-28 12:36 ` [PATCH v2] arm64: dts: mediatek: mt7988a-bananapi-bpi-r4: " Martino Dell'Ambrogio
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=20260528095814.2C8B01F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tillo@tillo.ch \
/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