Messages in this thread Patch in this message | | | Date | Sat, 26 Apr 2008 23:17:15 +0200 | From | Ingo Molnar <> | Subject | Re: [git pull] "big box" x86 changes, boot protocol |
| |
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > We always use the gcc builtin for memcpy() here. > > It's probably hard to write a reasonable x86 memcpy() that wouldn't > happen to do the right thing for this case, but I do agee - we should > still use memmove() for this, just to make it clear that it does > overlapping things.
agreed, i queued up the patch below.
Ingo
-------------> Subject: bootprotocol: cleanup From: Ingo Molnar <mingo@elte.hu> Date: Sat Apr 26 23:14:36 CEST 2008
Signed-off-by: Ingo Molnar <mingo@elte.hu> --- arch/x86/kernel/e820_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-x86.q/arch/x86/kernel/e820_64.c =================================================================== --- linux-x86.q.orig/arch/x86/kernel/e820_64.c +++ linux-x86.q/arch/x86/kernel/e820_64.c @@ -100,7 +100,7 @@ void __init free_early(unsigned long sta for (j = i + 1; j < MAX_EARLY_RES && early_res[j].end; j++) ; - memcpy(&early_res[i], &early_res[i + 1], + memmove(&early_res[i], &early_res[i + 1], (j - 1 - i) * sizeof(struct early_res)); early_res[j - 1].end = 0;
| |