From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMIFq-0005MY-J8 for qemu-devel@nongnu.org; Mon, 03 Aug 2015 12:06:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMIFn-0002NU-BP for qemu-devel@nongnu.org; Mon, 03 Aug 2015 12:06:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMIFn-0002NI-5h for qemu-devel@nongnu.org; Mon, 03 Aug 2015 12:06:19 -0400 References: <1438609948-3744-1-git-send-email-lvivier@redhat.com> <55BF7A7E.1050303@redhat.com> <20150803144637.GQ29283@redhat.com> <55BF8298.9080409@redhat.com> <55BF8506.2080505@redhat.com> <55BF864A.8060909@redhat.com> <55BF8A3B.9040600@redhat.com> From: Paolo Bonzini Message-ID: <55BF9178.7090209@redhat.com> Date: Mon, 3 Aug 2015 18:06:16 +0200 MIME-Version: 1.0 In-Reply-To: <55BF8A3B.9040600@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , "Richard W.M. Jones" Cc: qemu-devel@nongnu.org, David Gibson On 03/08/2015 17:35, Laurent Vivier wrote: > > I guess you mean tests/rtl8139-test.c > > What is the "in_Timer()" function ? There's some awful macro magic: #define PORT(name, len, val) \ static unsigned __attribute__((unused)) in_##name(void) \ { \ unsigned res = qpci_io_read##len(dev, dev_base+(val)); \ g_test_message("*%s -> %x\n", #name, res); \ return res; \ } \ static void out_##name(unsigned v) \ { \ g_test_message("%x -> *%s\n", v, #name); \ qpci_io_write##len(dev, dev_base+(val), v); \ } PORT(Timer, l, 0x48) PORT(IntrMask, w, 0x3c) PORT(IntrStatus, w, 0x3E) PORT(TimerInt, l, 0x54) Pa##olo