| To: | linux-kernel <Linux-kernel@zh-kernel.org> |
|---|---|
| Subject: | Question about kimage_alloc_page in kexec.c, bug? |
| From: | "wilbur.chan" <wilbur512@gmail.com> |
| Date: | Mon, 11 Oct 2010 22:46:59 +0800 |
| Cc: | Linux MIPS Mailing List <linux-mips@linux-mips.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=TTqD4T0KK9BXxrcatrm5Ed+7BfUesTeg0vVU78nCd9vITmZibQQ2AKwCGF6SKAWWJT jq0MXUDImThQKzWid1OcFOFzTBWdZZ5ldbZGBt67VOjNqCOM/NijS9IH7bCJZ6ZCOAJd unaRnIxW1aOk5FFe2E9nku3a8EGZwsHe3yVLo= |
| 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=cPd3GAA/iibUufg/M3IHx977V9t7OL4Ug6xcbn/bgkkElm/DAq5Jd40PWdfjl6uERl /zYDN72S/qtQrpyaP3yX86BDDyeqacQIMBPQ58xO/05Kra6shRZ2mGPtEAsdXbi/oL+T FpaYp10wGj+gDtIou3iscX1cmGqWR3cHD9G94= |
| 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: | Re: [PATCH 14/14] MIPS: Octeon: Apply CN63XXP1 errata workarounds., Ralf Baechle |
|---|---|
| Next by Date: | Question about kimage_alloc_page in kexec.c, bug?, wilbur.chan |
| Previous by Thread: | [PATCH v3 resend] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS, Deng-Cheng Zhu |
| Next by Thread: | Re: Question about kimage_alloc_page in kexec.c, bug?, Américo Wang |
| Indexes: | [Date] [Thread] [Top] [All Lists] |