lmb type features.

From: Yinghai
Date: Fri May 14 2010 - 19:53:22 EST


like you to make some change to lmb_type and double_array()

struct lmb_type {
unsigned long cnt; /* number of regions */
unsigned long max; /* size of the allocated array */
struct lmb_region *regions;
};

==>

struct lmb_type {
unsigned long cnt; /* number of regions */
unsigned long max; /* size of the allocated array */
unsigned long features;
struct lmb_region *regions;
};


then have

#define LMB_ADD_MERGE (1<<0)
#define LMB_ARRAY_DOUBLE (1<<1)

so before call double_lmb_array(), should check the features to bit is set or not.
otherwise should emit PANIC with clear message.

Usage:

for range replacement,

1. early stage before lmb.reserved, lmb.memory is there.
so can not use lmb_find_base yet.

2. for bootmem replacement, when do range set subtraction for final free range list,
don't want to change lmb.reserved in the middle. callee should make sure to have big
enough temperately lmb_regions in lmb_type.

Thanks

Yinghai

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/