aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/x86.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index bfcf8fd5e080..ffcb90669ec5 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -930,14 +930,14 @@ static void kvm_get_time_scale(uint32_t scaled_khz, uint32_t base_khz,
930 930
931 tps64 = base_khz * 1000LL; 931 tps64 = base_khz * 1000LL;
932 scaled64 = scaled_khz * 1000LL; 932 scaled64 = scaled_khz * 1000LL;
933 while (tps64 > scaled64*2 || tps64 & 0xffffffff00000000UL) { 933 while (tps64 > scaled64*2 || tps64 & 0xffffffff00000000ULL) {
934 tps64 >>= 1; 934 tps64 >>= 1;
935 shift--; 935 shift--;
936 } 936 }
937 937
938 tps32 = (uint32_t)tps64; 938 tps32 = (uint32_t)tps64;
939 while (tps32 <= scaled64 || scaled64 & 0xffffffff00000000UL) { 939 while (tps32 <= scaled64 || scaled64 & 0xffffffff00000000ULL) {
940 if (scaled64 & 0xffffffff00000000UL || tps32 & 0x80000000) 940 if (scaled64 & 0xffffffff00000000ULL || tps32 & 0x80000000)
941 scaled64 >>= 1; 941 scaled64 >>= 1;
942 else 942 else
943 tps32 <<= 1; 943 tps32 <<= 1;