All of lore.kernel.org
 help / color / mirror / Atom feed
From: WANG Cong <xiyou.wangcong@gmail.com>
To: Bernhard Walle <bwalle@suse.de>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	mingo@redhat.com, anderson@redhat.com, hpa@zytor.com,
	tglx@linutronix.de, vgoyal@redhat.com
Subject: Re: [patch 2/3] Add flags parameter to reserve_bootmem_generic()
Date: Sun, 8 Jun 2008 22:26:06 +0800	[thread overview]
Message-ID: <20080608142606.GE2487@hacking> (raw)
In-Reply-To: <20080608134629.743220278@halley.suse.de>

On Sun, Jun 08, 2008 at 03:46:30PM +0200, Bernhard Walle wrote:
>This patch adds a 'flags' parameter to reserve_bootmem_generic() like it
>already has been added in reserve_bootmem() with commit
>72a7fe3967dbf86cb34e24fbf1d957fe24d2f246.
>
>It also changes all users to use BOOTMEM_DEFAULT, which doesn't effectively
>change the behaviour. Since the change is x86-specific, I don't think it's
>necessary to add a new API for migration. There are only 4 users of that
>function.
>
>The change is necessary for the next patch, using reserve_bootmem_generic()
>for crashkernel reservation.
>
>
>Signed-off-by: Bernhard Walle <bwalle@suse.de>
>
>---
> arch/x86/kernel/e820_64.c |    3 ++-
> arch/x86/kernel/efi_64.c  |    3 ++-
> arch/x86/kernel/mpparse.c |    5 +++--
> arch/x86/mm/init_64.c     |   17 ++++++++++++-----
> include/asm-x86/proto.h   |    2 +-
> 5 files changed, 20 insertions(+), 10 deletions(-)
>
>--- a/arch/x86/kernel/e820_64.c
>+++ b/arch/x86/kernel/e820_64.c
>@@ -118,7 +118,8 @@ void __init early_res_to_bootmem(unsigne
> 			continue;
> 		printk(KERN_INFO "  early res: %d [%lx-%lx] %s\n", i,
> 			final_start, final_end - 1, r->name);
>-		reserve_bootmem_generic(final_start, final_end - final_start);
>+		reserve_bootmem_generic(final_start, final_end - final_start,
>+			BOOTMEM_DEFAULT);
> 	}
> }
> 
>--- a/arch/x86/kernel/efi_64.c
>+++ b/arch/x86/kernel/efi_64.c
>@@ -100,7 +100,8 @@ void __init efi_call_phys_epilog(void)
> void __init efi_reserve_bootmem(void)
> {
> 	reserve_bootmem_generic((unsigned long)memmap.phys_map,
>-				memmap.nr_map * memmap.desc_size);
>+				memmap.nr_map * memmap.desc_size,
>+				BOOTMEM_DEFAULT);
> }

Just one comment.

Since 'reserve_bootmem_generic' is changed from 'void' to 'int',
we should check its return value for failure when possible, right?


-- 
Hi, I'm a .signature virus, please copy/paste me to help me spread
all over the world.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: WANG Cong <xiyou.wangcong@gmail.com>
To: Bernhard Walle <bwalle@suse.de>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de,
	vgoyal@redhat.com, anderson@redhat.com
Subject: Re: [patch 2/3] Add flags parameter to reserve_bootmem_generic()
Date: Sun, 8 Jun 2008 22:26:06 +0800	[thread overview]
Message-ID: <20080608142606.GE2487@hacking> (raw)
In-Reply-To: <20080608134629.743220278@halley.suse.de>

