]> xenbits.xensource.com Git - xen.git/commitdiff
x86/HVM: use RTC_* names instead of literal numbers
authorJan Beulich <jbeulich@suse.com>
Wed, 23 Jan 2013 13:17:10 +0000 (14:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 23 Jan 2013 13:17:10 +0000 (14:17 +0100)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/rtc.c

index b994e99ad94e36f5dfb6a774f7e2748226c50956..1aac5b5273f0de58682e343a90472bc77422379d 100644 (file)
@@ -53,8 +53,9 @@ static inline int convert_hour(RTCState *s, int hour);
 static void rtc_periodic_cb(struct vcpu *v, void *opaque)
 {
     RTCState *s = opaque;
+
     spin_lock(&s->lock);
-    s->hw.cmos_data[RTC_REG_C] |= 0xc0;
+    s->hw.cmos_data[RTC_REG_C] |= RTC_PF | RTC_IRQF;
     spin_unlock(&s->lock);
 }
 
@@ -463,7 +464,7 @@ static int rtc_ioport_write(void *opaque, uint32_t addr, uint32_t data)
 
 static inline int to_bcd(RTCState *s, int a)
 {
-    if ( s->hw.cmos_data[RTC_REG_B] & 0x04 )
+    if ( s->hw.cmos_data[RTC_REG_B] & RTC_DM_BINARY )
         return a;
     else
         return ((a / 10) << 4) | (a % 10);
@@ -471,7 +472,7 @@ static inline int to_bcd(RTCState *s, int a)
 
 static inline int from_bcd(RTCState *s, int a)
 {
-    if ( s->hw.cmos_data[RTC_REG_B] & 0x04 )
+    if ( s->hw.cmos_data[RTC_REG_B] & RTC_DM_BINARY )
         return a;
     else
         return ((a >> 4) * 10) + (a & 0x0f);