/* @(#)init_processor.c 1.1 94/10/31 SMI; from UCB 4.53 83/07/01 */ #include #ifdef MULTIPROCESSOR #include #include #include #include #include #include #include #include #include #include #ifdef QUOTA #include #endif #ifdef TRACE #include #endif #include #include #include #include #include #ifdef sun386 #include #endif #include /* * Initialization code for * processors other than processor 0 * Functions: * Pull in a process from the runq * and start executing it. * If runq is empty fall into idle. * */ #ifdef VAC extern int vac; extern int cache; extern int use_cache; #endif #include "percpu.h" #define CCI ccheck(__FILE__, __LINE__) /* * startup code for processors other than the first. The system is * initialized, so we just need to initialize our private data and * private hardware, and inform the system that we are available. */ pxmain() { extern int procset; extern int ncpu; CCI; #ifdef VAC /* * If the other processor is running cache-on, we need to turn * our cache on before we start working with any data that is * cached and shared between units. */ /* FIXME(VIKING): The is for bringup debugging purpose. * Once it's done, viking initialization should be done by * the PROM, then we don't need this anymore. */ if (cache) { extern void cache_on(); vac_init(); /* initialize cache */ /* no need to call cache_on() if VIKING because this function is * included in the vac_init() routine. */ if (use_cache && vac) cache_on(); } #endif VAC #ifdef TLBLOCK_ATOMS atom_tlblock(); #endif TLBLOCK_ATOMS setcpudelay(); klock_enter(); CCI; procset |= 1<