qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 44/44] tests/qtest/sse-timer-test: Add simple tests of the SS


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 44/44] tests/qtest/sse-timer-test: Add simple tests of the SSE timer and counter
Date: Fri, 5 Mar 2021 12:08:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Hi Peter,

On 2/19/21 3:46 PM, Peter Maydell wrote:
> Add a simple qtest to exercise the new system counter and
> system timer device in the SSE-300.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  tests/qtest/sse-timer-test.c | 240 +++++++++++++++++++++++++++++++++++
>  MAINTAINERS                  |   1 +
>  tests/qtest/meson.build      |   1 +
>  3 files changed, 242 insertions(+)
>  create mode 100644 tests/qtest/sse-timer-test.c

> +static void reset_counter_and_timer(void)
> +{
> +    /*
> +     * Reset the system counter and the timer between tests. This
> +     * isn't a full reset, but it's sufficient for what the tests check.
> +     */
> +    writel(COUNTER_BASE + CNTCR, 0);
> +    writel(TIMER_BASE + CNTP_CTL, 0);
> +    writel(TIMER_BASE + CNTP_AIVAL_CTL, 0);
> +    writel(COUNTER_BASE + CNTCV_LO, 0);
> +    writel(COUNTER_BASE + CNTCV_HI, 0);
> +}
> +
> +static void test_timer(void)
> +{
> +    /* Basic timer functionality test */

Minor comment, I'd move the timer mode test *after* the counter mode
ones, which are easier to review. Eventually consider adding this
single timer test as a separate patch to ease review, as it is quite
complex.

Having this patch preferably split (no need to repost):
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Regards,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]