From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr8hD-0003LM-91 for qemu-devel@nongnu.org; Tue, 27 Oct 2015 14:10:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr8h9-0004u4-5t for qemu-devel@nongnu.org; Tue, 27 Oct 2015 14:10:07 -0400 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]:34387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr8h8-0004ts-Uo for qemu-devel@nongnu.org; Tue, 27 Oct 2015 14:10:03 -0400 Received: by lfaz124 with SMTP id z124so176934611lfa.1 for ; Tue, 27 Oct 2015 11:10:02 -0700 (PDT) References: <562F8807.2090107@gmail.com> From: Dmitry Osipenko Message-ID: <562FBDC1.50805@gmail.com> Date: Tue, 27 Oct 2015 21:09:05 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] arm mptimer implementation - why prescaler is multiply by 10? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: "peter.maydell@linaro.org" , "qemu-devel@nongnu.org" , "Krzeminski, Marcin (Nokia - PL/Wroclaw)" 27.10.2015 21:01, Peter Crosthwaite пишет: > > > On Tue, Oct 27, 2015 at 7:19 AM, Dmitry Osipenko > wrote: > > 27.10.2015 16:48, Krzeminski, Marcin (Nokia - PL/Wroclaw) пишет: > > Hello, > I am playing with U-Boot on ARM under qemu. > U-boot uses mptimer, and under qemu one second takes about 1 in real world. > At the moment it seem that in u-boot is ok, so I have question about > below function. > Why prescaler value is multiply by 10? > static inline uint64_t a9_gtimer_get_conv(A9GTimerState *s) > { > uint64_t prescale = extract32(s->control, R_CONTROL_PRESCALER_SHIFT, > R_CONTROL_PRESCALER_LEN); > return (prescale + 1) * 10; > } > Regards, > Marcin > > > Hello Marcin, > > From my observation, Linux kernel is booting noticeably faster in the > emulated guest and host machine CPU usage is lower if we "artificially" > slowdown the MPtimer. You really shouldn't use it for the RTC, so doing that > trick shouldn't affect guest behavior. > > However, maybe there is some other rational behind it and Peter C and/or > Peter M might know better. > > > So I do wonder whether with your ptimer conversion this will be obsoleted, as > the rate limiter there may do the work for us. > > Regards, > Peter > > -- > Dmitry > > You might be right, I haven't tried it without prescale multiplier with recent ptimer fixes. Will try and report back. -- Dmitry