Date: Thu, 6 Mar 2014 21:07:13 +0000 (UTC) From: Olivier Houchard <cognet@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262870 - head/sys/arm/ti/omap4 Message-ID: <201403062107.s26L7Dt5002874@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cognet Date: Thu Mar 6 21:07:13 2014 New Revision: 262870 URL: http://svnweb.freebsd.org/changeset/base/262870 Log: When calculating the MPU freq, make sure not to overflow by using a uint64_t. PR: arm/187223 Submitted by: Svatopluk Kraus <onwahe@gmail.com> Modified: head/sys/arm/ti/omap4/omap4_prcm_clks.c Modified: head/sys/arm/ti/omap4/omap4_prcm_clks.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_prcm_clks.c Thu Mar 6 21:02:16 2014 (r262869) +++ head/sys/arm/ti/omap4/omap4_prcm_clks.c Thu Mar 6 21:07:13 2014 (r262870) @@ -990,7 +990,7 @@ omap4_clk_get_arm_fclk_freq(struct ti_cl /* Calculate the MPU freq */ - mpuclk = (sysclk * pll_mult) / pll_div; + mpuclk = ((uint64_t)sysclk * pll_mult) / pll_div; /* Return the value */ if (freq)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403062107.s26L7Dt5002874>