[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/msi.c: use plain bool



commit 27b2ed18244b67c1ff051b9bf417391ed130915a
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Fri Jun 30 17:55:34 2017 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue Jul 4 14:54:42 2017 +0100

    x86/msi.c: use plain bool
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/msi.c        | 32 ++++++++++++++++----------------
 xen/include/asm-x86/msi.h |  6 +++---
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index d98f400..77998f4 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -121,7 +121,7 @@ static void msix_put_fixmap(struct arch_msix *msix, int idx)
     spin_unlock(&msix->table_lock);
 }
 
-static bool_t memory_decoded(const struct pci_dev *dev)
+static bool memory_decoded(const struct pci_dev *dev)
 {
     u8 bus, slot, func;
 
@@ -142,13 +142,13 @@ static bool_t memory_decoded(const struct pci_dev *dev)
               PCI_COMMAND_MEMORY);
 }
 
-static bool_t msix_memory_decoded(const struct pci_dev *dev, unsigned int pos)
+static bool msix_memory_decoded(const struct pci_dev *dev, unsigned int pos)
 {
     u16 control = pci_conf_read16(dev->seg, dev->bus, PCI_SLOT(dev->devfn),
                                   PCI_FUNC(dev->devfn), msix_control_reg(pos));
 
     if ( !(control & PCI_MSIX_FLAGS_ENABLE) )
-        return 0;
+        return false;
 
     return memory_decoded(dev);
 }
@@ -191,7 +191,7 @@ void msi_compose_msg(unsigned vector, const cpumask_t 
*cpu_mask, struct msi_msg
                 MSI_DATA_VECTOR(vector);
 }
 
