From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Johannes Weiner" <hannes@saeurebad.de>
Cc: "Jeremy Fitzhardinge" <jeremy@goop.org>,
"Ingo Molnar" <mingo@elte.hu>,
"kernel list" <linux-kernel@vger.kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: Suspected regression in "x86: extend e820 ealy_res support 32bit"
Date: Wed, 21 May 2008 16:23:38 -0700 [thread overview]
Message-ID: <86802c440805211623j459ff12o82e96ede85b745f8@mail.gmail.com> (raw)
In-Reply-To: <87lk232qt3.fsf@saeurebad.de>
On Wed, May 21, 2008 at 4:14 PM, Johannes Weiner <hannes@saeurebad.de> wrote:
> Hi,
>
> "Yinghai Lu" <yhlu.kernel@gmail.com> writes:
>
>> On Wed, May 21, 2008 at 11:19 AM, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>>> I'm seeing a crash in current x86.git tip/auto-latest when booting under
>>> Xen. The crash is rather early, but it's in __alloc_bootmem_core() in the
>>> final memset clear. Apparently the allocator is returning a bad page.
>>>
>>> This points to changes in the setup of the bootmem allocator, and the
>>> changes "x86: extend e820 ealy_res support 32bit" make to
>>> arch/x86/kernel/setup_32.c:setup_bootmem_allocator() looks like the most
>>> likely suspect. Unfortunately its a rather large patch which is not easy to
>>> revert, so I haven't actually confirmed this yet.
>>
>>
>> thanks. please check the attached patch
>>
>> YH
>>
>> [PATCH] x86: bootmap size fix for 32 bit
>>
>> Jeremy Fitzhardinge found
>> x86: extend e820 ealy_res support 32bit
>> cause regression...
>>
>> in setup_bootmem_allocator
>>
>> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
>>
>> diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
>> index f38d840..938c7b3 100644
>> --- a/arch/x86/kernel/setup_32.c
>> +++ b/arch/x86/kernel/setup_32.c
>> @@ -566,17 +566,22 @@ static void __init relocate_initrd(void)
>>
>> void __init setup_bootmem_allocator(void)
>> {
>> + unsigned long bootmap_pages;
>> unsigned long bootmap_size, bootmap;
>> /*
>> * Initialize the boot-time allocator (with low memory only):
>> */
>> - bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT;
>> + bootmap_pages = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT;
>
> Forgot to remove the shift?
>
>> bootmap = find_e820_area(min_low_pfn<<PAGE_SHIFT,
>> - max_low_pfn<<PAGE_SHIFT, bootmap_size,
>> + max_low_pfn<<PAGE_SHIFT,
>> + bootmap_pages<<PAGE_SHIFT,
>
> Because this value is hardly sane anymore.
>
>> PAGE_SIZE);
>> if (bootmap == -1L)
>> panic("Cannot find bootmem map of size %ld\n", bootmap_size);
>> bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, max_low_pfn);
>> + printk(KERN_INFO " bootmap [%016lx - %016lx] pages %lx\n",
>> + bootmap, bootmap + bootmap_size - 1,
>> + bootmap_pages);
>> register_bootmem_low_pages(max_low_pfn);
>> early_res_to_bootmem(0, max_low_pfn<<PAGE_SHIFT);
>> reserve_bootmem(bootmap, bootmap_size, BOOTMEM_DEFAULT);
>
> Besides, what did you want to accomplish?
please drop this patch...
YH
prev parent reply other threads:[~2008-05-21 23:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <483467CD.90401@goop.org>
2008-05-21 20:35 ` Yinghai Lu
2008-05-21 22:01 ` Jeremy Fitzhardinge
2008-05-21 22:40 ` Yinghai Lu
2008-05-21 23:23 ` Jeremy Fitzhardinge
2008-05-22 1:43 ` Yinghai Lu
2008-05-21 23:14 ` Johannes Weiner
2008-05-21 23:23 ` Yinghai Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86802c440805211623j459ff12o82e96ede85b745f8@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=hannes@saeurebad.de \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®