Messages in this thread | | | Date | Sat, 26 Apr 2008 14:10:13 -0700 | From | "H. Peter Anvin" <> | Subject | Re: [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
| |