]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mpparse.c: use plain bool
authorWei Liu <wei.liu2@citrix.com>
Fri, 30 Jun 2017 16:37:19 +0000 (17:37 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 4 Jul 2017 13:54:42 +0000 (14:54 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/acpi/boot.c
xen/arch/x86/genapic/bigsmp.c
xen/arch/x86/io_apic.c
xen/arch/x86/mpparse.c
xen/include/asm-x86/mpspec.h

index 7c9427d9ebc54ad690e1fb3ebe6a74648349a625..8e6c96dcf6d848a23178c7b2b2623cdc5d5aaa5c 100644 (file)
@@ -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)
index c250c8ee248fe206175ac96408da6909ae6fdba2..294902ba852bea63c3d82778debe7fc6fbad2a88 100644 (file)
@@ -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;
index 29958dd47525a7f7fd3f9f570868c0fc9a15a8c4..2838f6bd99017a52d7bde6cd006218102fa2c0b8 100644 (file)
@@ -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;
             }
index efccde28c96d7b861709cff1f7eebc044c611783..a1a0738a19c082c3078bd210df5b11c4c84fa459 100644 (file)
@@ -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,
index e3e6f50d9e72c0dbaff543bf1ba81bb2f5952611..1246eece0b24d4eb0283ac34b45c02e08442924e 100644 (file)
@@ -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,10 +17,10 @@ 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);
+extern int mp_register_lapic(u32 id, bool enabled, bool hotplug);
 extern void mp_unregister_lapic(uint32_t apic_id, uint32_t cpu);
 extern void mp_register_lapic_address (u64 address);
 extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base);