JFFS2 corruption
David Woodhouse
dwmw2 at infradead.org
Sun Feb 8 12:13:09 EST 2004
On Sun, 2004-02-08 at 18:02 +0100, Florian Schirmer wrote:
> memcopy_fromio is memcpy on MIPS. I've checked the memcpy implementation in
> arch/mips/lib/memcpy.S and it is using byte transfers for remaining byte
> transfers. So i expect at least the MIPS and SH plattform to be broken for
> non buswidth==1 setups. Haven't checked other archs yet.
I don't understand. Why should it be broken? If your bus controller is
set up right for that region, byte loads ought to work fine. It'll
_issue_ a wider load, then pick the right byte from it.
What's happening is that it's picking the _wrong_ byte from it. Is the
bus controller set up to byte-swap transparently when we do 16-bit
access?
Can you show the result of a single 32-bit load, two consecutive 16-bit
loads, and four consecutive 8-bit loads all starting at the same
address?
> I'm wondering what assumptions can be made about memcpy's access patterns?
> Looks like nobody even guarantees a specific access type. But we need to make
> sure every access to the flash matches the bus width, don't we?
I don't think so. The bus controller really ought to handle this for us,
for reading.
--
dwmw2
More information about the linux-mtd
mailing list