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

[Xen-devel] [PATCH 01/18] x86/acpi: use plain bool



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/arch/x86/acpi/boot.c            | 26 +++++++++++++-------------
 xen/arch/x86/acpi/cpu_idle.c        | 19 ++++++++++---------
 xen/arch/x86/acpi/cpufreq/cpufreq.c |  2 +-
 xen/include/asm-x86/acpi.h          |  5 ++---
 xen/include/asm-x86/cpuidle.h       |  2 +-
 xen/include/asm-x86/softirq.h       |  2 +-
 6 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index 83cbff95c1..17ba3c39ac 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -44,14 +44,14 @@
 
 #define PREFIX                 "ACPI: "
 
-bool_t __initdata acpi_noirq;  /* skip ACPI IRQ initialization */
-bool_t __initdata acpi_ht = 1; /* enable HT */
+bool __initdata acpi_noirq;     /* skip ACPI IRQ initialization */
+bool __initdata acpi_ht = true; /* enable HT */
 
-bool_t __initdata acpi_lapic;
-bool_t __initdata acpi_ioapic;
+bool __initdata acpi_lapic;
+bool __initdata acpi_ioapic;
 
 /* acpi_skip_timer_override: Skip IRQ0 overrides. */
-static bool_t acpi_skip_timer_override __initdata;
+static bool acpi_skip_timer_override __initdata;
 boolean_param("acpi_skip_timer_override", acpi_skip_timer_override);
 
 static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
