CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2017/05/10 18:42:05
Modified files:
sys/uvm : uvm_init.c uvm_km.c uvm_km.h
Log message:
reorder uvm init to avoid use before initialisation.
the particular use before init was in uvm_init step 6, which calls
kmeminit to set up malloc(9), which calls uvm_km_zalloc, which calls
pmap_enter, which calls pool_get, which tries to allocate a page
using km_alloc, which isnt initalised until step 9 in uvm_init.
uvm_km_page_init calls kthread_create though, which uses malloc
internally, so it cant be reordered before malloc init.
to cope with this, uvm_km_page_init is split up. it sets up the
subsystem, and is called before kmeminit. the thread init is moved
to uvm_km_page_lateinit, which is called after kmeminit in uvm_init.