diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-29 02:09:23 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-04 11:39:25 -0400 |
commit | a5444d15b611cf2ffe2bc52aaf11f2ac51882f89 (patch) | |
tree | fced46b371542946ee91b0fa5dcbe4ca14f7454c /arch/x86/kernel/e820.c | |
parent | 58f7c98850a226d3fb05b1095af9f7c4ea3507ba (diff) |
x86: split e820 reserved entries record to late v4
this one replaces:
| commit a2bd7274b47124d2fc4dfdb8c0591f545ba749dd
| 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>
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r-- | arch/x86/kernel/e820.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 523d6c5605d1..a7a71339bfb0 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -1271,12 +1271,12 @@ static inline const char *e820_type_to_string(int e820_type) | |||
1271 | /* | 1271 | /* |
1272 | * Mark e820 reserved areas as busy for the resource manager. | 1272 | * Mark e820 reserved areas as busy for the resource manager. |
1273 | */ | 1273 | */ |
1274 | struct resource __initdata *e820_res; | 1274 | static struct resource __initdata *e820_res; |
1275 | void __init e820_reserve_resources(void) | 1275 | void __init e820_reserve_resources(void) |
1276 | { | 1276 | { |
1277 | int i; | 1277 | int i; |
1278 | u64 end; | ||
1279 | struct resource *res; | 1278 | struct resource *res; |
1279 | u64 end; | ||
1280 | 1280 | ||
1281 | res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map); | 1281 | res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map); |
1282 | e820_res = res; | 1282 | e820_res = res; |
@@ -1293,6 +1293,12 @@ void __init e820_reserve_resources(void) | |||
1293 | res->end = end; | 1293 | res->end = end; |
1294 | 1294 | ||
1295 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 1295 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
1296 | |||
1297 | /* | ||
1298 | * don't register the region that could be conflicted with | ||
1299 | * pci device BAR resource and insert them later in | ||
1300 | * pcibios_resource_survey() | ||
1301 | */ | ||
1296 | if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) | 1302 | if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) |
1297 | insert_resource(&iomem_resource, res); | 1303 | insert_resource(&iomem_resource, res); |
1298 | res++; | 1304 | res++; |
@@ -1313,7 +1319,7 @@ void __init e820_reserve_resources_late(void) | |||
1313 | 1319 | ||
1314 | res = e820_res; | 1320 | res = e820_res; |
1315 | for (i = 0; i < e820.nr_map; i++) { | 1321 | for (i = 0; i < e820.nr_map; i++) { |
1316 | if (e820.map[i].type == E820_RESERVED && res->start >= (1ULL<<20)) | 1322 | if (!res->parent && res->end) |
1317 | insert_resource(&iomem_resource, res); | 1323 | insert_resource(&iomem_resource, res); |
1318 | res++; | 1324 | res++; |
1319 | } | 1325 | } |