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 1/8] x86/irq.c: use plain bool
Date: Wed, 28 Jun 2017 15:18:20 +0100 [thread overview]
Message-ID: <20170628141827.19046-2-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170628141827.19046-1-wei.liu2@citrix.com>
Replace bool_t with bool and adjust code accordingly.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/x86/irq.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 113667cdea..32800ce165 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -29,7 +29,7 @@
static void parse_irq_vector_map_param(char *s);
/* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
-bool_t __read_mostly opt_noirqbalance = 0;
+bool __read_mostly opt_noirqbalance;
boolean_param("noirqbalance", opt_noirqbalance);
unsigned int __read_mostly nr_irqs_gsi = 16;
@@ -1070,7 +1070,7 @@ struct pending_eoi {
static DEFINE_PER_CPU(struct pending_eoi, pending_eoi[NR_DYNAMIC_VECTORS]);
#define pending_eoi_sp(p) ((p)[NR_DYNAMIC_VECTORS-1].vector)
-bool_t cpu_has_pending_apic_eoi(void)
+bool cpu_has_pending_apic_eoi(void)
{
return (pending_eoi_sp(this_cpu(pending_eoi)) != 0);
}
@@ -1802,11 +1802,12 @@ void pirq_guest_unbind(struct domain *d, struct pirq *pirq)
cleanup_domain_irq_pirq(d, irq, pirq);
}
-static int pirq_guest_force_unbind(struct domain *d, struct pirq *pirq)
+static bool pirq_guest_force_unbind(struct domain *d, struct pirq *pirq)
{
struct irq_desc *desc;
irq_guest_action_t *action, *oldaction = NULL;
- int i, bound = 0;
+ int i;
+ bool bound = false;
WARN_ON(!spin_is_locked(&d->event_lock));
@@ -1830,7 +1831,7 @@ static int pirq_guest_force_unbind(struct domain *d, struct pirq *pirq)
if ( i == action->nr_guests )
goto out;
- bound = 1;
+ bound = true;
oldaction = __pirq_guest_unbind(d, pirq, desc);
out:
@@ -1846,8 +1847,8 @@ static int pirq_guest_force_unbind(struct domain *d, struct pirq *pirq)
return bound;
}
-static inline bool_t is_free_pirq(const struct domain *d,
- const struct pirq *pirq)
+static inline bool is_free_pirq(const struct domain *d,
+ const struct pirq *pirq)
{
return !pirq || (!pirq->arch.irq && (!is_hvm_domain(d) ||
pirq->arch.hvm.emuirq == IRQ_UNBOUND));
@@ -2098,7 +2099,7 @@ int unmap_domain_pirq(struct domain *d, int pirq)
struct irq_desc *desc;
int irq, ret = 0, rc;
unsigned int i, nr = 1;
- bool_t forced_unbind;
+ bool forced_unbind;
struct pirq *info;
struct msi_desc *msi_desc = NULL;
@@ -2327,7 +2328,7 @@ static int __init setup_dump_irqs(void)
__initcall(setup_dump_irqs);
/* Reset irq affinities to match the given CPU mask. */
-void fixup_irqs(const cpumask_t *mask, bool_t verbose)
+void fixup_irqs(const cpumask_t *mask, bool verbose)
{
unsigned int irq;
static int warned;
@@ -2335,7 +2336,7 @@ void fixup_irqs(const cpumask_t *mask, bool_t verbose)
for ( irq = 0; irq < nr_irqs; irq++ )
{
- bool_t break_affinity = 0, set_affinity = 1;
+ bool break_affinity = false, set_affinity = true;
unsigned int vector;
cpumask_t affinity;
@@ -2363,7 +2364,7 @@ void fixup_irqs(const cpumask_t *mask, bool_t verbose)
cpumask_and(&affinity, &affinity, mask);
if ( cpumask_empty(&affinity) )
{
- break_affinity = 1;
+ break_affinity = true;
cpumask_copy(&affinity, mask);
}
@@ -2373,7 +2374,7 @@ void fixup_irqs(const cpumask_t *mask, bool_t verbose)
if ( desc->handler->set_affinity )
desc->handler->set_affinity(desc, &affinity);
else if ( !(warned++) )
- set_affinity = 0;
+ set_affinity = false;
if ( desc->handler->enable )
desc->handler->enable(desc);
--
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 ` Wei Liu [this message]
2017-06-28 14:21 ` [PATCH 1/8] x86/irq.c: use plain bool 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 ` [PATCH 6/8] x86/time.c: " Wei Liu
2017-06-29 6:59 ` 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-2-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).