qemu-e2k/target/mips
Peter Maydell 0ac1fb2567 target/mips: Don't use clock_get_ns() in clock period calculation
Currently the MIPS code uses the old clock_get_ns() API to
calculate a time length in nanoseconds:
 cpu->cp0_count_rate * clock_get_ns(MIPS_CPU(cpu)->clock)

This relies on the clock having a period which is an exact number
of nanoseconds.

Switch to the new clock_ticks_to_ns() function, which does the
multiplication internally at a higher precision.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201215150929.30311-3-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2021-01-04 23:24:44 +01:00
..
TODO Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
addr.c hw/mips: Move address translation helpers to target/mips/ 2020-12-13 19:58:54 +01:00
cp0_helper.c target/mips: Introduce ase_mt_available() helper 2020-12-13 20:26:02 +01:00
cp0_timer.c target/mips: Move cp0_count_ns to CPUMIPSState 2020-10-17 11:13:15 +02:00
cpu-param.h target/mips: Support variable page size 2020-06-01 13:28:21 +02:00
cpu-qom.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
cpu.c target/mips: Don't use clock_get_ns() in clock period calculation 2021-01-04 23:24:44 +01:00
cpu.h linux-user/elfload: Introduce MIPS GET_FEATURE_REG_EQU() macro 2020-12-17 10:34:59 +01:00
dsp_helper.c target/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
fpu_helper.c target/mips: Use FloatRoundMode enum for FCR31 modes conversion 2020-12-13 20:27:11 +01:00
gdbstub.c target/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
helper.c target/mips: Move mips_cpu_add_definition() from helper.c to cpu.c 2020-12-13 20:26:02 +01:00
helper.h target/mips: msa: Split helpers for MULV.<B|H|W|D> 2020-06-15 20:51:04 +02:00
internal.h target/mips: Use FloatRoundMode enum for FCR31 modes conversion 2020-12-13 20:27:11 +01:00
kvm.c target/mips: Include "exec/memattrs.h" in 'internal.h' 2020-12-13 19:58:54 +01:00
kvm_mips.h hw/mips: Implement the kvm_type() hook in MachineClass 2020-06-27 19:35:39 +02:00
lmmi_helper.c target/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
machine.c migration: Replace migration's JSON writer by the general one 2020-12-19 10:39:16 +01:00
meson.build hw/mips: Move address translation helpers to target/mips/ 2020-12-13 19:58:54 +01:00
mips-defs.h target/mips: Add comments for vendor-specific ASEs 2020-06-15 20:33:16 +02:00
mips-semi.c target/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
msa_helper.c target/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
op_helper.c target/mips: Remove unused headers from op_helper.c 2020-12-13 20:26:02 +01:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate.c target/mips: Move cpu definitions, reset() and realize() to cpu.c 2020-12-13 20:27:11 +01:00
translate_init.c.inc target/mips: Do not initialize MT registers if MT ASE absent 2020-12-13 20:26:02 +01:00