From owner-svn-src-head@FreeBSD.ORG Fri Feb 24 23:15:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 502811065675; Fri, 24 Feb 2012 23:15:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEC018FC13; Fri, 24 Feb 2012 23:15:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1ONFL9n088277; Fri, 24 Feb 2012 23:15:21 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1ONFLTm088275; Fri, 24 Feb 2012 23:15:21 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202242315.q1ONFLTm088275@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 24 Feb 2012 23:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232132 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 23:15:22 -0000 Author: jkim Date: Fri Feb 24 23:15:21 2012 New Revision: 232132 URL: http://svn.freebsd.org/changeset/base/232132 Log: 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 Modified: head/sys/dev/acpica/Osd/OsdSchedule.c Modified: head/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdSchedule.c Fri Feb 24 20:42:47 2012 (r232131) +++ head/sys/dev/acpica/Osd/OsdSchedule.c Fri Feb 24 23:15:21 2012 (r232132) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2000 Michael Smith * Copyright (c) 2000 BSDi - * Copyright (c) 2007-2009 Jung-uk Kim + * Copyright (c) 2007-2012 Jung-uk Kim * 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); }