From 70e8dd797946363e35af3a1033fc8406c9d0ae1f Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Fri, 11 Mar 2016 18:40:35 +0900 Subject: [PATCH] remove initialization of TSC (refs #362) --- arch/x86/kernel/cpu.c | 6 ------ kernel/ap.c | 3 --- kernel/init.c | 5 ----- 3 files changed, 14 deletions(-) diff --git a/arch/x86/kernel/cpu.c b/arch/x86/kernel/cpu.c index c6e66651..2339a235 100644 --- a/arch/x86/kernel/cpu.c +++ b/arch/x86/kernel/cpu.c @@ -1517,9 +1517,3 @@ ihk_mc_user_context_t *lookup_user_context(struct thread *thread) return uctx; } /* lookup_user_context() */ - - -void zero_tsc(void) -{ - wrmsr(MSR_IA32_TIME_STAMP_COUNTER, 0); -} diff --git a/kernel/ap.c b/kernel/ap.c index 39acf866..7a66ff62 100644 --- a/kernel/ap.c +++ b/kernel/ap.c @@ -28,7 +28,6 @@ int num_processors = 1; static volatile int ap_stop = 1; -extern void zero_tsc(void); static void ap_wait(void) { @@ -37,8 +36,6 @@ static void ap_wait(void) cpu_pause(); } - zero_tsc(); - kmalloc_init(); sched_init(); diff --git a/kernel/init.c b/kernel/init.c index bef72a76..5cd1da0d 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -315,7 +315,6 @@ static void populate_sysfs(void) int host_ikc_inited = 0; extern int num_processors; -extern void zero_tsc(void); static void post_init(void) { @@ -334,10 +333,6 @@ static void post_init(void) ihk_mc_spinlock_init(&syscall_lock); } - /* Zero TSC. - * All AP cores are wait spinning for ap_start() and they will zero - * their TSC immediatly. */ - zero_tsc(); ap_start(); sysfs_init();