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 <[email protected]> + * Copyright (c) 2007-2012 Jung-uk Kim <[email protected]> * 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); } _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
