patch-2.4.22 linux-2.4.22/arch/x86_64/kernel/time.c

Next file: linux-2.4.22/arch/x86_64/kernel/traps.c
Previous file: linux-2.4.22/arch/x86_64/kernel/suspend.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/x86_64/kernel/time.c linux-2.4.22/arch/x86_64/kernel/time.c
@@ -63,6 +63,11 @@
 	return ((hpet_readl(HPET_COUNTER) - vxtime.last) * vxtime.quot) >> 32;
 }
 
+static unsigned int do_gettimeoffset_nop(void)
+{
+	return 0;
+}
+
 unsigned int (*do_gettimeoffset)(void) = do_gettimeoffset_tsc;
 
 /*
@@ -482,14 +487,10 @@
 
 static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL};
 
-extern void __init config_acpi_tables(void);
-
 void __init time_init(void)
 {
 	char *timename;
 
-	config_acpi_tables();
-
 #ifdef HPET_HACK_ENABLE_DANGEROUS
         if (!hpet_address) {
 		printk(KERN_WARNING "time.c: WARNING: Enabling HPET base manually!\n");
@@ -546,12 +547,17 @@
 		} else {
 			timetype = "HPET/TSC";
 			vxtime.mode = VXTIME_TSC;
-			do_gettimeoffset = do_gettimeoffset_tsc;
 		}		
 	} else {
+		if (notsc) { 
+			timetype = "PIT"; 
+			vxtime.mode = VXTIME_STUPID; 
+			do_gettimeoffset = do_gettimeoffset_nop;
+		} else { 
 			timetype = "PIT/TSC";
 			vxtime.mode = VXTIME_TSC;
 	}
+	}
 	printk(KERN_INFO "time.c: Using %s based timekeeping.\n", timetype);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)