All of lore.kernel.org
 help / color / mirror / Atom feed
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 14/18] x86/io_apic.c: use plain bool
Date: Fri, 30 Jun 2017 18:01:22 +0100	[thread overview]
Message-ID: <20170630170126.4148-15-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170630170126.4148-1-wei.liu2@citrix.com>

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 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@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-06-30 17:16 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 17:01 [PATCH 00/18] x86: more bool_t to bool cleanup Wei Liu
2017-06-30 17:01 ` [PATCH 01/18] x86/acpi: use plain bool Wei Liu
2017-06-30 17:01 ` [PATCH 02/18] x86/apic.c: " Wei Liu
2017-06-30 17:26   ` Andrew Cooper
2017-06-30 17:01 ` [PATCH 03/18] x86/debug.c: " Wei Liu
2017-06-30 17:28   ` Andrew Cooper
2017-06-30 17:01 ` [PATCH 04/18] x86/dmi.c: " Wei Liu
2017-06-30 17:01 ` [PATCH 05/18] x86/domctl: " Wei Liu
2017-06-30 17:01 ` [PATCH 06/18] x86/hpet.c: " Wei Liu
2017-06-30 17:01 ` [PATCH 07/18] x86/e820.c: use plan bool Wei Liu
2017-06-30 17:01 ` [PATCH 08/18] x86/i387.c: use plain bool Wei Liu
2017-06-30 17:01 ` [PATCH 09/18] x86/i8259.c: " Wei Liu
2017-06-30 17:01 ` [PATCH 10/18] x86/monitor.c: " Wei Liu
2017-06-30 17:45   ` Andrew Cooper
2017-06-30 18:30     ` Razvan Cojocaru
2017-06-30 17:01 ` [PATCH 11/18] x86/xstate.c: " Wei Liu
2017-06-30 17:01 ` [PATCH 12/18] x86/srat.c: " Wei Liu
2017-06-30 17:01 ` [PATCH 13/18] x86/smpboot.c: " Wei Liu
2017-06-30 17:01 ` Wei Liu [this message]
2017-06-30 17:53   ` [PATCH 14/18] x86/io_apic.c: " Andrew Cooper
2017-06-30 17:01 ` [PATCH 15/18] x86/mpparse.c: " Wei Liu
2017-06-30 17:54   ` Andrew Cooper
2017-06-30 17:01 ` [PATCH 16/18] x86/numa.c: " Wei Liu
2017-06-30 17:01 ` [PATCH 17/18] x86/msi.c: " Wei Liu
2017-06-30 17:01 ` [PATCH 18/18] x86/psr.c: " Wei Liu
2017-06-30 18:00 ` [PATCH 00/18] x86: more bool_t to bool cleanup Andrew Cooper
2017-07-03  8:10 ` Jan Beulich
2017-07-03 12:54   ` Wei Liu
2017-07-03 13:19     ` Jan Beulich
2017-07-04 10:43       ` Wei Liu

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=20170630170126.4148-15-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.