public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Michal Sojka <sojkam1@fel•cvut.cz>
Cc: christophe leroy <christophe.leroy@c-s•fr>,
	Scott Wood <scottwood@freescale•com>,
	linuxppc-dev@lists•ozlabs.org
Subject: Re: memcpy regression
Date: Mon, 07 Sep 2015 11:14:10 +1000	[thread overview]
Message-ID: <1441588450.12945.1.camel@ellerman.id.au> (raw)
In-Reply-To: <87r3mb4603.fsf@steelpick.2x.cz>

Hi Michal,

Thanks for finding the problem.

On Sun, 2015-09-06 at 23:01 +0200, Michal Sojka wrote:
> 
> I found the problem. The compiler replaces an assignment with a call to
> memcpy. The following patch fixes the problem for me. However, I'm not
> sure whether this is the real solution. I guess the compiler is free to
> generate a call to memcpy wherever it wants so other compilers or other
> optimization levels may need fixes at other places. What do others
> think?

I think you're right that it's not a good solution, the compiler could generate
other calls to memcpy depending on various factors, and people will add new
code that causes memcpy to get called and it will break your platform.

Christophe, am I right that the problem here is that your new memcpy() doesn't
work until later in boot when caches are enabled?

cheers

  reply	other threads:[~2015-09-07  1:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04 13:33 memcpy regression Michal Sojka
2015-09-04 13:57 ` Christophe LEROY
2015-09-04 14:35   ` Michal Sojka
2015-09-04 18:10     ` christophe leroy
2015-09-04 19:49       ` Michal Sojka
2015-09-05  0:08         ` Michal Sojka
2015-09-06  8:18           ` christophe leroy
2015-09-06 19:05             ` Michal Sojka
2015-09-06 21:01               ` Michal Sojka
2015-09-07  1:14                 ` Michael Ellerman [this message]
2015-09-07  7:08                   ` Christophe LEROY
2015-09-07  8:40                     ` Michael Ellerman
2015-09-07  9:45                       ` Michal Sojka
2015-09-07 10:59                         ` David Laight
2015-09-08  3:54                           ` Michael Ellerman
2015-09-08  8:59                             ` David Laight

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=1441588450.12945.1.camel@ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=christophe.leroy@c-s$(echo .)fr \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=scottwood@freescale$(echo .)com \
    --cc=sojkam1@fel$(echo .)cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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