summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorEmanuele Ghidoli <[email protected]>2026-04-29 12:03:56 +0200
committerTom Rini <[email protected]>2026-05-04 12:58:47 -0600
commit2c733e6c85576b86358885c0a9462a0337797653 (patch)
treef99a923d49254705f14a9b9c9576da83fd223f78 /include/linux
parent0fd32094c04ff736977d88dea02c299a75965c4f (diff)
common: memsize: fix occasionally failing alias probing
probe_ram_size_by_alias() detects whether a probe address still aliases a lower address by writing through one address and reading through the other. On i.MX95 this occasionally reported a false non-alias when the alias read happened immediately after the write. A memory barrier alone, mb(), was tested but did not make the failure go away. This suggests that ordering the CPU accesses is not sufficient for this probe, likely because the issue is in the path to the memory controller rather than in the core itself. Read the written address back before checking the alias address. This appears to force the write to become observable at the probe address before using the alias read to decide whether the tested address range exists. If the readback does not match the written pattern, restore the saved value and continue with the next check. This keeps the probe robust for addresses that do not reliably retain the test pattern. Fixes: 0977448b45e2 ("common: memsize: add RAM size probe based on alias detection") Signed-off-by: Emanuele Ghidoli <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions