x86: split e820 reserved entries record to late v4
this one replaces:
| commit a2bd7274b4
| Author: Yinghai Lu <yhlu.kernel@gmail.com>
| Date: Mon Aug 25 00:56:08 2008 -0700
|
| x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3
v2: insert e820 reserve resources before pnp_system_init
v3: fix merging problem in tip/x86/core
v4: address Linus's review about comments and condition in _late()
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:

committed by
H. Peter Anvin

parent
58f7c98850
commit
a5444d15b6
@@ -1271,12 +1271,12 @@ static inline const char *e820_type_to_string(int e820_type)
|
||||
/*
|
||||
* Mark e820 reserved areas as busy for the resource manager.
|
||||
*/
|
||||
struct resource __initdata *e820_res;
|
||||
static struct resource __initdata *e820_res;
|
||||
void __init e820_reserve_resources(void)
|
||||
{
|
||||
int i;
|
||||
u64 end;
|
||||
struct resource *res;
|
||||
u64 end;
|
||||
|
||||
res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
|
||||
e820_res = res;
|
||||
@@ -1293,6 +1293,12 @@ void __init e820_reserve_resources(void)
|
||||
res->end = end;
|
||||
|
||||
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
|
||||
/*
|
||||
* don't register the region that could be conflicted with
|
||||
* pci device BAR resource and insert them later in
|
||||
* pcibios_resource_survey()
|
||||
*/
|
||||
if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20))
|
||||
insert_resource(&iomem_resource, res);
|
||||
res++;
|
||||
@@ -1313,7 +1319,7 @@ void __init e820_reserve_resources_late(void)
|
||||
|
||||
res = e820_res;
|
||||
for (i = 0; i < e820.nr_map; i++) {
|
||||
if (e820.map[i].type == E820_RESERVED && res->start >= (1ULL<<20))
|
||||
if (!res->parent && res->end)
|
||||
insert_resource(&iomem_resource, res);
|
||||
res++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user