From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Wei Liu <wei.liu2@citrix.com>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 6/8] x86/time.c: use plain bool
Date: Wed, 28 Jun 2017 15:18:25 +0100 [thread overview]
Message-ID: <20170628141827.19046-7-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170628141827.19046-1-wei.liu2@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/x86/time.c | 28 ++++++++++++++--------------
xen/include/asm-x86/domain.h | 4 ++--
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 655af33cb3..75ea695ac5 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -82,7 +82,7 @@ static struct timer calibration_timer;
static DEFINE_SPINLOCK(pit_lock);
static u16 pit_stamp16;
static u32 pit_stamp32;
-static bool_t __read_mostly using_pit;
+static bool __read_mostly using_pit;
/* Boot timestamp, filled in head.S */
u64 __initdata boot_tsc_stamp;
@@ -304,7 +304,7 @@ static s64 __init init_pit(struct platform_timesource *pts)
u64 start, end;
unsigned long count;
- using_pit = 1;
+ using_pit = true;
/* Set the Gate high, disable speaker. */
outb((portb & ~0x02) | 0x01, 0x61);
@@ -577,7 +577,7 @@ static void plt_overflow(void *unused)
}
if ( i != 0 )
{
- static bool_t warned_once;
+ static bool warned_once;
if ( !test_and_set_bool(warned_once) )
printk("Platform timer appears to have unexpectedly wrapped "
"%u%s times.\n", i, (i == 10) ? " or more" : "");
@@ -809,7 +809,7 @@ static unsigned long get_cmos_time(void)
unsigned long res, flags;
struct rtc_time rtc;
unsigned int seconds = 60;
- static bool_t __read_mostly cmos_rtc_probe;
+ static bool __read_mostly cmos_rtc_probe;
boolean_param("cmos-rtc-probe", cmos_rtc_probe);
if ( efi_enabled(EFI_RS) )
@@ -820,7 +820,7 @@ static unsigned long get_cmos_time(void)
}
if ( likely(!(acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC)) )
- cmos_rtc_probe = 0;
+ cmos_rtc_probe = false;
else if ( system_state < SYS_STATE_smp_boot && !cmos_rtc_probe )
panic("System with no CMOS RTC advertised must be booted from EFI"
" (or with command line option \"cmos-rtc-probe\")");
@@ -858,7 +858,7 @@ static unsigned long get_cmos_time(void)
if ( seconds < 60 )
{
if ( rtc.sec != seconds )
- cmos_rtc_probe = 0;
+ cmos_rtc_probe = false;
break;
}
@@ -987,15 +987,15 @@ static void __update_vcpu_system_time(struct vcpu *v, int force)
v->arch.pv_vcpu.pending_system_time = _u;
}
-bool_t update_secondary_system_time(struct vcpu *v,
- struct vcpu_time_info *u)
+bool update_secondary_system_time(struct vcpu *v,
+ struct vcpu_time_info *u)
{
XEN_GUEST_HANDLE(vcpu_time_info_t) user_u = v->arch.time_info_guest;
struct guest_memory_policy policy =
{ .smap_policy = SMAP_CHECK_ENABLED, .nested_guest_mode = false };
if ( guest_handle_is_null(user_u) )
- return 1;
+ return true;
update_guest_memory_policy(v, &policy);
@@ -1003,7 +1003,7 @@ bool_t update_secondary_system_time(struct vcpu *v,
if ( __copy_field_to_guest(user_u, u, version) == sizeof(u->version) )
{
update_guest_memory_policy(v, &policy);
- return 0;
+ return false;
}
wmb();
/* 2. Update all other userspace fields. */
@@ -1015,7 +1015,7 @@ bool_t update_secondary_system_time(struct vcpu *v,
update_guest_memory_policy(v, &policy);
- return 1;
+ return true;
}
void update_vcpu_system_time(struct vcpu *v)
@@ -1951,8 +1951,8 @@ void tsc_get_info(struct domain *d, uint32_t *tsc_mode,
uint64_t *elapsed_nsec, uint32_t *gtsc_khz,
uint32_t *incarnation)
{
- bool_t enable_tsc_scaling = is_hvm_domain(d) &&
- hvm_tsc_scaling_supported && !d->arch.vtsc;
+ bool enable_tsc_scaling = is_hvm_domain(d) &&
+ hvm_tsc_scaling_supported && !d->arch.vtsc;
*incarnation = d->arch.incarnation;
*tsc_mode = d->arch.tsc_mode;
@@ -2017,7 +2017,7 @@ void tsc_set_info(struct domain *d,
switch ( d->arch.tsc_mode = tsc_mode )
{
- bool_t enable_tsc_scaling;
+ bool enable_tsc_scaling;
case TSC_MODE_DEFAULT:
case TSC_MODE_ALWAYS_EMULATE:
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 398193eefb..c10522b7f5 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -593,8 +593,8 @@ void update_guest_memory_policy(struct vcpu *v,
#define hvm_svm hvm_vcpu.u.svm
bool update_runstate_area(struct vcpu *);
-bool_t update_secondary_system_time(struct vcpu *,
- struct vcpu_time_info *);
+bool update_secondary_system_time(struct vcpu *,
+ struct vcpu_time_info *);
void vcpu_show_execution_state(struct vcpu *);
void vcpu_show_registers(const struct vcpu *);
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-06-28 14:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 14:18 [PATCH 0/8] x86: bool_t to bool cleanup Wei Liu
2017-06-28 14:18 ` [PATCH 1/8] x86/irq.c: use plain bool Wei Liu
2017-06-28 14:21 ` Andrew Cooper
2017-06-29 6:53 ` Jan Beulich
2017-06-29 10:35 ` Wei Liu
2017-06-28 14:18 ` [PATCH 2/8] x86/platform_hypercall.c: " Wei Liu
2017-06-28 14:21 ` Andrew Cooper
2017-06-28 14:18 ` [PATCH 3/8] x86/domain.c: " Wei Liu
2017-06-28 14:22 ` Andrew Cooper
2017-06-29 6:55 ` Jan Beulich
2017-06-28 14:18 ` [PATCH 4/8] x86/dom0_build.c: " Wei Liu
2017-06-28 14:18 ` [PATCH 5/8] x86/crash.c: " Wei Liu
2017-06-28 14:18 ` Wei Liu [this message]
2017-06-29 6:59 ` [PATCH 6/8] x86/time.c: " Jan Beulich
2017-06-28 14:18 ` [PATCH 7/8] x86/nmi.c: " Wei Liu
2017-06-28 14:18 ` [PATCH 8/8] x86/setup.c: " Wei Liu
2017-06-28 14:26 ` Andrew Cooper
2017-06-28 14:57 ` Wei Liu
2017-06-28 16:21 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170628141827.19046-7-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).