From: Yinghai Lu <yinghai@kernel.org>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH 0/4] memblock related fixes for -tip
Date: Wed, 06 Oct 2010 15:57:17 -0700 [thread overview]
Message-ID: <4CACFECD.3090304@kernel.org> (raw)
In-Reply-To: <4CACFDAD.3090900@goop.org>
On 10/06/2010 03:52 PM, Jeremy Fitzhardinge wrote:
> On 10/04/2010 02:57 PM, Yinghai Lu wrote:
>> Please check memblock related patches
>>
>> [PATCH 1/4] memblock: Fix big size with find_region()
>> [PATCH -v5 2/4] x86, memblock: Fix crashkernel allocation
>> [PATCH 3/4] x86, memblock: Remove __memblock_x86_find_in_range_size()
>> [PATCH 4/4] x86, mm, memblock, 32bit: Make add_highpages honor early reserved ranges
>>
>> first one should get into core/memblock branch, and others should be in x86/mm/memeblock branch
>
> I also need this to avoid an early crash under Xen. The Xen init code
> ends up calling memblock_x86_reserve_range() before
> x86_64_start_reservations().
>
> Also in git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
> memblock
>
> J
>
> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> Date: Tue, 21 Sep 2010 17:05:35 -0700
> Subject: [PATCH] memblock: allow memblock_init to be called early
>
> The Xen setup code needs to call memblock_x86_reserve_range() very early,
> so allow it to initialize the memblock subsystem before doing so. The
> second memblock_init() is ignored.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
>
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 7d46c84..63b83ce 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -30,6 +30,7 @@
> #include <linux/console.h>
> #include <linux/pci.h>
> #include <linux/gfp.h>
> +#include <linux/memblock.h>
>
> #include <xen/xen.h>
> #include <xen/interface/xen.h>
> @@ -1183,6 +1184,8 @@ asmlinkage void __init xen_start_kernel(void)
> local_irq_disable();
> early_boot_irqs_off();
>
> + memblock_init();
> +
> xen_raw_console_write("mapping kernel into physical memory\n");
> pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages);
>
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 9ad3969..ae8b06c 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -752,6 +752,12 @@ void __init memblock_analyze(void)
>
> void __init memblock_init(void)
> {
> + static int init_done __initdata = 0;
> +
> + if (init_done)
> + return;
> + init_done = 1;
> +
How about
+ if (memblock.memory.regions)
+ return;
> /* Hookup the initial arrays */
> memblock.memory.regions = memblock_memory_init_regions;
> memblock.memory.max = INIT_MEMBLOCK_REGIONS;
>
next prev parent reply other threads:[~2010-10-06 22:58 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 21:57 [PATCH 0/4] memblock related fixes for -tip Yinghai Lu
2010-10-06 22:52 ` Jeremy Fitzhardinge
2010-10-06 22:57 ` Yinghai Lu [this message]
2010-10-06 22:59 ` H. Peter Anvin
2010-10-07 18:31 ` Jeremy Fitzhardinge
2010-11-03 5:05 ` Debug patches for memblock Yinghai Lu
2010-11-03 5:13 ` Jeremy Fitzhardinge
2010-10-12 0:01 ` [tip:core/memblock] memblock: Allow memblock_init to be called early tip-bot for Jeremy Fitzhardinge
2010-10-12 18:41 ` [PATCH 0/4] memblock related fixes for -tip Jeremy Fitzhardinge
2010-10-12 18:45 ` Yinghai Lu
2010-10-12 21:12 ` Yinghai Lu
2010-10-12 21:42 ` Jeremy Fitzhardinge
2010-10-12 21:50 ` H. Peter Anvin
2010-10-12 22:02 ` Yinghai Lu
2010-10-12 21:42 ` H. Peter Anvin
2010-10-12 22:01 ` Yinghai Lu
2010-10-12 22:10 ` H. Peter Anvin
2010-10-12 23:37 ` Jeremy Fitzhardinge
2010-10-13 5:40 ` Yinghai Lu
2010-10-13 16:31 ` Jeremy Fitzhardinge
2010-10-13 18:12 ` Yinghai Lu
2010-10-13 18:20 ` H. Peter Anvin
2010-10-13 20:03 ` Jeremy Fitzhardinge
2010-10-13 21:03 ` H. Peter Anvin
2010-10-13 23:02 ` Jeremy Fitzhardinge
2010-10-13 23:07 ` H. Peter Anvin
2010-10-14 0:31 ` [tip:core/memblock] xen: Cope with unmapped pages when initializing kernel pagetable tip-bot for Jeremy Fitzhardinge
2010-10-13 22:06 ` [PATCH 0/4] memblock related fixes for -tip Yinghai Lu
2010-10-13 23:07 ` Jeremy Fitzhardinge
2010-10-13 23:14 ` Jeremy Fitzhardinge
2010-10-13 23:18 ` H. Peter Anvin
2010-10-13 23:34 ` Jeremy Fitzhardinge
2010-10-14 0:08 ` Yinghai
2010-10-14 0:24 ` Jeremy Fitzhardinge
2010-10-14 0:27 ` H. Peter Anvin
2010-10-14 0:31 ` [tip:core/memblock] x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S tip-bot for Jeremy Fitzhardinge
2010-10-14 5:57 ` Ingo Molnar
2010-10-14 5:59 ` Ingo Molnar
2010-10-14 6:06 ` Ingo Molnar
2010-10-14 6:07 ` Yinghai Lu
2010-10-14 6:37 ` Ingo Molnar
2010-10-14 7:03 ` Yinghai Lu
2010-10-14 7:42 ` tip-bot for Jeremy Fitzhardinge
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=4CACFECD.3090304@kernel.org \
--to=yinghai@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=vgoyal@redhat.com \
/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