[lkml]   [2008]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
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.


 \ /
  Last update: 2008-04-26 23:13    [W:0.093 / U:0.252 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site