From: Detlev Zundel <dzu@denx.de>
To: linux-mtd@lists.infradead.org
Cc: linuxppc-dev@ozlabs.org
Subject: Re: jffs2 and unaligned access
Date: Thu, 08 May 2008 15:19:50 +0200 [thread overview]
Message-ID: <m2tzh9rkzt.fsf@ohwell.denx.de> (raw)
In-Reply-To: 9146b2e7fde34e912d20e6ea954bb067@kernel.crashing.org
Hi,
>>> memcpy_from/to_io() use word aligned accesses on the io side of
>>> memory.
>>> 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?
Cheers
Detlev
--
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@denx.de
prev parent reply other threads:[~2008-05-08 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 10:27 jffs2 and unaligned access Sascha Hauer
2008-05-07 10:53 ` David Woodhouse
2008-05-07 13:25 ` Sascha Hauer
2008-06-05 21:38 ` Jon Smirl
2008-05-07 20:42 ` Segher Boessenkool
2008-05-08 13:19 ` Detlev Zundel [this message]
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=m2tzh9rkzt.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=linux-mtd@lists.infradead.org \
--cc=linuxppc-dev@ozlabs.org \
/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