From: Yoann Vandoorselaere <yoann@prelude-ids.org>
To: Dominik Brodowski <devel@brodo.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Gabriel Paubert <paubert@iram.es>,
cpufreq@lists.arm.linux.org.uk, cpufreq@www.linux.org.uk,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: fix 32bits integer overflow in loops_per_jiffy calculation
Date: 22 Aug 2002 20:02:13 +0200 [thread overview]
Message-ID: <1030039334.15430.256.camel@alph> (raw)
In-Reply-To: <20020822194655.C2016@brodo.de>
On Thu, 2002-08-22 at 19:46, Dominik Brodowski wrote:
> On Thu, Aug 22, 2002 at 09:35:16PM +0200, Benjamin Herrenschmidt wrote:
> > >IMHO per-arch functions are really not needed. The only architectures which
> > >have CPUFreq drivers by now are ARM and i386. This will change, hopefully;
> > >IMHO it should be enough to include some basic limit checking in
> > >cpufreq_scale().
> >
> > In this specific case, we were talking about PPC since the problem
> > occured when I implemented cpufreq support to switch the speed
> > of the latest powerbooks between 667 and 800Mhz
>
> And the patch from Yoann solves this?
Yep, the integer overflow resulted in an incorrectly computed
loops_per_jiffy :
Aug 21 19:50:41 titane kernel: adjust_jiffies: prechange cur=667000, new=800000
Aug 21 19:50:41 titane kernel: old loop_per_jiffy = 665.19 (cpufreq_ref_loops=3325952, cpufreq_ref_freq=667000).
Aug 21 19:50:41 titane kernel: new loop_per_jiffy = 669.02 (cpufreq_ref_loops=3325952, cpufreq_ref_freq=667000).
With the patch applied, it work fine :
Aug 22 11:33:40 titane kernel: adjust_jiffies: prechange cur=667000, new=800000
Aug 22 11:33:40 titane kernel: old loop_per_jiffy = 665.19 (cpufreq_ref_loops=3325952, cpufreq_ref_freq=667000).
Aug 22 11:33:40 titane kernel: new loop_per_jiffy = 797.82 (cpufreq_ref_loops=3325952, cpufreq_ref_freq=667000).
--
Yoann Vandoorselaere, http://www.prelude-ids.org
"Programming is a race between programmers, who try and make more and
more idiot-proof software, and universe, which produces more and more
remarkable idiots. Until now, universe leads the race" -- R. Cook
next prev parent reply other threads:[~2002-08-22 17:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-22 13:02 [PATCH]: fix 32bits integer overflow in loops_per_jiffy calculation Benjamin Herrenschmidt
2002-08-22 12:12 ` Gabriel Paubert
2002-08-22 14:31 ` Benjamin Herrenschmidt
2002-08-22 15:23 ` Gabriel Paubert
2002-08-22 15:59 ` Yoann Vandoorselaere
2002-08-22 17:22 ` [PATCH]: fix 32bits integer overflow in loops_per_jiffycalculation george anzinger
2002-08-22 16:51 ` [PATCH]: fix 32bits integer overflow in loops_per_jiffy calculation Dominik Brodowski
2002-08-22 19:35 ` Benjamin Herrenschmidt
2002-08-22 17:46 ` Dominik Brodowski
2002-08-22 18:02 ` Yoann Vandoorselaere [this message]
2002-08-22 20:00 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2002-08-22 9:50 Yoann Vandoorselaere
2002-08-22 10:21 ` Gabriel Paubert
2002-08-22 13:00 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1030039334.15430.256.camel@alph \
--to=yoann@prelude-ids.org \
--cc=benh@kernel.crashing.org \
--cc=cpufreq@lists.arm.linux.org.uk \
--cc=cpufreq@www.linux.org.uk \
--cc=devel@brodo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=paubert@iram.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox