Re: clk: clock rates can overflow 32-bit fields

2015-04-13 Thread Brian Norris
On Mon, Apr 13, 2015 at 11:49:03AM -0700, Michael Turquette wrote: > Quoting Brian Norris (2015-04-13 10:54:40) > > On Sun, Apr 12, 2015 at 10:53:07PM -0700, Michael Turquette wrote: > > > Quoting Brian Norris (2015-04-12 21:24:22) > > > > (1) using clk-divider.c; and/or > > > > (2) using intermedi

Re: clk: clock rates can overflow 32-bit fields

2015-04-13 Thread Brian Norris
Hi Mike, On Sun, Apr 12, 2015 at 10:53:07PM -0700, Michael Turquette wrote: > Quoting Brian Norris (2015-04-12 21:24:22) > > Hi, > > > > I've recently been looking at using the common clock framework to > > handle my CPU clocks for use by the cpufreq-dt driver, and I ran > > across a few problems

Re: clk: clock rates can overflow 32-bit fields

2015-04-12 Thread Michael Turquette
Quoting Brian Norris (2015-04-12 21:24:22) > Hi, > > I've recently been looking at using the common clock framework to > handle my CPU clocks for use by the cpufreq-dt driver, and I ran > across a few problems with integer overflow. On a 32-bit system, > 'unsigned long' (the type used in clk_set_r

clk: clock rates can overflow 32-bit fields

2015-04-12 Thread Brian Norris
Hi, I've recently been looking at using the common clock framework to handle my CPU clocks for use by the cpufreq-dt driver, and I ran across a few problems with integer overflow. On a 32-bit system, 'unsigned long' (the type used in clk_set_rate() and similar APIs) is often a 32-bit integer. This