From patchwork Fri Jun 30 17:01:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9820151 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 6A2F5602B1 for ; Fri, 30 Jun 2017 17:18:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50175286B0 for ; Fri, 30 Jun 2017 17:18:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44D73286C8; Fri, 30 Jun 2017 17:18:37 +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 B190B286B0 for ; Fri, 30 Jun 2017 17:18:36 +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 1dQzWw-00057N-JE; Fri, 30 Jun 2017 17:16:30 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQzWu-000555-Ry for xen-devel@lists.xenproject.org; Fri, 30 Jun 2017 17:16:28 +0000 Received: from [85.158.137.68] by server-3.bemta-3.messagelabs.com id C9/70-01987-C6786595; Fri, 30 Jun 2017 17:16:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRWlGSWpSXmKPExsXitHSDvW5Oe1i kweuTzBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bulUtYCrbxVRxde4StgfEZdxcjJ4eEgL9E y/4WNhCbTUBZ4mdnL5gtIqAn0XTgOSOIzSyQJ3F29SJWEFtYwETi9fqJYHEWAVWJzdPmgdXzC lhITFxxkBFiprzErraLYPWcQPFLG6axgNhCAuYSi6/uYYKwFSQ6ph9jgugVlDg58wkLxC4JiY MvXjBPYOSdhSQ1C0lqASPTKkaN4tSistQiXSMTvaSizPSMktzEzBxdQwNjvdzU4uLE9NScxKR iveT83E2MwOCpZ2Bg3MH46rjfIUZJDiYlUd6V10IjhfiS8lMqMxKLM+KLSnNSiw8xynBwKEnw ereFRQoJFqWmp1akZeYAwxgmLcHBoyTCyw6S5i0uSMwtzkyHSJ1iNObYsHr9FyaOVxP+f2MSY snLz0uVEuf92wpUKgBSmlGaBzcIFl+XGGWlhHkZGRgYhHgKUotyM0tQ5V8xinMwKgnzuoAs5M nMK4Hb9wroFCagU4RnhICcUpKIkJJqYIw/XGWiuCqto7bBOaHk3yvz+6Hx+as1g39NPrw7mv/ sYw2Dw1ydK5hPRlov0motlZe4xch46dLpqq6qe7mu2sVph2deymg5Nblh/Q4PFzHe5fNFf/Se 2++6SLpnm8rkkwf4ZJcwZV/+tjLiL2u4tW3h58/nT/2anFV3KzW7b/nlX8d9p1XZmiuxFGckG moxFxUnAgB4T617qgIAAA== X-Env-Sender: prvs=347159f46=wei.liu2@citrix.com X-Msg-Ref: server-6.tower-31.messagelabs.com!1498842979!64851827!4 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.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 60846 invoked from network); 30 Jun 2017 17:16:27 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-6.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 30 Jun 2017 17:16:27 -0000 X-IronPort-AV: E=Sophos;i="5.40,287,1496102400"; d="scan'208";a="438497298" From: Wei Liu To: Xen-devel Date: Fri, 30 Jun 2017 18:01:21 +0100 Message-ID: <20170630170126.4148-14-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 13/18] x86/smpboot.c: 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/smpboot.c | 5 +++-- xen/arch/x86/time.c | 2 +- xen/include/asm-x86/time.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index f375eb682d..8d91f6ca01 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -106,7 +106,7 @@ static void smp_store_cpu_info(int id) * TSC's upper 32 bits can't be written in earlier CPUs (before * Prescott), there is no way to resync one AP against BP. */ -bool_t disable_tsc_sync; +bool disable_tsc_sync; static atomic_t tsc_count; static uint64_t tsc_value; @@ -975,7 +975,8 @@ int cpu_add(uint32_t apic_id, uint32_t acpi_id, uint32_t pxm) /* Physically added CPUs do not have synchronised TSC. */ if ( boot_cpu_has(X86_FEATURE_TSC_RELIABLE) ) { - static bool_t once_only; + static bool once_only; + if ( !test_and_set_bool(once_only) ) printk(XENLOG_WARNING " ** New physical CPU %u may have skewed TSC and hence " diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 780baa55a3..b988b94d2e 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1568,7 +1568,7 @@ static void __init tsc_check_writability(void) cpuidle_disable_deep_cstate(); /* synchronize_tsc_slave() must do nothing */ - disable_tsc_sync = 1; + disable_tsc_sync = true; } static void __init reset_percpu_time(void *unused) diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h index ef989a69b3..046302ef19 100644 --- a/xen/include/asm-x86/time.h +++ b/xen/include/asm-x86/time.h @@ -24,7 +24,7 @@ typedef u64 cycles_t; -extern bool_t disable_tsc_sync; +extern bool disable_tsc_sync; static inline cycles_t get_cycles(void) {