Bug 3619

Summary: Implement ACPI 3.0 Timer function
Product: ACPI Reporter: Len Brown (lenb)
Component: OtherAssignee: Luming Yu (luming.yu)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, bunk
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.9 Subsystem:
Regression: --- Bisected commit-id:

Description Len Brown 2004-10-22 19:06:17 UTC
With ACPICA 20040924 the interpreter recognizes the "Timer" operand, 
but the OS layer has just a stub at this point to supply the 64-bit timer value: 
 
 1.56/drivers/acpi/osl.c     2004-10-22 16:11:56 -04:00 
+++ 1.57/drivers/acpi/osl.c     2004-10-22 21:59:54 -04:00 
@@ -326,6 +326,29 @@ 
        } 
 } 
 
+/* 
+ * Support ACPI 3.0 AML Timer operand 
+ * Returns 64-bit free-running, monotonically increasing timer 
+ * with 100ns granularity 
+ */ 
+u64 
+acpi_os_get_timer (void) 
+{ 
+       static u64 t; 
+ 
+#ifdef CONFIG_HPET 
+       /* TBD: use HPET if available */ 
+#endif 
+ 
+#ifdef CONFIG_X86_PM_TIMER 
+       /* TBD: default to PM timer if HPET was not available */ 
+#endif 
+       if (!t) 
+               printk(KERN_ERR PREFIX "acpi_os_get_timer() TBD\n"); 
+ 
+       return(++t); 
+} 
+ 
 acpi_status 
 acpi_os_read_port( 
        acpi_io_address port,
Comment 1 Adrian Bunk 2005-08-07 18:21:16 UTC
This patch is already included in recent kernels.