Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi/acpica Provide a primitive incrementing counter...



details:   https://anonhg.NetBSD.org/src/rev/ec68a6d7e00f
branches:  trunk
changeset: 357464:ec68a6d7e00f
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Nov 12 02:59:55 2017 +0000

description:
Provide a primitive incrementing counter if we are call since the new
Acpi dispatcher requires us to have one when we are cold (shudder).

diffstat:

 sys/dev/acpi/acpica/OsdSchedule.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 06ce4c9ccbc8 -r ec68a6d7e00f sys/dev/acpi/acpica/OsdSchedule.c
--- a/sys/dev/acpi/acpica/OsdSchedule.c Sun Nov 12 01:38:30 2017 +0000
+++ b/sys/dev/acpi/acpica/OsdSchedule.c Sun Nov 12 02:59:55 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: OsdSchedule.c,v 1.18 2016/01/09 21:14:42 christos Exp $        */
+/*     $NetBSD: OsdSchedule.c,v 1.19 2017/11/12 02:59:55 christos Exp $        */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.18 2016/01/09 21:14:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.19 2017/11/12 02:59:55 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -168,12 +168,14 @@
 UINT64
 AcpiOsGetTimer(void)
 {
+       static UINT64 xt;
        struct timeval tv;
        UINT64 t;
 
        /* XXX During early boot there is no (decent) timer available yet. */
-       if (cold)
-               panic("acpi: timer op not yet supported during boot");
+       if (cold) {
+               return xt += 100;
+       }
 
        microtime(&tv);
        t = (UINT64)10 * tv.tv_usec;



Home | Main Index | Thread Index | Old Index