summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/e820.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-29 08:09:23 +0200
committerH. Peter Anvin <hpa@zytor.com>2008-09-04 08:39:25 -0700
commita5444d15b611cf2ffe2bc52aaf11f2ac51882f89 (patch)
treefced46b371542946ee91b0fa5dcbe4ca14f7454c /arch/x86/kernel/e820.c
parent58f7c98850a226d3fb05b1095af9f7c4ea3507ba (diff)
downloadblackbird-op-linux-a5444d15b611cf2ffe2bc52aaf11f2ac51882f89.tar.gz
blackbird-op-linux-a5444d15b611cf2ffe2bc52aaf11f2ac51882f89.zip
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.c12
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)
/*
* 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++;
}
OpenPOWER on IntegriCloud