From nobody Thu Oct 31 23:22:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=git.sr.ht Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666381683232460.0600151408256; Fri, 21 Oct 2022 12:48:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olxSY-0006CB-Vp; Fri, 21 Oct 2022 15:13:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oltrg-0006WG-D6 for qemu-devel@nongnu.org; Fri, 21 Oct 2022 11:23:19 -0400 Received: from mail-b.sr.ht ([173.195.146.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oltrd-0002WN-MR for qemu-devel@nongnu.org; Fri, 21 Oct 2022 11:23:15 -0400 Received: from git.sr.ht (unknown [173.195.146.142]) by mail-b.sr.ht (Postfix) with ESMTPSA id 6F86711EFC5; Fri, 21 Oct 2022 15:23:11 +0000 (UTC) Authentication-Results: mail-b.sr.ht; dkim=none From: ~axelheider Date: Wed, 19 Oct 2022 15:09:50 +0200 Subject: [PATCH qemu.git] target/imx: reload cmp timer outside of the reload ptimer transaction MIME-Version: 1.0 Message-ID: <166636579128.26670.11954825054446993916-0@git.sr.ht> X-Mailer: git.sr.ht To: qemu-devel@nongnu.org Cc: axelheider@gmx.de Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=173.195.146.151; envelope-from=outgoing@sr.ht; helo=mail-b.sr.ht X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_REPLYTO=2.095, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 21 Oct 2022 15:07:05 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ~axelheider Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1666381685340100013 From: Axel Heider Signed-off-by: Axel Heider --- See https://gitlab.com/qemu-project/qemu/-/issues/1263 When running the seL4 tests (https://docs.sel4.systems/projects/sel4test), on the sabrelight platform the timer test fails (and thus it's disabled by default). Investigation has shown that the arm/imx6 EPIT timer interrupt does not fire properly, instead of a second in can take up to a minute to finally see the interrupt. hw/timer/imx_epit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c index 2bf8c754b2..0b13c1eab0 100644 --- a/hw/timer/imx_epit.c +++ b/hw/timer/imx_epit.c @@ -276,9 +276,12 @@ static void imx_epit_write(void *opaque, hwaddr offset= , uint64_t value, ptimer_set_count(s->timer_reload, s->lr); } =20 + // commit s->timer_reload before imx_epit_reload_compare_timer + // as timer_reload is read in imx_epit_reload_compare_timer + ptimer_transaction_commit(s->timer_reload); + imx_epit_reload_compare_timer(s); ptimer_transaction_commit(s->timer_cmp); - ptimer_transaction_commit(s->timer_reload); break; =20 case 3: /* CMP */ --=20 2.34.5