|
From: | Richard Henderson |
Subject: | Re: [RFC PATCH-for-6.1 v2 5/6] target/mips/cp0_timer: Use new clock_ns_to_ticks() |
Date: | Fri, 9 Apr 2021 09:42:23 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 4/9/21 2:36 AM, Philippe Mathieu-Daudé wrote:
-static uint32_t ns_to_count(CPUMIPSState *env, uint64_t ns) +static uint32_t tick_to_count(MIPSCPU *cpu, uint64_t ticks) { - return ns / env->cp0_count_ns; + return ticks / cpu->cp0_count_rate; }
I'm not clear on the difference between ticks and counts, and this change looks suspicious in terms of units. Hasn't cp0_count_rate been used to initialize the clock in the first place? And if so, why didn't clock_ns_to_ticks do the entire job?
r~
[Prev in Thread] | Current Thread | [Next in Thread] |