i386: Move ioapic_map() from mp_machdep.c to ioapic.c
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 5 May 2011 11:03:21 +0000 (19:03 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 May 2011 02:17:26 +0000 (10:17 +0800)
sys/platform/pc32/apic/ioapic.c
sys/platform/pc32/apic/ioapic.h
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc32/include/smp.h

index 235126a..42cb2ba 100644 (file)
@@ -30,6 +30,7 @@
 #include <sys/kernel.h>
 #include <sys/bus.h>
 #include <sys/machintr.h>
+#include <vm/pmap.h>
 #include <machine/globaldata.h>
 #include <machine/smp.h>
 #include <machine/cputypes.h>
@@ -571,3 +572,10 @@ ioapic_alloc_apic_id(int start)
        }
        panic("ioapic_unused_apic_id: never reached\n");
 }
+
+void *
+ioapic_map(vm_paddr_t pa)
+{
+       KKASSERT(pa < 0x100000000LL);
+       return pmap_mapdev_uncacheable(pa, PAGE_SIZE);
+}
index f680c41..f99df80 100644 (file)
@@ -61,5 +61,6 @@ void  ioapic_pin_setup(void *, int, int,
 void   ioapic_extpin_setup(void *, int, int);
 int    ioapic_extpin_gsi(void);
 int    ioapic_gsi(int, int);
+void   *ioapic_map(vm_paddr_t);
 
 #endif /* !_ARCH_APIC_IOAPIC_H_ */
index 8750e1d..c854cff 100644 (file)
@@ -344,13 +344,6 @@ mp_set_cpuids(int cpu_id, int apic_id)
        ID_TO_CPU(apic_id) = cpu_id;
 }
 
-void *
-ioapic_map(vm_paddr_t pa)
-{
-       KKASSERT(pa < 0x100000000LL);
-       return pmap_mapdev_uncacheable(pa, PAGE_SIZE);
-}
-
 /*
  * start each AP in our list
  */
index c346f6f..77acde8 100644 (file)
@@ -86,7 +86,6 @@ extern struct apic_intmapinfo int_to_apicintpin[];
 extern struct pcb              stoppcbs[];
 
 /* functions in mp_machdep.c */
-void   *ioapic_map(vm_paddr_t);
 u_int  mp_bootaddress          (u_int);
 void   mp_start                (void);
 void   mp_announce             (void);