Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ea32411352494358b8d75a78402a4713 > files > 4972

kernel-2.6.18-238.19.1.el5.centos.plus.src.rpm

From: Prarit Bhargava <prarit@redhat.com>
Date: Mon, 18 Oct 2010 15:36:25 -0400
Subject: [virt] fix timekeeping_use_tsc check in init_tsc_timer
Message-id: <20101018153613.13195.62592.sendpatchset@prarit.bos.redhat.com>
Patchwork-id: 28782
O-Subject: [RHEL5.6 BZ 643926 PATCH]: Fix timekeeping_use_tsc check in
	init_tsc_timer()
Bugzilla: 643926
RH-Acked-by: Christopher Lalancette <clalance@redhat.com>
RH-Acked-by: Don Zickus <dzickus@redhat.com>

timekeeping_use_tsc can be -1=>disabled, 0=>autoconfigure, 1=>enabled

Make sure timekeeping_use_tsc is checked properly in the hypervisor code.

Debugged and suggested by Ulrich Obergfell, successfully compiled by me.

Resolves BZ 643926.

Signed-off-by: Jarod Wilson <jarod@redhat.com>

diff --git a/arch/i386/kernel/cpu/hypervisor.c b/arch/i386/kernel/cpu/hypervisor.c
index f621a7c..aeb609e 100644
--- a/arch/i386/kernel/cpu/hypervisor.c
+++ b/arch/i386/kernel/cpu/hypervisor.c
@@ -69,7 +69,7 @@ extern int timekeeping_use_tsc;
 
 void init_tsc_timer(void)
 {
-	if (timekeeping_use_tsc) {
+	if (timekeeping_use_tsc > 0) {
 #ifdef __i386__
 		extern int enable_tsc_timer;
 		enable_tsc_timer = 1;