[PATCH v2] mtd: Use I/O memory accessors when in an uncached
Edward Adam Davis
eadavis at sina.com
Fri Nov 20 01:44:34 PST 2026
On Fri, 20 Nov 2026 09:25:02 +0100, Miquel Raynal wrote:
> > Thank you for your contribution! Sashiko AI review found 2 potential
> > issues to consider:
> > - [High] mtd: phram: uncached ioremap() pointer exposed via
> > phram_point()
One point needs correction:
_point and _unpoint should only be registered when phram->cached is true,
because the I/O map is used exclusively when the mapping is uncached.
> > - [Low] mtd: phram: inaccurate Fixes trailer and truncated commit
> > message
I'll update the subject in the v3;
285133040e6c ("arm64: Import latest memcpy()/memmove() implementation")
In ARM64's __pi_memcpy_generic (arch/arm64/lib/memcpy.S), copies between
33 and 128 bytes branch to L(copy32_128):
L(copy32_128):
ldp A_l, A_h, [src]
ldp B_l, B_h, [src, 16]
ldp C_l, C_h, [srcend, -32]
Here:
src = 0xffff80009594b000
count = 0x44
srcend = src + count = 0xffff80009594b044
srcend - 32 = 0xffff80009594b024
The instruction ldp x10, x11, [x4, #-32] attempts a 16-byte pair load
from address 0xffff80009594b024, which is only 4-byte aligned (offset
0x24). Because the address points into Device-nGnRE memory, the MMU
generates a Data Abort alignment fault (ESR = 0x96000021, FSC = 0x21),
leading to the reported kernel Oops.
It was introduced by commit 285133040e6c, so I add the Fixes tag for
285133040e6c.
>
> These issues look plausible, I'll let you answer them.
BR,
Edward
More information about the linux-mtd
mailing list