[U-Boot] [PATCH] POST: Added ECC memory test for mpc83xx.

Timur Tabi timur.tabi at gmail.com
Tue Apr 6 17:45:46 CEST 2010


On Tue, Apr 6, 2010 at 10:29 AM, Michael Zaidman
<michael.zaidman at gmail.com> wrote:

> I thought that is what I actually do in this patch...

Not quite.  You're missing the memory barrier that the sync() function
includes.  You're doing this:

      __asm__ __volatile__("sync");

But the sync() macros does this:

static inline void sync(void)
{
	__asm__ __volatile__ ("sync" : : : "memory");
}

The "memory" tells the compiler that this function is a memory
barrier, which means it won't try to reorder any reads/writes *after*
the "sync".

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the U-Boot mailing list