summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-02-24 23:15:21 +0000
committerjkim <jkim@FreeBSD.org>2012-02-24 23:15:21 +0000
commitec0f329a370e4b072eee27c715b3648abce48158 (patch)
tree0c936d1bb86c457e56e5cada814cccc3f0e04258 /sys/dev/acpica
parent33fa6b6f6aeebc07f7db8500d9cd273c5f5eee0e (diff)
downloadFreeBSD-src-ec0f329a370e4b072eee27c715b3648abce48158.zip
FreeBSD-src-ec0f329a370e4b072eee27c715b3648abce48158.tar.gz
Fix a long-standing bug for AcpiOsGetTimer(). time_t is 32-bit on i386 and
it needs proper casting before multiplication. MFC after: 3 days
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/Osd/OsdSchedule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c
index fd1b931..c05ae93 100644
--- a/sys/dev/acpica/Osd/OsdSchedule.c
+++ b/sys/dev/acpica/Osd/OsdSchedule.c
@@ -1,7 +1,7 @@
/*-
* Copyright (c) 2000 Michael Smith
* Copyright (c) 2000 BSDi
- * Copyright (c) 2007-2009 Jung-uk Kim <jkim@FreeBSD.org>
+ * Copyright (c) 2007-2012 Jung-uk Kim <jkim@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -248,8 +248,8 @@ AcpiOsGetTimer(void)
KASSERT(cold == 0, ("acpi: timer op not yet supported during boot"));
binuptime(&bt);
- t = ((UINT64)10000000 * (uint32_t)(bt.frac >> 32)) >> 32;
- t += bt.sec * 10000000;
+ t = (uint64_t)bt.sec * 10000000;
+ t += ((uint64_t)10000000 * (uint32_t)(bt.frac >> 32)) >> 32;
return (t);
}
OpenPOWER on IntegriCloud