summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-03-10 21:19:00 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-03-10 21:19:00 +0000
commit20e55346c9c0e350d7aca822785b62ee3e2805b8 (patch)
tree53e2fd05865b8222bf63545316f581665f084f6d
parente8d15fcd5ad1d1b63156e8c2c77c381c34fc0ef3 (diff)
AML integers are supposed to be 64-bit unsigned, but huge parts of our code
use signed integers. Partially fix issues by at least doing math operations on unsigned integers. From Christophe Staiesse.
-rw-r--r--sys/dev/acpi/dsdt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c
index bfff2633bc2..50bfaad64b2 100644
--- a/sys/dev/acpi/dsdt.c
+++ b/sys/dev/acpi/dsdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.c,v 1.191 2011/06/15 08:11:51 pirofti Exp $ */
+/* $OpenBSD: dsdt.c,v 1.192 2012/03/10 21:18:59 kettenis Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
@@ -63,7 +63,7 @@ struct aml_value *_aml_setvalue(struct aml_value *, int, int64_t,
const void *);
u_int64_t aml_convradix(u_int64_t, int, int);
-int64_t aml_evalexpr(int64_t, int64_t, int);
+u_int64_t aml_evalexpr(u_int64_t, u_int64_t, int);
int aml_lsb(u_int64_t);
int aml_msb(u_int64_t);
@@ -1099,10 +1099,10 @@ aml_msb(u_int64_t val)
}
/* Evaluate Math operands */
-int64_t
-aml_evalexpr(int64_t lhs, int64_t rhs, int opcode)
+u_int64_t
+aml_evalexpr(u_int64_t lhs, u_int64_t rhs, int opcode)
{
- int64_t res = 0;
+ u_int64_t res = 0;
switch (opcode) {
/* Math operations */