From: Jan Beulich Date: Wed, 18 Jul 2018 08:37:21 +0000 (+0200) Subject: x86/vHPET: replace literal numbers X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3594 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=969f0e700d241ae90a037d71221162ec68368efc;p=xen.git x86/vHPET: replace literal numbers Also drop the unused HPET_TN_CFG_BITS_READONLY_OR_RESERVED. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/hvm/hpet.c b/xen/arch/x86/hvm/hpet.c index f7ef4f7514..51407d5383 100644 --- a/xen/arch/x86/hvm/hpet.c +++ b/xen/arch/x86/hvm/hpet.c @@ -42,8 +42,6 @@ (hvm_get_guest_time(vhpet_vcpu(hpet)) / STIME_PER_HPET_TICK) #define HPET_TN_INT_ROUTE_CAP_SHIFT 32 -#define HPET_TN_CFG_BITS_READONLY_OR_RESERVED (HPET_TN_RESERVED | \ - HPET_TN_PERIODIC_CAP | HPET_TN_64BIT_CAP | HPET_TN_FSB_CAP) /* can be routed to IOAPIC.redirect_table[23..20] */ #define HPET_TN_INT_ROUTE_CAP (0x00f00000ULL \ @@ -368,7 +366,8 @@ static int hpet_write( switch ( addr & ~7 ) { case HPET_CFG: - h->hpet.config = hpet_fixup_reg(new_val, old_val, 0x3); + h->hpet.config = hpet_fixup_reg(new_val, old_val, + HPET_CFG_ENABLE | HPET_CFG_LEGACY); if ( !(old_val & HPET_CFG_ENABLE) && (new_val & HPET_CFG_ENABLE) ) { @@ -411,7 +410,11 @@ static int hpet_write( case HPET_Tn_CFG(2): tn = HPET_TN(CFG, addr); - h->hpet.timers[tn].config = hpet_fixup_reg(new_val, old_val, 0x3f4e); + h->hpet.timers[tn].config = + hpet_fixup_reg(new_val, old_val, + (HPET_TN_LEVEL | HPET_TN_ENABLE | + HPET_TN_PERIODIC | HPET_TN_SETVAL | + HPET_TN_32BIT | HPET_TN_ROUTE)); timer_sanitize_int_route(h, tn);