From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D7AFC433DB for ; Thu, 4 Feb 2021 22:42:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A38C964F9C for ; Thu, 4 Feb 2021 22:42:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A38C964F9C Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7nK4-0000OF-ME for qemu-devel@archiver.kernel.org; Thu, 04 Feb 2021 17:42:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7nGS-0006Ev-UB for qemu-devel@nongnu.org; Thu, 04 Feb 2021 17:38:18 -0500 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:38044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7nGQ-00009p-E1 for qemu-devel@nongnu.org; Thu, 04 Feb 2021 17:38:16 -0500 Received: by mail-lj1-x22d.google.com with SMTP id f19so5417106ljn.5 for ; Thu, 04 Feb 2021 14:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q8SSLH5M8olERrbosyAxoDgd9ZJSYeXL6DUTpxb5NdQ=; b=gnQKu0aTBbwUfhHrxpITBwhTxFDK0s5YkhdP7ZMqoZcPP3dPnS2VLqSuI1Xgk6h+Bw T+SbO8fEUQ9EVTl8QhdWJheqkr13d/7dPRFIoil0XVoZkbdzBcvWquqC1tuk0KT0HqfL BtrM1SRuZ2eFqyGgCB0mq2HM+9+DCbpiolamq+HTUjcqcgWs/jgvXKWJktMrrMaN31tu UXEEPDM9DbMsrbrP2qF3UGjOJF42VzqbMSUZvEXjRZ0C5vrjS28BhIwtbUpmMKgtAn1M NuqEAMUMmG86r/5odzJDVAHaefixcA8Uwh9E+VTKyp+LMHFg7VeXAaMGw8RmV8qVkMu7 3lVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q8SSLH5M8olERrbosyAxoDgd9ZJSYeXL6DUTpxb5NdQ=; b=f4StZJUtdNRz5H/TL32N6JdOHoWce4NLYB+wtlaIo34WU3QQEaiMHOFNLmf4Y2FxGI PiQlvEXu2Ta7p9yIDS4prMjUFb/lAMgdYofG5HVEV3RgPbFb0D41Te8RhRZhxqEEsfwO /4A3C/YEHSSUUeW+DLyLtaniuRuRag4UVd5kFYOi0U4dGILZSRBF5RN0tIUx50DpwzUI LSH3J8/sVNOFrGA4jd1HTtWAGxs4sJbM1yHCoNLAieYtjEcBwNf/JFP40Ht/Snd+DT3X q+RqkwqQzC9m/VRDGgUIRHcaAXBqDnhvyKOrZnah0aNDzLVy7EdJ/iN7yNSwtbj4ADrh c7AA== X-Gm-Message-State: AOAM533qYnRrb+3EDZgPHCXCaskcdYch0BucaDd7UpzMoOZvHyx3Ps7p H6R9fVIIoID/mdlYrHaGE25f5tyhuKsBvbuchehV8Q== X-Google-Smtp-Source: ABdhPJyxpnhuro4ld6TFRdimZ+vi/Zsms/dTLcb1lBSoZcALO0VIRz67FjLlcHHWS4ivA1L/0ublXSDLUHxwyyeeD6I= X-Received: by 2002:a2e:8ec3:: with SMTP id e3mr833125ljl.467.1612478290371; Thu, 04 Feb 2021 14:38:10 -0800 (PST) MIME-Version: 1.0 References: <20210112165750.30475-1-peter.maydell@linaro.org> <20210112165750.30475-17-peter.maydell@linaro.org> In-Reply-To: From: Hao Wu Date: Thu, 4 Feb 2021 14:37:58 -0800 Message-ID: Subject: Re: [PULL 16/21] hw/timer: Refactor NPCM7XX Timer to use CLK clock To: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Cc: Peter Maydell , QEMU Developers , Havard Skinnemoen , Tyrone Ting Content-Type: multipart/alternative; boundary="000000000000b5091d05ba8a5b1c" Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=wuhaotsh@google.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000b5091d05ba8a5b1c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I don't see this error. It could be some error in the clock that the timer module does not get a correct clock input. How do you reproduce this? On Thu, Feb 4, 2021 at 1:39 AM Philippe Mathieu-Daud=C3=A9 wrote: > Hi, > > On Tue, Jan 12, 2021 at 6:20 PM Peter Maydell > wrote: > > > > From: Hao Wu > > > > This patch makes NPCM7XX Timer to use a the timer clock generated by th= e > > CLK module instead of the magic number TIMER_REF_HZ. > > > > Reviewed-by: Havard Skinnemoen > > Reviewed-by: Tyrone Ting > > Signed-off-by: Hao Wu > > Message-id: 20210108190945.949196-3-wuhaotsh@google.com > > Reviewed-by: Peter Maydell > > Signed-off-by: Peter Maydell > > --- > > include/hw/misc/npcm7xx_clk.h | 6 ----- > > include/hw/timer/npcm7xx_timer.h | 1 + > > hw/arm/npcm7xx.c | 5 ++++ > > hw/timer/npcm7xx_timer.c | 39 +++++++++++++++----------------- > > 4 files changed, 24 insertions(+), 27 deletions(-) > > Is that a spurious error (building with Clang)? > > Running test qtest-arm/npcm7xx_timer-test > ERROR:../tests/qtest/npcm7xx_timer-test.c:475:test_periodic_interrupt: > assertion failed (tim_read(td, TISR) =3D=3D tim_timer_bit(td)): (0x000000= 00 > =3D=3D 0x00000004) > ERROR:../tests/qtest/npcm7xx_timer-test.c:476:test_periodic_interrupt: > 'qtest_get_irq(global_qtest, tim_timer_irq(td))' should be TRUE > FAIL 155 qtest-arm/npcm7xx_timer-test > /arm/npcm7xx_timer/tim[2]/timer[2]/periodic_interrupt > make: *** [Makefile.mtest:1033: run-test-127] Error 1 > --000000000000b5091d05ba8a5b1c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't see this error. It could be some error in the = clock that the timer module does not get a correct clock input.
How do = you reproduce this?

