Update of /cvsroot/gc-linux/linux/kernel
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv17071/kernel
Modified Files:
kexec.c
Log Message:
Rewind to v2.6.31.
Index: kexec.c
===================================================================
RCS file: /cvsroot/gc-linux/linux/kernel/kexec.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** kexec.c 25 Oct 2009 18:59:28 -0000 1.5
--- kexec.c 9 Dec 2009 18:18:07 -0000 1.6
***************
*** 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 */
|