[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH] target/mips/cp0_timer: Use new clock_ns_to_ticks()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH] target/mips/cp0_timer: Use new clock_ns_to_ticks() |
Date: |
Sun, 21 Feb 2021 21:07:04 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 2/11/21 12:43 AM, Philippe Mathieu-Daudé wrote:
> Use the new clock_ns_to_ticks() function in cp0_timer where
> appropriate. This allows us to remove CPUMIPSState::cp0_count_ns
> and mips_cp0_period_set().
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Based-on: <20210209132040.5091-1-peter.maydell@linaro.org>
>
> RFC because this is just a starter patch to test Peter's series
> providing a handy function which "tells me how many times this
> clock would tick in this length of time".
>
> Also because we could rethink the MIPS CP0 timer logic to avoid
> too frequent divu128 calls (painful on 32-bit hosts).
>
> The style should be updated, using more variables for easier
> review. env_archcpu() could eventually be dropped (by passing
> MIPSCPU* instead of CPUMIPSState*).
I guess it is better to wait for Peter patches to get merged
before posting the updated patches (not much, just one previous
patch MIPSCPU* instead of CPUMIPSState*).
Regards,
Phil.