|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/vRTC: the use_timer field is a boolean one
commit dc2382d1a57921051d131ac3d7ae877f7b6383fc
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Sep 2 15:12:53 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Sep 2 15:12:53 2026 +0200
x86/vRTC: the use_timer field is a boolean one
... and hence wants to be of bool type.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
---
xen/arch/x86/hvm/rtc.c | 6 +++---
xen/arch/x86/include/asm/hvm/vpt.h | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 9a53188dac..78543ab87c 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -189,7 +189,7 @@ static void check_update_timer(RTCState *s)
if (!(s->hw.cmos_data[RTC_REG_C] & RTC_UF) &&
!(s->hw.cmos_data[RTC_REG_B] & RTC_SET))
{
- s->use_timer = 1;
+ s->use_timer = true;
guest_usec = get_localtime_us(d) % USEC_PER_SEC;
if (guest_usec >= (USEC_PER_SEC - 244))
{
@@ -217,7 +217,7 @@ static void check_update_timer(RTCState *s)
}
}
else
- s->use_timer = 0;
+ s->use_timer = false;
}
static void cf_check rtc_update_timer(void *opaque)
@@ -683,7 +683,7 @@ static bool rtc_ioport_read(RTCState *s, uint32_t *val)
break;
case RTC_REG_A:
ret = s->hw.cmos_data[s->hw.cmos_index];
- if ((s->use_timer == 0) && update_in_progress(s))
+ if ( !s->use_timer && update_in_progress(s) )
ret |= RTC_UIP;
break;
case RTC_REG_C:
diff --git a/xen/arch/x86/include/asm/hvm/vpt.h
b/xen/arch/x86/include/asm/hvm/vpt.h
index 24f0918280..2f6bd28a82 100644
--- a/xen/arch/x86/include/asm/hvm/vpt.h
+++ b/xen/arch/x86/include/asm/hvm/vpt.h
@@ -106,7 +106,9 @@ typedef struct RTCState {
s_time_t check_ticks_since;
int period;
uint8_t pt_dead_ticks;
- uint32_t use_timer;
+
+ bool use_timer;
+
spinlock_t lock;
} RTCState;
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |