jffs2 and unaligned access
dzu at denx.de
Thu May 8 23:19:50 EST 2008
>>> memcpy_from/to_io() use word aligned accesses on the io side of
>>> The MPC5200 local plus bus where our flashes are connected does not
>>> allow unaligned accesses, so we have to use the io versions of memcpy.
>> But this region of flash is marked as suitable for execute-in-place,
>> otherwise the point() function wouldn't be working to give a direct
>> pointer to it. It sounds like we shouldn't be allowing that.
>> Which in turn means that perhaps we should have a property in the
>> corresponding node in the device-tree which indicates that it's not
>> suitable for direct access?
> This isn't usually a property of the flash device, but of the various
> buses/controllers above the flash device.
I wholeheartedly agree. After all, its the Local+ bus playing games
here. And fixing that for JFFS2 only ignores that other devices can
*and will* be connected on this bus. Unaligned accesses to such devices
will also fail (likely from mtd unrelated code) - and fail silently,
taking quite a while to figure out what is going wrong where.
> The device tree should mimic reality (and it does, it just seems the
> kernel doesn't use this information yet?)
How is this exactly supposed to work?
In the topologic hell the beer is packed in Klein's bottles.
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
More information about the Linuxppc-dev