Received: from [140.186.70.92] (port=53560 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PeyWD-0005cv-8d for qemu-devel@nongnu.org; Mon, 17 Jan 2011 18:29:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PeyWB-0006yL-9F for qemu-devel@nongnu.org; Mon, 17 Jan 2011 18:29:49 -0500 Received: from ra.se.axis.com ([195.60.68.13]:59099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PeyWB-0006xt-40 for qemu-devel@nongnu.org; Mon, 17 Jan 2011 18:29:47 -0500 From: edgar.iglesias@gmail.com Date: Tue, 18 Jan 2011 00:29:39 +0100 Message-Id: <1295306982-29629-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH 0/3] mips: Handle late r4k timers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , aurelien@aurel32.net From: Edgar E. Iglesias Linux runs a test to check if the internal r4k timer is usable prior to enabling it. The test basically starts a timer, repeatedly compares cp0_count with cp0_compare and finally when the timer should have hit it verifies that the irq line is asserted. Depending on host timing, qemu may fail this test. On my x86_64 host, we basically always fail it. The following set of patches makes qemu pass the test reliably. Edgar E. Iglesias (3): mips: Break TBs after mfc0_count mips: Break out cpu_mips_timer_expire mips: Expire late timers when reading cp0_count hw/mips_timer.c | 43 +++++++++++++++++++++++++++++-------------- target-mips/translate.c | 4 +++- 2 files changed, 32 insertions(+), 15 deletions(-) -- 1.7.2.2