| To: | Linux MIPS Mailing List <linux-mips@linux-mips.org> |
|---|---|
| Subject: | Question about kimage_alloc_page in kexec.c, bug? |
| From: | "wilbur.chan" <wilbur512@gmail.com> |
| Date: | Mon, 11 Oct 2010 23:02:06 +0800 |
| Cc: | kexec@lists.infradead.org |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=OmHRLOKFUXHKw9ssjWirBxTDeLSL92vjC1yN1PM5kOw=; b=rxhbj/bqzjrJSmwdNEfvAPO55PLuQtEXsS+J+ZIEXM+sIbMXffZzIZGRXiO5GDgJQp 5wbj5TXhhegk1LwltJ54+QhBd9AWyCJ5QLH7TLpMJrcQXzaTLqhSDPB8+7AIiK/YjnvI SVdeyxwEJ5NH/oFVcFbuycjOV6utmowMdxWCs= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=grE9OHQkKu6a/48Km2TqDz32DhXYvDPGVAF8swkAxHpHHkadZyfDXRNcFVhm/lOcME G5rCGI+sA2BGB3ShsaT4p+J0Ve2ErV/RN5BXP/oILVO+3q6x0n5/pyQ1qajc4NjC35q5 Ub60EauPVCT9NMLd0C3lug9O5oNPbT+uBoMw0= |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
Hi all !
I have a question on kimage_alloc_page:
page = kimage_alloc_pages(gfp_mask, 0);
...
/* If the page cannot be used file it away */
if (page_to_pfn(page) > (KEXEC_SOURCE_MEMORY_LIMIT >> PAGE_SHIFT)) {
list_add(&page->lru, &image->unuseable_pages);
continue;
}
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;
Thank you
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Question about kimage_alloc_page in kexec.c, bug?, wilbur.chan |
|---|---|
| Next by Date: | Re: [PATCH 1/3] MIPS: Octeon: Add register definitions for ehci/ohci USB glue logic., Ralf Baechle |
| Previous by Thread: | Re: Question about kimage_alloc_page in kexec.c, bug?, Bernhard Walle |
| Next by Thread: | Re: [PATCH] arch: mips: use newly introduced hex_to_bin(), Andy Shevchenko |
| Indexes: | [Date] [Thread] [Top] [All Lists] |