Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2018384imm; Thu, 19 Jul 2018 11:39:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpde02jOmgbzaamYzSwK931A07nRPpHM9fMM8G/dN5HlyGIDt3KbNZ0lLZWPyPB2LX5K4KSv X-Received: by 2002:a63:d244:: with SMTP id t4-v6mr1602635pgi.335.1532025579471; Thu, 19 Jul 2018 11:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532025579; cv=none; d=google.com; s=arc-20160816; b=FeizW7f32bog9VODe9qSlokkUy2DPsxMiRe/pOdbQxn6QWKPhUkTXbBTv3krR5oBHL sXsJ6eXstns93vO8Na/WunYDcDnr2RLUd3s5E25c7dn5B1rWupiQlW5wgI93ilpMl6D7 Vk8iGyFWKb1hgbJUSsd/ISPW+qewXxnROWIjGy49KcySr9WtB6fB393cunxfMTq9jYZo QWwwQF7420QSnLouwLbU85DL6gKDe9aWwdX3L/xYJUbQkZOUS7HK+AK/i+TO6bzoyDaI nQrsbGJsa/jgDfaMnxwJz2oCsH+7t5nCfD26FGjvUUCO0Apl+R0ogULfPaJx6jixr7XH LelQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=87VTLnUIlx6TAiR23fp4/8KHP1Y+ZidcrJZDxikoaBA=; b=cQ/UlavmzISHHzjrqJWa5q4daX19+dNeMjWTn3FkHCzl0M62brF9SUKXWEYzL+ITEX jG5ep1AeB2QnZ3oPw0LMQcjFPHEWiVKMA9hmxWfiPw5HSs12lyz3F1YyuJm1Xj3TA8De 70NFtIwIGaD1O2+DRCt79maowA+IMkZKLDtbLyiVjEvwn6nGkhNHkLes+fMwuC/DXYIv f4nyH9RnXFTd37oL8TzC33g2ClO0gB8WSor110V284+kCXcEceqDla3yJp0pozxqqMw/ 2C2cBxNWAJHSQO++sEMbJdspuwBjkQwGzTRq1FYMC1sBMvsC4B5W0yNfVbG/qXYOBszR Jhdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=VDxCgBlu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7-v6si5559094pln.145.2018.07.19.11.39.24; Thu, 19 Jul 2018 11:39:39 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=VDxCgBlu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732137AbeGSTXO (ORCPT + 99 others); Thu, 19 Jul 2018 15:23:14 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:51312 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731839AbeGSTXO (ORCPT ); Thu, 19 Jul 2018 15:23:14 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6JIcn5F052141; Thu, 19 Jul 2018 18:38:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2018-07-02; bh=87VTLnUIlx6TAiR23fp4/8KHP1Y+ZidcrJZDxikoaBA=; b=VDxCgBluaZnuToldJWmYaEx5/4oXho27OAwRtRoPHRgkauBWqDnbjif3WRIW4rr1rPUq 7qjxWH2oVyCR3hyrHy0CZGRTP1o60cPndd4ItFFCqMewauB8N/sPp9WTkODKM/83Gs2Y tMnVa0wX+jxgNVhEXxaJwLTHXLWymuoUB5yLiHdZ4CxrEIoOw00N0855DlQhcBXhgeK5 V0xh5PgrrHB4Jg9z+UtiSjy25YiIgPUvFPRnptzzxCn1rsCRbTPNBXTHeG/1dYmkCHRz NP6S8vKQauumJHIIO6kyTAkKlFgT7Jzd57CLspafqPKITpGBe18BMHLGjILLtpYH4z5T FQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2k9yjx8cfc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 18:38:48 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w6JIckIu028445 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 18:38:46 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6JIckeI020950; Thu, 19 Jul 2018 18:38:46 GMT Received: from mail-oi0-f49.google.com (/209.85.218.49) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Jul 2018 11:38:46 -0700 Received: by mail-oi0-f49.google.com with SMTP id n84-v6so16784048oib.9; Thu, 19 Jul 2018 11:38:46 -0700 (PDT) X-Gm-Message-State: AOUpUlGsLedVYyqoneFj0T/Cny1zRwVS27KPStsoZofQ/7W72kBh8eWs YHHFlgKKc+/CnIPTtkHlPL4qOa1FovF0u8KATrc= X-Received: by 2002:aca:edc1:: with SMTP id l184-v6mr11184837oih.65.1532025525817; Thu, 19 Jul 2018 11:38:45 -0700 (PDT) MIME-Version: 1.0 References: <20180718022211.6259-1-pasha.tatashin@oracle.com> <20180718022211.6259-21-pasha.tatashin@oracle.com> <20180719103340.GA2494@hirez.programming.kicks-ass.net> <4295075b-8a0f-1723-2e80-1bbd2f038846@oracle.com> In-Reply-To: From: Pavel Tatashin Date: Thu, 19 Jul 2018 14:38:09 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v14 20/25] x86/tsc: calibrate tsc only once To: tglx@linutronix.de Cc: peterz@infradead.org, Steven Sistare , Daniel Jordan , linux@armlinux.org.uk, schwidefsky@de.ibm.com, Heiko Carstens , John Stultz , sboyd@codeaurora.org, x86@kernel.org, LKML , mingo@redhat.com, hpa@zytor.com, douly.fnst@cn.fujitsu.com, prarit@redhat.com, feng.tang@intel.com, Petr Mladek , gnomes@lxorguk.ukuu.org.uk, linux-s390@vger.kernel.org, boris.ostrovsky@oracle.com, jgross@suse.com, pbonzini@redhat.com Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8959 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=659 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807190195 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 12:49 PM Pavel Tatashin wrote: > > > So create two functions. native_...early..() and native....(). The early > > one does not contain the hpet/pmtimer stuff and it replaces the ops.pointer > > with the late one which contains all of it. > > Good idea. Actually, the late one will contain only hpet/pmtimer and I > will set it only if tsc frequency was not determined only. If we determined tsc early in boot using one of the quick methods: from cpuid/msr/quick_pit, can we assume that frequencies of all other CPUs will be determined the same way? Or do we still have to fallback to PIT/HPET/PMTIMER? I wondering if we support heterogeneous multi-socket platforms with different CPUs, because that the only platforms where I see such scenario is possible. Thank you, Pavel