On Mon, Oct 11, 2010 at 10:46:59PM +0800, wilbur.chan wrote: >Hi all ! > >I have a question on kimage_alloc_page: > ... You can Cc me on kexec/kdump issues. :) > > >If a page frame is right at physical address 0x20000000 , then when calling > >machine_kexec , the following code: > >*ptr = (unsigned long) phys_to_virt(*ptr); > >will generate an virtual address of 0xa0000000 = 0x20000000+0x80000000 , which > >results in physical address 0. > > > >should it be like this? : > >--- kexec.c 2010-08-27 07:47:12.000000000 +0800 >+++ kexec.changed.c 2010-10-11 22:04:08.000000000 +0800 >@@ -723,7 +723,7 @@ > if (!page) > return NULL; > /* If the page cannot be used file it away */ >- if (page_to_pfn(page) > >+ if (page_to_pfn(page) >= > (KEXEC_SOURCE_MEMORY_LIMIT >> PAGE_SHIFT)) { > list_add(&page->lru, &image->unuseable_pages); > continue; > No, this could break x86_64. IMHO, what needs to fix is the definition of KEXEC_SOURCE_MEMORY_LIMIT on MIPS, something like: - #define KEXEC_SOURCE_MEMORY_LIMIT (0x20000000) + #define KEXEC_SOURCE_MEMORY_LIMIT (0x1FFFFFFF) Thanks.