add CPU timer initialization (refs #402)
There is no actual initialization in x86 now. The initialization rely on hardware reset and Linux initialization.
This commit is contained in:
@ -1517,3 +1517,21 @@ ihk_mc_user_context_t *lookup_user_context(struct thread *thread)
|
||||
|
||||
return uctx;
|
||||
} /* lookup_user_context() */
|
||||
|
||||
void init_tick(void)
|
||||
{
|
||||
dkprintf("init_tick():\n");
|
||||
return;
|
||||
}
|
||||
|
||||
void init_delay(void)
|
||||
{
|
||||
dkprintf("init_delay():\n");
|
||||
return;
|
||||
}
|
||||
|
||||
void sync_tick(void)
|
||||
{
|
||||
dkprintf("sync_tick():\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -31,10 +31,12 @@ static volatile int ap_stop = 1;
|
||||
|
||||
static void ap_wait(void)
|
||||
{
|
||||
init_tick();
|
||||
while (ap_stop) {
|
||||
barrier();
|
||||
cpu_pause();
|
||||
}
|
||||
sync_tick();
|
||||
|
||||
kmalloc_init();
|
||||
sched_init();
|
||||
@ -53,7 +55,9 @@ static void ap_wait(void)
|
||||
|
||||
void ap_start(void)
|
||||
{
|
||||
init_tick();
|
||||
ap_stop = 0;
|
||||
sync_tick();
|
||||
}
|
||||
|
||||
void ap_init(void)
|
||||
@ -63,6 +67,7 @@ void ap_init(void)
|
||||
int bsp_hw_id;
|
||||
|
||||
ihk_mc_init_ap();
|
||||
init_delay();
|
||||
|
||||
cpu_info = ihk_mc_get_cpu_info();
|
||||
bsp_hw_id = ihk_mc_get_hardware_processor_id();
|
||||
|
||||
@ -104,4 +104,8 @@ extern unsigned int ihk_ikc_irq_apicid;
|
||||
|
||||
extern int gettime_local_support;
|
||||
|
||||
void init_tick(void);
|
||||
void init_delay(void);
|
||||
void sync_tick(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user