x86: switch to plain bool in passthrough code
authorWei Liu <wei.liu2@citrix.com>
Mon, 21 Aug 2017 14:09:13 +0000 (15:09 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 22 Aug 2017 15:49:31 +0000 (16:49 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/io.c
xen/include/asm-x86/hvm/irq.h

index e30fd568f3ffa137dcb4c042e0677d992b2f86b2..19a21bf85a1d596accc763763484381b7c3ef914 100644 (file)
@@ -81,17 +81,17 @@ static void raise_softirq_for(struct hvm_pirq_dpci *pirq_dpci)
  * If it is false, it is the callers responsibility to make sure
  * that the softirq (with the event_lock dropped) has ran.
  */
-bool_t pt_pirq_softirq_active(struct hvm_pirq_dpci *pirq_dpci)
+bool pt_pirq_softirq_active(struct hvm_pirq_dpci *pirq_dpci)
 {
     if ( pirq_dpci->state & ((1 << STATE_RUN) | (1 << STATE_SCHED)) )
-        return 1;
+        return true;
 
     /*
      * If in the future we would call 'raise_softirq_for' right away
      * after 'pt_pirq_softirq_active' we MUST reset the list (otherwise it
      * might have stale data).
      */
-    return 0;
+    return false;
 }
 
 /*
@@ -136,7 +136,7 @@ static void pt_pirq_softirq_reset(struct hvm_pirq_dpci *pirq_dpci)
     pirq_dpci->masked = 0;
 }
 
-bool_t pt_irq_need_timer(uint32_t flags)
+bool pt_irq_need_timer(uint32_t flags)
 {
     return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE));
 }
@@ -232,7 +232,7 @@ void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci)
  */
 static struct vcpu *vector_hashing_dest(const struct domain *d,
                                         uint32_t dest_id,
-                                        bool_t dest_mode,
+                                        bool dest_mode,
                                         uint8_t gvec)
 
 {
@@ -739,14 +739,14 @@ void pt_pirq_init(struct domain *d, struct hvm_pirq_dpci *dpci)
     dpci->gmsi.dest_vcpu_id = -1;
 }
 
-bool_t pt_pirq_cleanup_check(struct hvm_pirq_dpci *dpci)
+bool pt_pirq_cleanup_check(struct hvm_pirq_dpci *dpci)
 {
     if ( !dpci->flags && !pt_pirq_softirq_active(dpci) )
     {
         dpci->dom = NULL;
-        return 1;
+        return true;
     }
-    return 0;
+    return false;
 }
 
 int pt_pirq_iterate(struct domain *d,
index 30a6e78f1edcfc86e66b3999bb4976aefab1924b..106dc196138175d8ce544cded0b67602105d5810 100644 (file)
@@ -174,7 +174,7 @@ struct hvm_irq_dpci {
 struct hvm_pirq_dpci {
     uint32_t flags;
     unsigned int state;
-    bool_t masked;
+    bool masked;
     uint16_t pending;
     struct list_head digl_list;
     struct domain *dom;
@@ -184,13 +184,13 @@ struct hvm_pirq_dpci {
 };
 
 void pt_pirq_init(struct domain *, struct hvm_pirq_dpci *);
-bool_t pt_pirq_cleanup_check(struct hvm_pirq_dpci *);
+bool pt_pirq_cleanup_check(struct hvm_pirq_dpci *);
 int pt_pirq_iterate(struct domain *d,
                     int (*cb)(struct domain *,
                               struct hvm_pirq_dpci *, void *arg),
                     void *arg);
 
-bool_t pt_pirq_softirq_active(struct hvm_pirq_dpci *);
+bool pt_pirq_softirq_active(struct hvm_pirq_dpci *);
 /* Modify state of a PCI INTx wire. */
 void hvm_pci_intx_assert(struct domain *d, unsigned int device,
                          unsigned int intx);