lkml.org 
[lkml]   [2008]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git pull] "big box" x86 changes, boot protocol
Adrian Bunk wrote:
>>> + memcpy(&early_res[i], &early_res[i + 1],
>>> + (j - 1 - i) * sizeof(struct early_res));

>> nit: memcpy() shouldn't be used for overlapping copies. It happens to be
>> OK (for dst<src) in the kernel implementations. We hope.
>> ...
>
> We always use the gcc builtin for memcpy() here.
>

You have to do something pretty weird for memcpy() to not work for
dst <= src even with overlap; this usually involves architectures that
have explicit cache control instructions to establish the dst in the
cache, if used before src is read.

This is not an issue on x86, though.

-hpa


\
 
 \ /
  Last update: 2008-04-26 23:13    [from the cache]
©2003-2011 Jasper Spaans