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 15/18] x86/mpparse.c: use plain bool
Date: Fri, 30 Jun 2017 18:01:23 +0100	[thread overview]
Message-ID: <20170630170126.4148-16-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/acpi/boot.c      |  4 ++--
 xen/arch/x86/genapic/bigsmp.c |  4 ++--
 xen/arch/x86/io_apic.c        |  2 +-
 xen/arch/x86/mpparse.c        | 25 +++++++++++--------------
 xen/include/asm-x86/mpspec.h  |  6 +++---
 5 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index 17ba3c39ac..004cb320ea 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -644,7 +644,7 @@ static void __init acpi_process_madt(void)
 			if (!error) {
 				acpi_ioapic = true;
 
-				smp_found_config = 1;
+				smp_found_config = true;
 				clustered_apic_check();
 			}
 		}
@@ -672,7 +672,7 @@ static void __init acpi_process_madt(void)
  * side effects of acpi_boot_init:
  *	acpi_lapic = true if LAPIC found
  *	acpi_ioapic = true if IOAPIC found
- *	if (acpi_lapic && acpi_ioapic) smp_found_config = 1;
+ *	if (acpi_lapic && acpi_ioapic) smp_found_config = true;
  *	...
  *
  * return value: (currently ignored)
diff --git a/xen/arch/x86/genapic/bigsmp.c b/xen/arch/x86/genapic/bigsmp.c
index c250c8ee24..294902ba85 100644
--- a/xen/arch/x86/genapic/bigsmp.c
+++ b/xen/arch/x86/genapic/bigsmp.c
@@ -14,7 +14,7 @@
 static __init int force_bigsmp(struct dmi_system_id *d)
 {
 	printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
-	def_to_bigsmp = 1;
+	def_to_bigsmp = true;
 	return 0;
 }
 
@@ -36,7 +36,7 @@ static __init int probe_bigsmp(void)
 	 */
 	if (acpi_gbl_FADT.flags &
 	    (ACPI_FADT_APIC_CLUSTER | ACPI_FADT_APIC_PHYSICAL))
-		def_to_bigsmp = 1;
+		def_to_bigsmp = true;
 	else if (!def_to_bigsmp)
 		dmi_check_system(bigsmp_dmi_table);
 	return def_to_bigsmp;
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 29958dd475..2838f6bd99 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2531,7 +2531,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;
+                smp_found_config = false;
                 skip_ioapic_setup = true;
                 goto fake_ioapic_page;
             }
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
index efccde28c9..a1a0738a19 100644
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -34,7 +34,7 @@
 #include <bios_ebda.h>
 
 /* Have we found an MP table */
-bool_t __initdata smp_found_config;
+bool __initdata smp_found_config;
 
 /*
  * Various Linux-internal data structures created from the
@@ -52,8 +52,8 @@ struct mpc_config_intsrc __read_mostly mp_irqs[MAX_IRQ_SOURCES];
 /* MP IRQ source entries */
 int __read_mostly mp_irq_entries;
 
-bool_t __read_mostly pic_mode;
-bool_t __read_mostly def_to_bigsmp = 0;
+bool __read_mostly pic_mode;
+bool __read_mostly def_to_bigsmp;
 unsigned long __read_mostly mp_lapic_addr;
 
 /* Processor that is doing the boot up */
@@ -119,7 +119,7 @@ static int __init mpf_checksum(unsigned char *mp, int len)
 
 /* Return xen's logical cpu_id of the new added cpu or <0 if error */
 static int MP_processor_info_x(struct mpc_config_processor *m,
-			       u32 apicid, bool_t hotplug)
+			       u32 apicid, bool hotplug)
 {
  	int ver, cpu = 0;
  	
@@ -178,7 +178,7 @@ static int MP_processor_info_x(struct mpc_config_processor *m,
 		 * No need for processor or APIC checks: physical delivery
 		 * (bigsmp) mode should always work.
 		 */
-		def_to_bigsmp = 1;
+		def_to_bigsmp = true;
 	}
 
 	return cpu;
@@ -591,10 +591,10 @@ void __init get_smp_config (void)
 	printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n", mpf->mpf_specification);
 	if (mpf->mpf_feature2 & (1<<7)) {
 		printk(KERN_INFO "    IMCR and PIC compatibility mode.\n");
-		pic_mode = 1;
+		pic_mode = true;
 	} else {
 		printk(KERN_INFO "    Virtual Wire compatibility mode.\n");
-		pic_mode = 0;
+		pic_mode = false;
 	}
 
 	/*
@@ -613,7 +613,7 @@ void __init get_smp_config (void)
 		 */
 		if (!smp_read_mpc((void *)(unsigned long)mpf->mpf_physptr)) {
 			efi_unmap_mpf();
-			smp_found_config = 0;
+			smp_found_config = false;
 			printk(KERN_ERR "BIOS bug, MP table errors detected!...\n");
 			printk(KERN_ERR "... disabling SMP support. (tell your hw vendor)\n");
 			return;
@@ -664,7 +664,7 @@ static int __init smp_scan_config (unsigned long base, unsigned long length)
 			((mpf->mpf_specification == 1)
 				|| (mpf->mpf_specification == 4)) ) {
 
-			smp_found_config = 1;
+			smp_found_config = true;
 			printk(KERN_INFO "found SMP MP-table at %08lx\n",
 						virt_to_maddr(mpf));
 #if 0
@@ -709,7 +709,7 @@ static void __init efi_check_config(void)
 	    mpf->mpf_length == 1 &&
 	    mpf_checksum((void *)mpf, 16) &&
 	    (mpf->mpf_specification == 1 || mpf->mpf_specification == 4)) {
-		smp_found_config = 1;
+		smp_found_config = true;
 		printk(KERN_INFO "SMP MP-table at %08lx\n", efi.mps);
 		mpf_found = mpf;
 	}
@@ -781,10 +781,7 @@ void __init mp_register_lapic_address (
 }
 
 
-int mp_register_lapic (
-	u32			id,
-	bool_t			enabled,
-	bool_t			hotplug)
+int mp_register_lapic(u32 id, bool enabled, bool hotplug)
 {
 	struct mpc_config_processor processor = {
 		.mpc_type = MP_PROCESSOR,
diff --git a/xen/include/asm-x86/mpspec.h b/xen/include/asm-x86/mpspec.h
index e3e6f50d9e..54fbeb55c2 100644
--- a/xen/include/asm-x86/mpspec.h
+++ b/xen/include/asm-x86/mpspec.h
@@ -7,9 +7,9 @@
 
 extern unsigned char mp_bus_id_to_type[MAX_MP_BUSSES];
 
-extern bool_t def_to_bigsmp;
+extern bool def_to_bigsmp;
 extern unsigned int boot_cpu_physical_apicid;
-extern bool_t smp_found_config;
+extern bool smp_found_config;
 extern void find_smp_config (void);
 extern void get_smp_config (void);
 extern unsigned char apic_version [MAX_APICS];
@@ -17,7 +17,7 @@ extern int mp_irq_entries;
 extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES];
 extern int mpc_default_type;
 extern unsigned long mp_lapic_addr;
-extern bool_t pic_mode;
+extern bool pic_mode;
 
 #ifdef CONFIG_ACPI
 extern int mp_register_lapic(u32 id, bool_t enabled, bool_t hotplug);
-- 
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 ` [PATCH 14/18] x86/io_apic.c: " Wei Liu
2017-06-30 17:53   ` Andrew Cooper
2017-06-30 17:01 ` Wei Liu [this message]
2017-06-30 17:54   ` [PATCH 15/18] x86/mpparse.c: " 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-16-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.