On 27 August 2015 at 20:33, Laurent Vivier <[email protected]> wrote:
> muldiv64() is used to convert microseconds into CPU ticks.
>
> But it is not clear and not commented. This patch uses macro
> to clearly identify what is used: time, CPU frequency and ticks.
> For an elapsed time and a given frequency, we compute how many ticks
>  we have.
>
> Signed-off-by: Laurent Vivier <[email protected]>
> ---
> v2: replace "arm: remove muldiv64()"
>  target-arm/helper.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/target-arm/helper.c b/target-arm/helper.c
> index 7df1f06..4455761 100644
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -12,6 +12,8 @@
>  #include <zlib.h> /* For crc32 */
>  #include "exec/semihost.h"
>
> +#define ARM_CPU_FREQ 1000000000 /* FIXME: 1 GHz, should be configurable */

LL suffix for large constants, please.

Otherwise
Acked-by: Peter Maydell <[email protected]>

(assuming you're planning to put this somewhere other than the
target-arm tree).

thanks
-- PMM

Reply via email to