Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108581467
D16893.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D16893.diff
View Options
Index: head/sys/amd64/amd64/mp_machdep.c
===================================================================
--- head/sys/amd64/amd64/mp_machdep.c
+++ head/sys/amd64/amd64/mp_machdep.c
@@ -58,7 +58,6 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_kern.h>
-#include <vm/vm_map.h>
#include <vm/vm_extern.h>
#include <x86/apicreg.h>
@@ -343,7 +342,6 @@
while (atomic_load_acq_int(&aps_ready) == 0)
ia32_pause();
- pmap_activate_boot(vmspace_pmap(proc0.p_vmspace));
init_secondary_tail();
}
Index: head/sys/i386/i386/pmap.c
===================================================================
--- head/sys/i386/i386/pmap.c
+++ head/sys/i386/i386/pmap.c
@@ -2000,9 +2000,9 @@
#endif
pmap->pm_root.rt_root = 0;
CPU_ZERO(&pmap->pm_active);
- PCPU_SET(curpmap, pmap);
TAILQ_INIT(&pmap->pm_pvchunk);
bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
+ pmap_activate_boot(pmap);
}
/*
@@ -5802,6 +5802,20 @@
td->td_pcb->pcb_cr3 = cr3;
PCPU_SET(curpmap, pmap);
critical_exit();
+}
+
+void
+pmap_activate_boot(pmap_t pmap)
+{
+ u_int cpuid;
+
+ cpuid = PCPU_GET(cpuid);
+#if defined(SMP)
+ CPU_SET_ATOMIC(cpuid, &pmap->pm_active);
+#else
+ CPU_SET(cpuid, &pmap->pm_active);
+#endif
+ PCPU_SET(curpmap, pmap);
}
void
Index: head/sys/i386/include/pmap.h
===================================================================
--- head/sys/i386/include/pmap.h
+++ head/sys/i386/include/pmap.h
@@ -373,6 +373,7 @@
* is called: pmap_kenter(), pmap_kextract(), pmap_kremove(), vtophys(), and
* vtopte().
*/
+void pmap_activate_boot(pmap_t pmap);
void pmap_bootstrap(vm_paddr_t);
int pmap_cache_bits(pmap_t, int mode, boolean_t is_pde);
int pmap_change_attr(vm_offset_t, vm_size_t, int);
Index: head/sys/x86/x86/mp_x86.c
===================================================================
--- head/sys/x86/x86/mp_x86.c
+++ head/sys/x86/x86/mp_x86.c
@@ -62,6 +62,7 @@
#include <vm/pmap.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
+#include <vm/vm_map.h>
#include <x86/apicreg.h>
#include <machine/clock.h>
@@ -966,6 +967,8 @@
init_secondary_tail(void)
{
u_int cpuid;
+
+ pmap_activate_boot(vmspace_pmap(proc0.p_vmspace));
/*
* On real hardware, switch to x2apic mode if possible. Do it
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 2:38 PM (2 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16199340
Default Alt Text
D16893.diff (2 KB)
Attached To
Mode
D16893: Add pmap_activate_boot() on i386.
Attached
Detach File
Event Timeline
Log In to Comment