From 0a4f9240f5b8b1bfe2d5c5c2748545bc23771bb4 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 25 Aug 2015 17:13:01 +0200 Subject: hpet: remove muldiv64() hpet defines a clock period in femtoseconds but then converts it to nanoseconds to use the internal timers. We can define the period in nanoseconds and use it directly, this allows to remove muldiv64(). We only need to convert the period to femtoseconds to put it in internal hpet capability register. Signed-off-by: Laurent Vivier Reviewed-by: Paolo Bonzini --- include/hw/timer/hpet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/hw') diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h index 773953be75..d872909ce1 100644 --- a/include/hw/timer/hpet.h +++ b/include/hw/timer/hpet.h @@ -16,9 +16,9 @@ #include "qom/object.h" #define HPET_BASE 0xfed00000 -#define HPET_CLK_PERIOD 10000000ULL /* 10000000 femtoseconds == 10ns*/ +#define HPET_CLK_PERIOD 10 /* 10 ns*/ -#define FS_PER_NS 1000000 +#define FS_PER_NS 1000000 /* 1000000 femtoseconds == 1 ns */ #define HPET_MIN_TIMERS 3 #define HPET_MAX_TIMERS 32 -- cgit v1.2.3