From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfQHq-0002zI-Kt for qemu-devel@nongnu.org; Fri, 25 Sep 2015 06:31:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfQHl-000517-GP for qemu-devel@nongnu.org; Fri, 25 Sep 2015 06:31:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfQHl-00050W-CH for qemu-devel@nongnu.org; Fri, 25 Sep 2015 06:31:25 -0400 References: <1440703987-29012-1-git-send-email-lvivier@redhat.com> <56042304.5070200@redhat.com> From: Paolo Bonzini Message-ID: <56052273.2070305@redhat.com> Date: Fri, 25 Sep 2015 12:31:15 +0200 MIME-Version: 1.0 In-Reply-To: <56042304.5070200@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 0/9] remove useless muldiv64() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , "Michael S . Tsirkin" , Aurelien Jarno , Leon Alrae , Jia Liu , Jason Wang , crosthwaitepeter@gmail.com On 24/09/2015 18:21, Laurent Vivier wrote: > Hi, > > all the patches of the series have been reviewed, except: > > [PATCH v4 1/9] i6300esb: remove muldiv64(), > which is a rebased version. > [PATCH v3 5/9] openrisc: remove muldiv64() > > Any volunteers ? They both look good, thanks. Please send a signed pull request with the patches! Paolo > Laurent > > On 27/08/2015 21:32, Laurent Vivier wrote: >> Originally, timers were ticks based, and it made sense to >> add ticks to current time to know when to trigger an alarm. >> >> But since commit: >> >> 7447545 change all other clock references to use nanosecond resolution accessors >> >> All timers use nanoseconds and we need to convert ticks to nanoseconds, by >> doing something like: >> >> y = muldiv64(x, get_ticks_per_sec(), TIMER_FREQ) >> >> where x is the number of device ticks and y the number of system ticks. >> >> y is used as nanoseconds in timer functions, >> it works because 1 tick is 1 nanosecond. >> (get_ticks_per_sec() is 10^9) >> >> But if get_ticks_per_sec() / TIMER_FREQ is an integer, we can do: >> >> y = x * TIMER_PERIOD; >> >> v3: >> Split "PCI: remove muldiv64()" in 3 patches: >> i6300esb: remove muldiv64() >> rtl8139: remove muldiv64() >> pcnet: remove muldiv64() >> v2: >> 4/4 For target-arm, don't remove muldiv64() but clarify >> the use of the values. >> 7/7 Replace qemu_clock_get_ns()/1000 by qemu_clock_get_us() >> >> Laurent Vivier (9): >> i6300esb: remove muldiv64() >> rtl8139: remove muldiv64() >> pcnet: remove muldiv64() >> mips: remove muldiv64() >> openrisc: remove muldiv64() >> arm: clarify the use of muldiv64() >> hpet: remove muldiv64() >> bt: remove muldiv64() >> net: remove muldiv64() >> >> hw/bt/hci.c | 4 ++-- >> hw/mips/cputimer.c | 19 ++++++++----------- >> hw/net/pcnet.c | 3 +-- >> hw/net/rtl8139.c | 14 ++++++-------- >> hw/openrisc/cputimer.c | 7 +++---- >> hw/timer/hpet.c | 6 +++--- >> hw/watchdog/wdt_i6300esb.c | 11 +++-------- >> include/hw/timer/hpet.h | 4 ++-- >> net/dump.c | 2 +- >> target-arm/helper.c | 14 ++++++++------ >> tests/rtl8139-test.c | 2 +- >> 11 files changed, 38 insertions(+), 48 deletions(-) >>