Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88640
b: refs/heads/master
c: 1e934dd
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Apr 17, 2008
1 parent 299671c commit 3f32ba7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3def3d6ddf43dbe20c00c3cbc38dfacc8586998f
refs/heads/master: 1e934dda0c77c8ad13fdda02074f2cfcea118a56
23 changes: 18 additions & 5 deletions trunk/arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,11 +881,6 @@ void __init init_apic_mappings(void)
apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n",
APIC_BASE, apic_phys);

/* Put local APIC into the resource map. */
lapic_resource.start = apic_phys;
lapic_resource.end = lapic_resource.start + PAGE_SIZE - 1;
insert_resource(&iomem_resource, &lapic_resource);

/*
* Fetch the APIC ID of the BSP in case we have a
* default configuration (or the MP table is broken).
Expand Down Expand Up @@ -1300,3 +1295,21 @@ static __init int setup_apicpmtimer(char *s)
}
__setup("apicpmtimer", setup_apicpmtimer);

static int __init lapic_insert_resource(void)
{
if (!apic_phys)
return -1;

/* Put local APIC into the resource map. */
lapic_resource.start = apic_phys;
lapic_resource.end = lapic_resource.start + PAGE_SIZE - 1;
insert_resource(&iomem_resource, &lapic_resource);

return 0;
}

/*
* need call insert after e820_reserve_resources()
* that is using request_resource
*/
late_initcall(lapic_insert_resource);

0 comments on commit 3f32ba7

Please sign in to comment.