From: Albert H. <he...@us...> - 2009-10-25 18:53:55
|
Update of /cvsroot/gc-linux/linux/kernel In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31851/kernel Modified Files: kexec.c Log Message: Rewind to v2.6.30. Index: kexec.c =================================================================== RCS file: /cvsroot/gc-linux/linux/kernel/kexec.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kexec.c 25 Oct 2009 18:50:28 -0000 1.2 --- kexec.c 25 Oct 2009 18:53:46 -0000 1.3 *************** *** 581,591 **** ! static inline int kimage_add_page_with_flags(struct kimage *image, ! unsigned long page, int flags) { int result; page &= PAGE_MASK; ! result = kimage_add_entry(image, page | (flags & ~PAGE_MASK)); if (result == 0) image->destination += PAGE_SIZE; --- 581,590 ---- ! static int kimage_add_page(struct kimage *image, unsigned long page) { int result; page &= PAGE_MASK; ! result = kimage_add_entry(image, page | IND_SOURCE); if (result == 0) image->destination += PAGE_SIZE; *************** *** 594,607 **** } - static int kimage_add_page(struct kimage *image, unsigned long page) - { - return kimage_add_page_with_flags(image, page, IND_SOURCE); - } - - static int kimage_add_page_noalloc(struct kimage *image, unsigned long page) - { - return kimage_add_page_with_flags(image, page, IND_SOURCE|IND_NOALLOC); - } - static void kimage_free_extra_pages(struct kimage *image) --- 593,596 ---- *************** *** 622,646 **** } - int kimage_add_preserved_region(struct kimage *image, unsigned long to, - unsigned long from, int length) - { - int result = 0; - - if (length > 0) { - result = kimage_set_destination(image, to); - if (result < 0) - goto out; - while (length > 0) { - result = kimage_add_page_noalloc(image, from); - if (result < 0) - goto out; - from += PAGE_SIZE; - length -= PAGE_SIZE; - } - } - out: - return result; - } - #define for_each_kimage_entry(image, ptr, entry) \ for (ptr = &image->head; (entry = *ptr) && !(entry & IND_DONE); \ --- 611,614 ---- *************** *** 674,682 **** */ ind = entry; - } else if (entry & IND_SOURCE) { - /* free only entries that we really allocated */ - if (!(entry & IND_NOALLOC)) - kimage_free_entry(entry); } } /* Free the final indirection page */ --- 642,648 ---- */ ind = entry; } + else if (entry & IND_SOURCE) + kimage_free_entry(entry); } /* Free the final indirection page */ |