Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C54F9C05027 for ; Mon, 20 Feb 2023 17:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232414AbjBTR0X (ORCPT ); Mon, 20 Feb 2023 12:26:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230428AbjBTR0V (ORCPT ); Mon, 20 Feb 2023 12:26:21 -0500 X-Greylist: delayed 552 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 20 Feb 2023 09:26:20 PST Received: from grey.apple.relay.mailchannels.net (grey.apple.relay.mailchannels.net [23.83.208.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C066E1B571 for ; Mon, 20 Feb 2023 09:26:20 -0800 (PST) X-Sender-Id: dreamhost|x-authsender|kjlx@templeofstupid.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1D49D260C8A for ; Mon, 20 Feb 2023 17:17:08 +0000 (UTC) Received: from pdx1-sub0-mail-a306.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AFC1026103D for ; Mon, 20 Feb 2023 17:17:07 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1676913427; a=rsa-sha256; cv=none; b=4tFhZErNiFWlGTFekGbGESBLT7P5i0m0v8Yg+qA/+1JCx+qV53V5Q/WOAmlY4h45ZEedHY z28HRpitKQ/eQzgyGgynjk9TwhceYCogfUf/gN1nK/7U2WNluIyXRqrmDbniLBd7tVXEEo +V+vcFYMsY3VAxhlM6Q4DsC1mQAyn5I1mDSz3muVIycTT2eo6lSa9MuWW3So3kmzj7AyuR fMr7wLn/S0Xd//X9NSQe8/hPwrnWABNXB5OCQmv4q5A+akQRd32i/Gt3aC0Vk0oEDAZCCJ BXfJP3K9sCHiWSLPIHFDk7D0X/wvVhQKcmNFj1MfeuNdRPv7EAyP6JZha59O4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1676913427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1W/yHp+digs/9tQmrEdxtc9OFifUEYrTHbBFllZM5ek=; b=xXhwV7WREpCzUtRekSSszUEhNEH8mNVx9p8d4UqZi6lSomM0CHU90E5GCYjT5USai1LTlY FlcdJ9ox1Q9KJ2dbOFFj5ibWpfY2u6lNx6dwjwEqI2unAZ+ixhDU/DnOGLiqxaGmrxKFGV nRLbLKCHHLQ80pCdmqU1JSPRo0dYURW94VQiDpwuIozof6+lqFXymaEStikr4V0tLPjSPN 3g46RfhYaicQAIXzz12y0gjuA3IkNZk2GkmqBckrNArxcos8yHZMWc0VvjiJL8QHOR92PR NgQV91jHedkYBgzUrLUnuxwxykt5gQHcEYVC2DYA1RnCXvzezoQcpOIIhPYEOQ== ARC-Authentication-Results: i=1; rspamd-5db48964c-747s9; auth=pass smtp.auth=dreamhost smtp.mailfrom=kjlx@templeofstupid.com X-Sender-Id: dreamhost|x-authsender|kjlx@templeofstupid.com X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|kjlx@templeofstupid.com X-MailChannels-Auth-Id: dreamhost X-Thoughtful-Language: 08d1ebd151a45756_1676913427950_2233105593 X-MC-Loop-Signature: 1676913427950:1356471465 X-MC-Ingress-Time: 1676913427950 Received: from pdx1-sub0-mail-a306.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.103.24.47 (trex/6.7.1); Mon, 20 Feb 2023 17:17:07 +0000 Received: from kmjvbox (c-76-102-200-71.hsd1.ca.comcast.net [76.102.200.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kjlx@templeofstupid.com) by pdx1-sub0-mail-a306.dreamhost.com (Postfix) with ESMTPSA id 4PL8H72W92zK1 for ; Mon, 20 Feb 2023 09:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=templeofstupid.com; s=dreamhost; t=1676913427; bh=1W/yHp+digs/9tQmrEdxtc9OFifUEYrTHbBFllZM5ek=; h=Date:From:To:Cc:Subject:Content-Type; b=a6HhWuyIXd0r+Vbw2w11XEvcD5cd0lSYKKKcGgBv9WMcNKr0xU/PwnGY3RisHuanu nO0Men7S+hQu294AFT/WV2/RZR+ETeG8TVe/k+G3t/s+lGrQrkD5mJbGKmBfI6kOKI O6Op+1gN+DNAMZ58+1C+eo/z1tK2zF6BKG2tEjyo= Received: from johansen (uid 1000) (envelope-from kjlx@templeofstupid.com) id e0067 by kmjvbox (DragonFly Mail Agent v0.12); Mon, 20 Feb 2023 09:17:04 -0800 Date: Mon, 20 Feb 2023 09:17:04 -0800 From: Krister Johansen To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Cc: Juergen Gross , Jan Beulich , Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Marcelo Tosatti , Anthony Liguori , David Reaver , Brendan Gregg Subject: [PATCH linux-next 2/2] x86/xen/time: cleanup xen_tsc_safe_clocksource Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Modifies xen_tsc_safe_clocksource() to use newly defined constants from arch/x86/include/asm/xen/cpuid.h. This replaces a numeric value with XEN_CPUID_TSC_MODE_NEVER_EMULATE, and deletes a comment that is now self explanatory. There should be no change in the function's behavior. Signed-off-by: Krister Johansen --- arch/x86/xen/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 95140609c8a8..cf6dd9f9fa6a 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -495,8 +496,7 @@ static int __init xen_tsc_safe_clocksource(void) /* Leaf 4, sub-leaf 0 (0x40000x03) */ cpuid_count(xen_cpuid_base() + 3, 0, &eax, &ebx, &ecx, &edx); - /* tsc_mode = no_emulate (2) */ - if (ebx != 2) + if (ebx != XEN_CPUID_TSC_MODE_NEVER_EMULATE) return 0; return 1; -- 2.25.1