@@ -83,7 +83,7 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const 
unsigned long end)
 {
        struct acpi_madt_local_x2apic *processor =
                container_of(header, struct acpi_madt_local_x2apic, header);
-       bool_t enabled = 0;
+       bool enabled = false;
 
        if (BAD_MADT_ENTRY(processor, end))
                return -EINVAL;
@@ -107,7 +107,7 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, 
const unsigned long end)
        if (processor->lapic_flags & ACPI_MADT_ENABLED) {
                x86_acpiid_to_apicid[processor->uid] =
                        processor->local_apic_id;
-               enabled = 1;
+               enabled = true;
        }
 
        /*
@@ -127,7 +127,7 @@ acpi_parse_lapic(struct acpi_subtable_header * header, 
const unsigned long end)
 {
        struct acpi_madt_local_apic *processor =
                container_of(header, struct acpi_madt_local_apic, header);
-       bool_t enabled = 0;
+       bool enabled = false;
 
        if (BAD_MADT_ENTRY(processor, end))
                return -EINVAL;
@@ -137,7 +137,7 @@ acpi_parse_lapic(struct acpi_subtable_header * header, 
const unsigned long end)
        /* Record local apic id only when enabled */
        if (processor->lapic_flags & ACPI_MADT_ENABLED) {
                x86_acpiid_to_apicid[processor->processor_id] = processor->id;
-               enabled = 1;
+               enabled = true;
        }
 
        /*
@@ -634,7 +634,7 @@ static void __init acpi_process_madt(void)
                 */
                error = acpi_parse_madt_lapic_entries();
                if (!error) {
-                       acpi_lapic = 1;
+                       acpi_lapic = true;
                        generic_bigsmp_probe();
  
                        /*
@@ -642,7 +642,7 @@ static void __init acpi_process_madt(void)
                         */
                        error = acpi_parse_madt_ioapic_entries();
                        if (!error) {
-                               acpi_ioapic = 1;
+                               acpi_ioapic = true;
 
                                smp_found_config = 1;
                                clustered_apic_check();
@@ -670,8 +670,8 @@ static void __init acpi_process_madt(void)
  * other side effects.
  *
  * side effects of acpi_boot_init:
- *     acpi_lapic = 1 if LAPIC found
- *     acpi_ioapic = 1 if IOAPIC found
+ *     acpi_lapic = true if LAPIC found
+ *     acpi_ioapic = true if IOAPIC found
  *     if (acpi_lapic && acpi_ioapic) smp_found_config = 1;
  *     ...
  *
diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index e2be474ee1..482b8a78f3 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -78,7 +78,7 @@ static void lapic_timer_nop(void) { }
 void (*__read_mostly lapic_timer_off)(void);
 void (*__read_mostly lapic_timer_on)(void);
 
-bool_t lapic_timer_init(void)
+bool lapic_timer_init(void)
 {
     if ( boot_cpu_has(X86_FEATURE_ARAT) )
     {
@@ -96,9 +96,9 @@ bool_t lapic_timer_init(void)
         lapic_timer_on = pit_broadcast_exit;
     }
     else
-        return 0;
+        return false;
 
-    return 1;
+    return true;
 }
 
 static uint64_t (*__read_mostly tick_to_ns)(uint64_t) = acpi_pm_tick_to_ns;
@@ -106,7 +106,7 @@ static uint64_t (*__read_mostly tick_to_ns)(uint64_t) = 
acpi_pm_tick_to_ns;
 void (*__read_mostly pm_idle_save)(void);
 unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER - 1;
 integer_param("max_cstate", max_cstate);
-static bool_t __read_mostly local_apic_timer_c2_ok;
+static bool __read_mostly local_apic_timer_c2_ok;
 boolean_param("lapic_timer_c2_ok", local_apic_timer_c2_ok);
 
 struct acpi_processor_power *__read_mostly processor_powers[NR_CPUS];
@@ -373,7 +373,7 @@ void cpuidle_wakeup_mwait(cpumask_t *mask)
     cpumask_andnot(mask, mask, &target);
 }
 
-bool_t arch_skip_send_event_check(unsigned int cpu)
+bool arch_skip_send_event_check(unsigned int cpu)
 {
     /*
      * This relies on softirq_pending() and mwait_wakeup() to access data
@@ -489,7 +489,7 @@ void trace_exit_reason(u32 *irq_traced)
  * may not be sent if software enters core C6 during an interrupt service 
  * routine. So we don't enter deep Cx state if there is an EOI pending.
  */
-bool_t errata_c6_eoi_workaround(void)
+static bool errata_c6_eoi_workaround(void)
 {
     static int8_t fix_needed = -1;
 
@@ -1155,10 +1155,11 @@ long set_cx_pminfo(uint32_t cpu, struct 
xen_processor_power *power)
     cpu_id = get_cpu_id(cpu);
     if ( cpu_id == -1 )
     {
-        static bool_t warn_once = 1;
+        static bool warn_once = true;
+
         if ( warn_once || opt_cpu_info )
             printk(XENLOG_WARNING "No CPU ID for APIC ID %#x\n", cpu);
-        warn_once = 0;
+        warn_once = false;
         return -EINVAL;
     }
 
@@ -1335,7 +1336,7 @@ void cpuidle_disable_deep_cstate(void)
     hpet_disable_legacy_broadcast();
 }
 
-bool_t cpuidle_using_deep_cstate(void)
+bool cpuidle_using_deep_cstate(void)
 {
     return xen_cpuidle && max_cstate > (local_apic_timer_c2_ok ? 2 : 1);
 }
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c 
b/xen/arch/x86/acpi/cpufreq/cpufreq.c
index 2e59c7f35e..1f8d02aab9 100644
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -55,7 +55,7 @@ struct acpi_cpufreq_data *cpufreq_drv_data[NR_CPUS];
 
 static struct cpufreq_driver acpi_cpufreq_driver;
 
-static bool_t __read_mostly acpi_pstate_strict;
+static bool __read_mostly acpi_pstate_strict;
 boolean_param("acpi_pstate_strict", acpi_pstate_strict);
 
 static int check_est_cpu(unsigned int cpuid)
diff --git a/xen/include/asm-x86/acpi.h b/xen/include/asm-x86/acpi.h
index 3ceee1ab36..27ecc654cb 100644
--- a/xen/include/asm-x86/acpi.h
+++ b/xen/include/asm-x86/acpi.h
@@ -76,9 +76,8 @@ int __acpi_release_global_lock(unsigned int *lock);
            :"=r"(n_hi), "=r"(n_lo)     \
            :"0"(n_hi), "1"(n_lo))
 
-extern bool_t acpi_lapic, acpi_ioapic, acpi_noirq;
-extern bool_t acpi_ht;
-extern bool acpi_force, acpi_disabled;
+extern bool acpi_lapic, acpi_ioapic, acpi_noirq;
+extern bool acpi_force, acpi_ht, acpi_disabled;
 extern u32 acpi_smi_cmd;
 extern u8 acpi_enable_value, acpi_disable_value;
 void acpi_pic_sci_set_trigger(unsigned int, u16);
diff --git a/xen/include/asm-x86/cpuidle.h b/xen/include/asm-x86/cpuidle.h
index 46e614bb50..08da01803f 100644
--- a/xen/include/asm-x86/cpuidle.h
+++ b/xen/include/asm-x86/cpuidle.h
@@ -10,7 +10,7 @@ extern struct acpi_processor_power *processor_powers[];
 
 extern void (*pm_idle_save)(void);
 
-bool_t lapic_timer_init(void);
+bool lapic_timer_init(void);
 extern void (*lapic_timer_off)(void);
 extern void (*lapic_timer_on)(void);
 
diff --git a/xen/include/asm-x86/softirq.h b/xen/include/asm-x86/softirq.h
index ec787d60c3..5c1a7db566 100644
--- a/xen/include/asm-x86/softirq.h
+++ b/xen/include/asm-x86/softirq.h
@@ -10,6 +10,6 @@
 #define HVM_DPCI_SOFTIRQ       (NR_COMMON_SOFTIRQS + 5)
 #define NR_ARCH_SOFTIRQS       6
 
-bool_t arch_skip_send_event_check(unsigned int cpu);
+bool arch_skip_send_event_check(unsigned int cpu);
 
 #endif /* __ASM_SOFTIRQ_H__ */
-- 
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®.