-static bool_t read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
+static bool read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
 {
     switch ( entry->msi_attrib.type )
     {
@@ -228,7 +228,7 @@ static bool_t read_msi_msg(struct msi_desc *entry, struct 
msi_msg *msg)
 
         if ( unlikely(!msix_memory_decoded(entry->dev,
                                            entry->msi_attrib.pos)) )
-            return 0;
+            return false;
         msg->address_lo = readl(base + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET);
         msg->address_hi = readl(base + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
         msg->data = readl(base + PCI_MSIX_ENTRY_DATA_OFFSET);
@@ -241,7 +241,7 @@ static bool_t read_msi_msg(struct msi_desc *entry, struct 
msi_msg *msg)
     if ( iommu_intremap )
         iommu_read_msi_from_ire(entry, msg);
 
-    return 1;
+    return true;
 }
 
 static int write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
@@ -383,13 +383,13 @@ int msi_maskable_irq(const struct msi_desc *entry)
            || entry->msi_attrib.maskbit;
 }
 
-static bool_t msi_set_mask_bit(struct irq_desc *desc, bool_t host, bool_t 
guest)
+static bool msi_set_mask_bit(struct irq_desc *desc, bool host, bool guest)
 {
     struct msi_desc *entry = desc->msi_desc;
     struct pci_dev *pdev;
     u16 seg, control;
     u8 bus, slot, func;
-    bool_t flag = host || guest, maskall;
+    bool flag = host || guest, maskall;
 
     ASSERT(spin_is_locked(&desc->lock));
     BUG_ON(!entry || !entry->dev);
@@ -434,13 +434,13 @@ static bool_t msi_set_mask_bit(struct irq_desc *desc, 
bool_t host, bool_t guest)
             entry->msi_attrib.host_masked = host;
             entry->msi_attrib.guest_masked = guest;
 
-            flag = 1;
+            flag = true;
         }
         else if ( flag && !(control & PCI_MSIX_FLAGS_MASKALL) )
         {
             domid_t domid = pdev->domain->domain_id;
 
-            maskall = 1;
+            maskall = true;
             if ( pdev->msix->warned != domid )
             {
                 pdev->msix->warned = domid;
@@ -503,7 +503,7 @@ void unmask_msi_irq(struct irq_desc *desc)
         WARN();
 }
 
-void guest_mask_msi_irq(struct irq_desc *desc, bool_t mask)
+void guest_mask_msi_irq(struct irq_desc *desc, bool mask)
 {
     msi_set_mask_bit(desc, desc->msi_desc->msi_attrib.host_masked, mask);
 }
@@ -850,7 +850,7 @@ static int msix_capability_init(struct pci_dev *dev,
     u8 bus = dev->bus;
     u8 slot = PCI_SLOT(dev->devfn);
     u8 func = PCI_FUNC(dev->devfn);
-    bool_t maskall = msix->host_maskall;
+    bool maskall = msix->host_maskall;
 
     ASSERT(pcidevs_locked());
 
@@ -984,7 +984,7 @@ static int msix_capability_init(struct pci_dev *dev,
 
     if ( !msix->used_entries )
     {
-        maskall = 0;
+        maskall = false;
         if ( !msix->guest_maskall )
             control &= ~PCI_MSIX_FLAGS_MASKALL;
         else
@@ -1161,7 +1161,7 @@ static void __pci_disable_msix(struct msi_desc *entry)
                                            PCI_CAP_ID_MSIX);
     u16 control = pci_conf_read16(seg, bus, slot, func,
                                   msix_control_reg(entry->msi_attrib.pos));
-    bool_t maskall = dev->msix->host_maskall;
+    bool maskall = dev->msix->host_maskall;
 
     if ( unlikely(!(control & PCI_MSIX_FLAGS_ENABLE)) )
     {
@@ -1181,7 +1181,7 @@ static void __pci_disable_msix(struct msi_desc *entry)
                "cannot disable IRQ %d: masking MSI-X on %04x:%02x:%02x.%u\n",
                entry->irq, dev->seg, dev->bus,
                PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
-        maskall = 1;
+        maskall = true;
     }
     dev->msix->host_maskall = maskall;
     if ( maskall || dev->msix->guest_maskall )
@@ -1191,7 +1191,7 @@ static void __pci_disable_msix(struct msi_desc *entry)
     _pci_cleanup_msix(dev->msix);
 }
 
-int pci_prepare_msix(u16 seg, u8 bus, u8 devfn, bool_t off)
+int pci_prepare_msix(u16 seg, u8 bus, u8 devfn, bool off)
 {
     int rc;
     struct pci_dev *pdev;
diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h
index 213ee53..37d37b8 100644
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -83,7 +83,7 @@ struct msi_desc;
 /* Helper functions */
 extern int pci_enable_msi(struct msi_info *msi, struct msi_desc **desc);
 extern void pci_disable_msi(struct msi_desc *desc);
-extern int pci_prepare_msix(u16 seg, u8 bus, u8 devfn, bool_t off);
+extern int pci_prepare_msix(u16 seg, u8 bus, u8 devfn, bool off);
 extern void pci_cleanup_msi(struct pci_dev *pdev);
 extern int setup_msi_irq(struct irq_desc *, struct msi_desc *);
 extern int __setup_msi_irq(struct irq_desc *, struct msi_desc *,
@@ -235,7 +235,7 @@ struct arch_msix {
     int table_refcnt[MAX_MSIX_TABLE_PAGES];
     int table_idx[MAX_MSIX_TABLE_PAGES];
     spinlock_t table_lock;
-    bool_t host_maskall, guest_maskall;
+    bool host_maskall, guest_maskall;
     domid_t warned;
 };
 
@@ -245,7 +245,7 @@ void msi_compose_msg(unsigned vector, const cpumask_t *mask,
 void __msi_set_enable(u16 seg, u8 bus, u8 slot, u8 func, int pos, int enable);
 void mask_msi_irq(struct irq_desc *);
 void unmask_msi_irq(struct irq_desc *);
-void guest_mask_msi_irq(struct irq_desc *, bool_t mask);
+void guest_mask_msi_irq(struct irq_desc *, bool mask);
 void ack_nonmaskable_msi_irq(struct irq_desc *);
 void end_nonmaskable_msi_irq(struct irq_desc *, u8 vector);
 void set_msi_affinity(struct irq_desc *, const cpumask_t *);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.