login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
17
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Vivek Goyal <vgoyal@...>
To: Bernhard Walle <bwalle@...>
Cc: <linux-kernel@...>, <kexec@...>, <akpm@...>, <ak@...>
Subject:
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
Date: Wednesday, October 17, 2007 - 7:05 am
[..]
quoted text
> +/* > + * If flags is 0, then the return value is always 0 (success). If > + * flags contains BOOTMEM_EXCLUSIVE, then -EBUSY is returned if the > + * memory already was reserved. > + */ > +extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags); > #define alloc_bootmem(x) \ > __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) > #define alloc_bootmem_low(x) \ > --- a/mm/bootmem.c > +++ b/mm/bootmem.c > @@ -111,8 +111,8 @@ static unsigned long __init init_bootmem > * might be used for boot-time allocations - or it might get added > * to the free page pool later on. > */ > -static void __init reserve_bootmem_core(bootmem_data_t *bdata, unsigned long addr, > - unsigned long size) > +static int __init reserve_bootmem_core(bootmem_data_t *bdata, unsigned long addr, > + unsigned long size, int flags) > { > unsigned long sidx, eidx; > unsigned long i; > @@ -133,7 +133,11 @@ static void __init reserve_bootmem_core( > #ifdef CONFIG_DEBUG_BOOTMEM > printk("hm, page %08lx reserved twice.\n", i*PAGE_SIZE); > #endif > + if (flags & BOOTMEM_EXCLUSIVE) > + return -EBUSY;
I think we should unreserve the chunks of memory we have reserved so far (Memory reserved from sidx to i), in case of error. Thanks Vivek -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[patch 2/3] Introduce BOOTMEM_EXCLUSIVE
, Bernhard Walle
, (Tue Oct 16, 12:28 pm)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
, Vivek Goyal
, (Wed Oct 17, 7:05 am)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
, Bernhard Walle
, (Thu Oct 18, 7:15 am)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
, Bernhard Walle
, (Wed Oct 17, 7:36 am)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
, Vivek Goyal
, (Thu Oct 18, 12:32 am)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
, Dave Hansen
, (Tue Oct 16, 2:08 pm)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
, Bernhard Walle
, (Tue Oct 16, 2:44 pm)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE
, Dave Hansen
, (Tue Oct 16, 2:58 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Linus Torvalds
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Eric Paris
[RFC 0/5] [TALPA] Intro to a linux interface for on access scanning
Ingo Molnar
Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3
git
:
linux-netdev
:
Gerrit Renker
[PATCH 18/37] dccp: Support for Mandatory options
David Miller
[GIT]: Networking
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Andrew Morton
Re: [BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
2 users
and
787 guests
online.
Online users
howard45
jsdschuck
Syndicate