From patchwork Fri Jun 30 17:01:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9820207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A2698603D7 for ; Fri, 30 Jun 2017 17:48:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FBCA28657 for ; Fri, 30 Jun 2017 17:48:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 845C0286B0; Fri, 30 Jun 2017 17:48:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F0BA228657 for ; Fri, 30 Jun 2017 17:48:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQzzr-0008Qc-Fr; Fri, 30 Jun 2017 17:46:23 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQzzq-0008QW-Rh for xen-devel@lists.xenproject.org; Fri, 30 Jun 2017 17:46:22 +0000 Received: from [193.109.254.147] by server-2.bemta-6.messagelabs.com id C1/71-03032-E6E86595; Fri, 30 Jun 2017 17:46:22 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRWlGSWpSXmKPExsXitHSDvW5uX1i kQccvRYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPrzMssBadtK671zGZpYHxs3MXIySEh4C/R seA+E4jNJqAs8bOzlw3EFhHQk2g68JwRxGYWyJM4u3oRK4gtLKAv0f9/C1gNi4CqRMORhcwgN q+AucSML51sEDPlJXa1XQSr5xSwkLi0YRoLiC0EVLP46h4mCFtBomP6MSaIXkGJkzOfsEDskp A4+OIF8wRG3llIUrOQpBYwMq1i1ChOLSpLLdI1tNRLKspMzyjJTczM0TU0MNPLTS0uTkxPzUl MKtZLzs/dxAgMHgYg2MH4Y1nAIUZJDiYlUd6V10IjhfiS8lMqMxKLM+KLSnNSiw8xynBwKEnw OvWGRQoJFqWmp1akZeYAwxgmLcHBoyTCu6sLKM1bXJCYW5yZDpE6xWjMsWH1+i9MHK8m/P/GJ MSSl5+XKiXOywAySQCkNKM0D24QLL4uMcpKCfMyAp0mxFOQWpSbWYIq/4pRnINRSZg3AGQKT2 ZeCdy+V0CnMAGdIjwjBOSUkkSElFQDo0nzHtXStb9qpgjEscSwCM1vrFFqnl5rceP0HYmweeb neqfM3GvQbanlY1Ilcfp219+ly93ff1o2h3n6Tq01fBmbdvpJN2wLPGbvcYJPSf5UdEDqr8sr OHwk5hzdH7IueuuXP0ci78QK26pey58StWPForVmPpesv3Dl6/A7XmE6GPRU6qtVohJLcUaio RZzUXEiAPDbZ22qAgAA X-Env-Sender: prvs=347159f46=wei.liu2@citrix.com X-Msg-Ref: server-11.tower-27.messagelabs.com!1498844780!74474600!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 36285 invoked from network); 30 Jun 2017 17:46:21 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-11.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 30 Jun 2017 17:46:21 -0000 X-IronPort-AV: E=Sophos;i="5.40,287,1496102400"; d="scan'208";a="438501314" From: Wei Liu To: Xen-devel Date: Fri, 30 Jun 2017 18:01:09 +0100 Message-ID: <20170630170126.4148-2-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170630170126.4148-1-wei.liu2@citrix.com> References: <20170630170126.4148-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: Andrew Cooper , Wei Liu , Jan Beulich Subject: [Xen-devel] [PATCH 01/18] x86/acpi: use plain bool X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Wei Liu --- 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__ */