diff options
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 | } |
