[patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-18 Thread Bernhard Walle
This flag changes the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE. If that flag is set, the function returns with -EBUSY if the memory already has been reserved in the past. This is to avoid conflicts. Because it's necessary to unreserve the bootmem if a collision is discover

Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-18 Thread Bernhard Walle
* Vivek Goyal <[EMAIL PROTECTED]> [2007-10-17 13:05]: > > > I think we should unreserve the chunks of memory we have reserved so > far (Memory reserved from sidx to i), in case of error. True. Next version is coming. Thanks, Bernhard - To unsubscribe from this list: send the line "unsubscri

Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-17 Thread Vivek Goyal
On Wed, Oct 17, 2007 at 01:36:51PM +0200, Bernhard Walle wrote: [..] > > > +static int __init reserve_bootmem_core(bootmem_data_t *bdata, unsigned > > > long addr, > > > + unsigned long size, int flags) > > > { > > > unsigned long sidx, eidx; > > > unsigned lon

Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-17 Thread Bernhard Walle
* Vivek Goyal <[EMAIL PROTECTED]> [2007-10-17 13:05]: > > [..] > > +/* > > + * 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(unsig

Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-17 Thread Vivek Goyal
[..] > +/* > + * 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_boo

Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-16 Thread Dave Hansen
On Tue, 2007-10-16 at 20:44 +0200, Bernhard Walle wrote: > * Dave Hansen <[EMAIL PROTECTED]> [2007-10-16 20:08]: > > On Tue, 2007-10-16 at 18:28 +0200, Bernhard Walle wrote: > > > > > > @@ -736,7 +736,7 @@ static int __init smp_scan_config (unsig > > > smp_found_config = 1;

Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-16 Thread Bernhard Walle
Hi, * Dave Hansen <[EMAIL PROTECTED]> [2007-10-16 20:08]: > On Tue, 2007-10-16 at 18:28 +0200, Bernhard Walle wrote: > > > > @@ -736,7 +736,7 @@ static int __init smp_scan_config (unsig > > smp_found_config = 1; > > printk(KERN_INFO "found SMP MP-ta

Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-16 Thread Dave Hansen
On Tue, 2007-10-16 at 18:28 +0200, Bernhard Walle wrote: > > @@ -736,7 +736,7 @@ static int __init smp_scan_config (unsig > smp_found_config = 1; > printk(KERN_INFO "found SMP MP-table at %08lx\n", > vi

[patch 2/3] Introduce BOOTMEM_EXCLUSIVE

2007-10-16 Thread Bernhard Walle
This flag changes the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE. If that flag is set, the function returns with -EBUSY if the memory already has been reserved in the past. This is to avoid conflicts. IMPORTANT: The patch is only proof of concept. This means that it's only f