Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2213408imm; Thu, 19 Jul 2018 15:33:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcb64uhMFO8aHG6iSxBamMOm5QrgB9qP5HXBYuzqXnmteKdv/AsRFF0ba+dXmdeD4WAt1L8 X-Received: by 2002:a62:b917:: with SMTP id z23-v6mr11368902pfe.131.1532039634324; Thu, 19 Jul 2018 15:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532039634; cv=none; d=google.com; s=arc-20160816; b=g2lqczdaMniqtVaO0PhT4NwlGUEUl602xQVXkmXQGo0veGqFDY8WaQNS5uiM4Yu4ML 66V75o0sw2lQvf0JHj97CVDmME0J0VjQqMZPhoFdGpSPrrSKFF9SEEyAd1PDlt4EHYdF 3ljJrxENxHqpiHoAJJ91Uo47cmMaP7fKhXmm/PDnovmLmS59iJ4FkNniuOA0RLRzh0va 8IPYfvuURhjaNW5jmT7rOR9aTNUxbZZnP1wLTnK8pLuS/gTZHQNmr/QSRTUqJnAhjLk1 TqLdBmAAn9XwzgM1q8sRXtQHw75XERPbdE9ZJijhpW/ucm3YPgIrgk2ahTYBk6kN/Uod idgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=tE1wccl3UnYwm74r9DzApndPSTyUX3Q3ARR0C+TKRuM=; b=XMyqtAPlW75kUbTR2sr6faTafaWW0gldW0FS5/LasicMQzDEKh/ktjjwKEbYWdKS+C FSRtA60kMhH5wPgCkWUNs4sThERlOggH1a8avyxTCmtNODN+hBRxUUsJ4mayLoWcZ6BO hzjIUT4NzSdUyzkSsrzN/ddbnQZ/PIN/NgSpCUTLSj2uI656sXBsLbb1gbvCk3xAd8Wd RnXfglTp9eEgpwzuGp+H8oaAnk2LZYwHM4j1AI+UU5/7qw6N9o9ECH2s4hqVuvSO/h+M dYGIpw22PgTCXV6LIlt25PnxLWp63GcxYCzF9E9YKSJ2M1dr2gT4/jwrHQijqJ4B04He vFqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r28-v6si291307pfb.65.2018.07.19.15.33.39; Thu, 19 Jul 2018 15:33:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731361AbeGSXRe (ORCPT + 99 others); Thu, 19 Jul 2018 19:17:34 -0400 Received: from terminus.zytor.com ([198.137.202.136]:36535 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730369AbeGSXRe (ORCPT ); Thu, 19 Jul 2018 19:17:34 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w6JMWILh2439619 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 19 Jul 2018 15:32:18 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w6JMWIHf2439616; Thu, 19 Jul 2018 15:32:18 -0700 Date: Thu, 19 Jul 2018 15:32:18 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Pavel Tatashin Message-ID: Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, pasha.tatashin@oracle.com, hpa@zytor.com Reply-To: pasha.tatashin@oracle.com, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <20180719205545.16512-22-pasha.tatashin@oracle.com> References: <20180719205545.16512-22-pasha.tatashin@oracle.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/timers] x86/tsc: Use TSC as sched clock early Git-Commit-ID: 4763f03d3d186ce8a1125844790152d76804ad60 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 4763f03d3d186ce8a1125844790152d76804ad60 Gitweb: https://git.kernel.org/tip/4763f03d3d186ce8a1125844790152d76804ad60 Author: Pavel Tatashin AuthorDate: Thu, 19 Jul 2018 16:55:40 -0400 Committer: Thomas Gleixner CommitDate: Fri, 20 Jul 2018 00:02:42 +0200 x86/tsc: Use TSC as sched clock early All prerequesites for enabling TSC as sched clock early in the boot process are available now: - Early attempt of TSC calibration - Early availablity of static branch patching If TSC frequency can be established in the early calibration, enable the static key which switches sched clock to use TSC. [ tglx: Massaged changelog ] Signed-off-by: Pavel Tatashin Signed-off-by: Thomas Gleixner Cc: steven.sistare@oracle.com Cc: daniel.m.jordan@oracle.com Cc: linux@armlinux.org.uk Cc: schwidefsky@de.ibm.com Cc: heiko.carstens@de.ibm.com Cc: john.stultz@linaro.org Cc: sboyd@codeaurora.org Cc: hpa@zytor.com Cc: douly.fnst@cn.fujitsu.com Cc: peterz@infradead.org Cc: prarit@redhat.com Cc: feng.tang@intel.com Cc: pmladek@suse.com Cc: gnomes@lxorguk.ukuu.org.uk Cc: linux-s390@vger.kernel.org Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: pbonzini@redhat.com Link: https://lkml.kernel.org/r/20180719205545.16512-22-pasha.tatashin@oracle.com --- arch/x86/kernel/tsc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 7ea0718a4c75..9277ae9b68b3 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -1408,6 +1408,7 @@ void __init tsc_early_init(void) /* Sanitize TSC ADJUST before cyc2ns gets initialized */ tsc_store_and_check_tsc_adjust(true); cyc2ns_init_boot_cpu(); + static_branch_enable(&__use_tsc); } void __init tsc_init(void)