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

[Xen-devel] [PATCH 14/18] x86/io_apic.c: use plain bool



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/arch/x86/apic.c           |  8 ++++----
 xen/arch/x86/io_apic.c        | 34 +++++++++++++++++-----------------
 xen/include/asm-x86/io_apic.h |  6 +++---
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index 28a1ef8a58..bcd8a7fd8b 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -381,12 +381,12 @@ int __init verify_local_APIC(void)
      */
     if ( reg0 & APIC_LVR_DIRECTED_EOI )
     {
-        if ( ioapic_ack_new == 1 && ioapic_ack_forced == 1 )
+        if ( ioapic_ack_new && ioapic_ack_forced )
             printk("Not enabling directed EOI because ioapic_ack_new has been "
                    "forced on the command line\n");
         else
         {
-            ioapic_ack_new = 0;
+            ioapic_ack_new = false;
             directed_eoi_enabled = true;
             printk("Enabled directed EOI with ioapic_ack_old on!\n");
         }
@@ -1346,7 +1346,7 @@ int __init APIC_init_uniprocessor (void)
         setup_clear_cpu_cap(X86_FEATURE_APIC);
 
     if (!smp_found_config && !cpu_has_apic) {
-        skip_ioapic_setup = 1;
+        skip_ioapic_setup = true;
         return -1;
     }
 
@@ -1356,7 +1356,7 @@ int __init APIC_init_uniprocessor (void)
     if (!cpu_has_apic) {
         printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
                boot_cpu_physical_apicid);
-        skip_ioapic_setup = 1;
+        skip_ioapic_setup = true;
         return -1;
     }
 
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index bd59e13fbb..29958dd475 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -43,9 +43,9 @@ static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
 
 static DEFINE_SPINLOCK(ioapic_lock);
 
-bool_t __read_mostly skip_ioapic_setup;
-bool_t __initdata ioapic_ack_new = 1;
-bool_t __initdata ioapic_ack_forced = 0;
+bool __read_mostly skip_ioapic_setup;
+bool __initdata ioapic_ack_new = true;
+bool __initdata ioapic_ack_forced;
 
 /*
  * # of IRQ routing registers
@@ -229,7 +229,7 @@ union entry_union {
 };
 
 struct IO_APIC_route_entry __ioapic_read_entry(
-    unsigned int apic, unsigned int pin, bool_t raw)
+    unsigned int apic, unsigned int pin, bool raw)
 {
     unsigned int (*read)(unsigned int, unsigned int)
         = raw ? __io_apic_read : io_apic_read;
@@ -240,7 +240,7 @@ struct IO_APIC_route_entry __ioapic_read_entry(
 }
 
 static struct IO_APIC_route_entry ioapic_read_entry(
-    unsigned int apic, unsigned int pin, bool_t raw)
+    unsigned int apic, unsigned int pin, bool raw)
 {
     struct IO_APIC_route_entry entry;
     unsigned long flags;
@@ -252,7 +252,7 @@ static struct IO_APIC_route_entry ioapic_read_entry(
 }
 
 void __ioapic_write_entry(
-    unsigned int apic, unsigned int pin, bool_t raw,
+    unsigned int apic, unsigned int pin, bool raw,
     struct IO_APIC_route_entry e)
 {
     void (*write)(unsigned int, unsigned int, unsigned int)
@@ -264,7 +264,7 @@ void __ioapic_write_entry(
 }
 
 static void ioapic_write_entry(
-    unsigned int apic, unsigned int pin, bool_t raw,
+    unsigned int apic, unsigned int pin, bool raw,
     struct IO_APIC_route_entry e)
 {
     unsigned long flags;
@@ -294,7 +294,7 @@ static void __io_apic_eoi(unsigned int apic, unsigned int 
vector, unsigned int p
         /* Else fake an EOI by switching to edge triggered mode
          * and back */
         struct IO_APIC_route_entry entry;
-        bool_t need_to_unmask = 0;
+        bool need_to_unmask = false;
 
         entry = __ioapic_read_entry(apic, pin, TRUE);
 
@@ -304,7 +304,7 @@ static void __io_apic_eoi(unsigned int apic, unsigned int 
vector, unsigned int p
              * a note to unmask it later */
             entry.mask = 1;
             __ioapic_write_entry(apic, pin, TRUE, entry);
-            need_to_unmask = 1;
+            need_to_unmask = true;
         }
 
         /* Flip the trigger mode to edge and back */
@@ -1094,7 +1094,7 @@ static inline void UNEXPECTED_IO_APIC(void)
 {
 }
 
-static void /*__init*/ __print_IO_APIC(bool_t boot)
+static void /*__init*/ __print_IO_APIC(bool boot)
 {
     int apic, i;
     union IO_APIC_reg_00 reg_00;
@@ -1585,20 +1585,20 @@ static void __init setup_ioapic_ack(char *s)
 {
     if ( !strcmp(s, "old") )
     {
-        ioapic_ack_new = 0;
-        ioapic_ack_forced = 1;
+        ioapic_ack_new = false;
+        ioapic_ack_forced = true;
     }
     else if ( !strcmp(s, "new") )
     {
-        ioapic_ack_new = 1;
-        ioapic_ack_forced = 1;
+        ioapic_ack_new = true;
+        ioapic_ack_forced = true;
     }
     else
         printk("Unknown ioapic_ack value specified: '%s'\n", s);
 }
 custom_param("ioapic_ack", setup_ioapic_ack);
 
-static bool_t io_apic_level_ack_pending(unsigned int irq)
+static bool io_apic_level_ack_pending(unsigned int irq)
 {
     struct irq_pin_list *entry;
     unsigned long flags;
@@ -2498,7 +2498,7 @@ void dump_ioapic_irq_info(void)
 static unsigned int __initdata max_gsi_irqs;
 integer_param("max_gsi_irqs", max_gsi_irqs);
 
-static __init bool_t bad_ioapic_register(unsigned int idx)
+static __init bool bad_ioapic_register(unsigned int idx)
 {
     union IO_APIC_reg_00 reg_00 = { .raw = io_apic_read(idx, 0) };
     union IO_APIC_reg_01 reg_01 = { .raw = io_apic_read(idx, 1) };
@@ -2532,7 +2532,7 @@ void __init init_ioapic_mappings(void)
                 printk(KERN_ERR "WARNING: bogus zero IO-APIC address "
                        "found in MPTABLE, disabling IO/APIC support!\n");
                 smp_found_config = 0;
-                skip_ioapic_setup = 1;
+                skip_ioapic_setup = true;
                 goto fake_ioapic_page;
             }
         }
diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h
index 1706969c3a..557b3cfb23 100644
--- a/xen/include/asm-x86/io_apic.h
+++ b/xen/include/asm-x86/io_apic.h
@@ -169,9 +169,9 @@ static inline void io_apic_modify(unsigned int apic, 
unsigned int reg, unsigned
 }
 
 /* 1 if "noapic" boot option passed */
-extern bool_t skip_ioapic_setup;
-extern bool_t ioapic_ack_new;
-extern bool_t ioapic_ack_forced;
+extern bool skip_ioapic_setup;
+extern bool ioapic_ack_new;
+extern bool ioapic_ack_forced;
 
 extern int io_apic_get_unique_id (int ioapic, int apic_id);
 extern int io_apic_get_version (int ioapic);
-- 
2.11.0


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

 


Rackspace

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