From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Wright, Chuck" <Charles.A.Wright@snapon.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Memcpy() on MPC5200B
Date: Tue, 23 Sep 2008 12:39:17 -0400 [thread overview]
Message-ID: <9e4733910809230939wbb89470kca4e4b5c8e6250c6@mail.gmail.com> (raw)
In-Reply-To: <C0DD8F5AD4467E45B3D82B7D7A57885B16E2559E@LISL-XBCK-C1-V2.snaponglobal.com>
On Mon, Sep 22, 2008 at 4:07 PM, Wright, Chuck
<Charles.A.Wright@snapon.com> wrote:
> I've found a case where memcpy() is failing on copies longer that 4
> bytes.
>
> Closer investigation found that the destination pointer is not pointing
> to a word aligned address.
>
> The problem comes from the JFFS2 driver where there is a struct that is
> being used to create the destination pointer for the memcpy() function.
There is a thread about this problem here:
http://thread.gmane.org/gmane.linux.drivers.mtd/21521
I don't believe it has been resolved yet.
>
> If I insert my own padding into the struct, my memcpy() problems go
> away!
> I'm concerned that this problem may be lurking in other areas of code.
> (I get no warnings during compile)
>
> On the MPC5200B processor, is that the assumed behavior for an unaligned
> memcpy()??
> Is there a gcc option to force word alignment??
>
> I'm using a MontaVista supplied kernel and compiler. (not my choice!)
> Unfortunately, six weeks later, MontaVista is still confused.
>
> Thanks for any help you can offer,
>
> Chuck Wright
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Jon Smirl
jonsmirl@gmail.com
prev parent reply other threads:[~2008-09-23 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1567.1222082514.3127.linuxppc-dev@ozlabs.org>
2008-09-22 20:07 ` Memcpy() on MPC5200B Wright, Chuck
2008-09-23 16:39 ` Jon Smirl [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=9e4733910809230939wbb89470kca4e4b5c8e6250c6@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=Charles.A.Wright@snapon.com \
--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;
as well as URLs for NNTP newsgroup(s).