On Sun, Jun 08, 2008 at 03:46:30PM +0200, Bernhard Walle wrote:
>This patch adds a 'flags' parameter to reserve_bootmem_generic() like it
>already has been added in reserve_bootmem() with commit
>72a7fe3967dbf86cb34e24fbf1d957fe24d2f246.
>
>It also changes all users to use BOOTMEM_DEFAULT, which doesn't effectively
>change the behaviour. Since the change is x86-specific, I don't think it's
>necessary to add a new API for migration. There are only 4 users of that
>function.
>
>The change is necessary for the next patch, using reserve_bootmem_generic()
>for crashkernel reservation.
>
>
>Signed-off-by: Bernhard Walle <bwalle@suse.de>
>
>---
> arch/x86/kernel/e820_64.c |    3 ++-
> arch/x86/kernel/efi_64.c  |    3 ++-
> arch/x86/kernel/mpparse.c |    5 +++--
> arch/x86/mm/init_64.c     |   17 ++++++++++++-----
> include/asm-x86/proto.h   |    2 +-
> 5 files changed, 20 insertions(+), 10 deletions(-)
>
>--- a/arch/x86/kernel/e820_64.c
>+++ b/arch/x86/kernel/e820_64.c
>@@ -118,7 +118,8 @@ void __init early_res_to_bootmem(unsigne
> 			continue;
> 		printk(KERN_INFO "  early res: %d [%lx-%lx] %s\n", i,
> 			final_start, final_end - 1, r->name);
>-		reserve_bootmem_generic(final_start, final_end - final_start);
>+		reserve_bootmem_generic(final_start, final_end - final_start,
>+			BOOTMEM_DEFAULT);
> 	}
> }
> 
>--- a/arch/x86/kernel/efi_64.c
>+++ b/arch/x86/kernel/efi_64.c
>@@ -100,7 +100,8 @@ void __init efi_call_phys_epilog(void)
> void __init efi_reserve_bootmem(void)
> {
> 	reserve_bootmem_generic((unsigned long)memmap.phys_map,
>-				memmap.nr_map * memmap.desc_size);
>+				memmap.nr_map * memmap.desc_size,
>+				BOOTMEM_DEFAULT);
> }

Just one comment.

Since 'reserve_bootmem_generic' is changed from 'void' to 'int',
we should check its return value for failure when possible, right?


-- 
Hi, I'm a .signature virus, please copy/paste me to help me spread
all over the world.

  reply	other threads:[~2008-06-08 14:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-08 13:46 [patch 0/3] [x86] Fix crashkernel reservation on NUMA machines Bernhard Walle
2008-06-08 13:46 ` Bernhard Walle
2008-06-08 13:46 ` [patch 1/3] Add return value to reserve_bootmem_node() Bernhard Walle
2008-06-08 13:46   ` Bernhard Walle
2008-06-08 13:46 ` [patch 2/3] Add flags parameter to reserve_bootmem_generic() Bernhard Walle
2008-06-08 13:46   ` Bernhard Walle
2008-06-08 14:26   ` WANG Cong [this message]
2008-06-08 14:26     ` WANG Cong
2008-06-08 17:12     ` Bernhard Walle
2008-06-08 17:12       ` Bernhard Walle
2008-06-08 22:01   ` Johannes Weiner
2008-06-08 22:01     ` Johannes Weiner
2008-06-09 13:22     ` Vivek Goyal
2008-06-09 13:22       ` Vivek Goyal
2008-06-09 16:23       ` Bernhard Walle
2008-06-09 16:23         ` Bernhard Walle
2008-06-09 16:39         ` Andi Kleen
2008-06-09 16:39           ` Andi Kleen
2008-06-09 19:50           ` Amul Shah
2008-06-09 19:50             ` Amul Shah
2008-06-09 20:17             ` Bernhard Walle
2008-06-09 20:17               ` Bernhard Walle
2008-06-09 20:29               ` Vivek Goyal
2008-06-09 20:29                 ` Vivek Goyal
2008-06-09 20:42                 ` Bernhard Walle
2008-06-09 20:42                   ` Bernhard Walle
2008-06-09 20:54                   ` Vivek Goyal
2008-06-09 20:54                     ` Vivek Goyal
2008-06-09 20:57                     ` Bernhard Walle
2008-06-09 20:57                       ` Bernhard Walle
2008-06-09 21:00                       ` Vivek Goyal
2008-06-09 21:00                         ` Vivek Goyal
2008-06-09 21:04                         ` Bernhard Walle
2008-06-09 21:04                           ` Bernhard Walle
2008-06-09 16:25     ` Bernhard Walle
2008-06-09 16:25       ` Bernhard Walle
2008-06-08 22:06   ` Johannes Weiner
2008-06-08 22:06     ` Johannes Weiner
2008-06-09 16:37     ` Bernhard Walle
2008-06-09 16:37       ` Bernhard Walle
2008-06-08 13:46 ` [patch 3/3] Use reserve_bootmem_generic() to reserve crashkernel memory on x86_64 Bernhard Walle
2008-06-08 13:46   ` Bernhard Walle
2008-06-09 13:06 ` [patch 0/3] [x86] Fix crashkernel reservation on NUMA machines Vivek Goyal
2008-06-09 13:06   ` Vivek Goyal
2008-06-10 12:44 ` Ingo Molnar
2008-06-10 12:44   ` Ingo Molnar

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=20080608142606.GE2487@hacking \
    --to=xiyou.wangcong@gmail.com \
    --cc=anderson@redhat.com \
    --cc=bwalle@suse.de \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.