x86_64: pmap_init() is called early enough for pmap_mapdev() to work
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 12 Feb 2011 09:09:14 +0000 (17:09 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 12 Feb 2011 09:09:14 +0000 (17:09 +0800)
sys/platform/pc64/apic/mpapic.c
sys/platform/pc64/x86_64/pmap.c

index 1c8b583..dc125a4 100644 (file)
@@ -1065,21 +1065,11 @@ u_sleep(int count)
                 /* spin */ ;
 }
 
-/*
- * XXX: Hack: Used by pmap_init
- */
-vm_offset_t cpu_apic_addr;
-
 void
 lapic_map(vm_offset_t lapic_addr)
 {
-       /*
-        * lapic not mapped yet (pmap_init is called too late)
-        */
        lapic = pmap_mapdev_uncacheable(lapic_addr, sizeof(struct LAPIC));
 
-       cpu_apic_addr = lapic_addr;
-
        kprintf("lapic: at 0x%08lx\n", lapic_addr);
 }
 
index cce17c6..3ab87c9 100644 (file)
@@ -739,11 +739,6 @@ pmap_set_opt(void)
 #endif
 
 /*
- * XXX: Hack. Required by pmap_init()
- */
-extern vm_offset_t cpu_apic_addr;
-
-/*
  *     Initialize the pmap module.
  *     Called by vm_init, to initialize any structures that the pmap
  *     system needs to map virtual memory.
@@ -791,12 +786,6 @@ pmap_init(void)
         * Now it is safe to enable pv_table recording.
         */
        pmap_initialized = TRUE;
-#ifdef SMP
-       /*
-        * XXX: Hack 
-        */
-       lapic = pmap_mapdev_uncacheable(cpu_apic_addr, sizeof(struct LAPIC));
-#endif
 }
 
 /*