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 01/18] x86/acpi: use plain bool
Date: Fri, 30 Jun 2017 18:01:09 +0100	[thread overview]
Message-ID: <20170630170126.4148-2-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            | 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@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-06-30 17:46 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 ` Wei Liu [this message]
2017-06-30 17:01 ` [PATCH 02/18] x86/apic.c: use plain bool 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 ` [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-2-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.