On Thu, Feb 4, 2021 at 1:39 AM Philippe Mathieu-Da= ud=C3=A9 <f4bug@ams= at.org> wrote:
Hi,

On Tue, Jan 12, 2021 at 6:20 PM Peter Maydell <peter.maydell@linaro.org>
wrote:
>
> From: Hao Wu <wuhaotsh@google.com>
>
> This patch makes NPCM7XX Timer to use a the timer clock generated by t= he
> CLK module instead of the magic number TIMER_REF_HZ.
>
> Reviewed-by: Havard Skinnemoen <hskinnemoen@google.com>
> Reviewed-by: Tyrone Ting <kfting@nuvoton.com>
> Signed-off-by: Hao Wu <wuhaotsh@google.com>
> Message-id: 20210108190945.949196-3-wuhaotsh@google.com
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>=C2=A0 include/hw/misc/npcm7xx_clk.h=C2=A0 =C2=A0 |=C2=A0 6 -----
>=C2=A0 include/hw/timer/npcm7xx_timer.h |=C2=A0 1 +
>=C2=A0 hw/arm/npcm7xx.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0|=C2=A0 5 ++++
>=C2=A0 hw/timer/npcm7xx_timer.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 39 += ++++++++++++++-----------------
>=C2=A0 4 files changed, 24 insertions(+), 27 deletions(-)

Is that a spurious error (building with Clang)?

Running test qtest-arm/npcm7xx_timer-test
ERROR:../tests/qtest/npcm7xx_timer-test.c:475:test_periodic_interrupt:
assertion failed (tim_read(td, TISR) =3D=3D tim_timer_bit(td)): (0x00000000=
=3D=3D 0x00000004)
ERROR:../tests/qtest/npcm7xx_timer-test.c:476:test_periodic_interrupt:
'qtest_get_irq(global_qtest, tim_timer_irq(td))' should be TRUE
FAIL 155 qtest-arm/npcm7xx_timer-test
/arm/npcm7xx_timer/tim[2]/timer[2]/periodic_interrupt
make: *** [Makefile.mtest:1033: run-test-127] Error 1
--000000000000b5091d05ba8a5b1c--