Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1650510ybk; Mon, 11 May 2020 00:40:45 -0700 (PDT) X-Google-Smtp-Source: APiQypIcA3YZMBZEG3nZRq8pMwSWSGxfRHMJ6u/4xPTclV6mYWIJnqcJ6wem7ataZ4NLdn1EE0yj X-Received: by 2002:a17:906:5e41:: with SMTP id b1mr11632961eju.278.1589182845470; Mon, 11 May 2020 00:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589182845; cv=none; d=google.com; s=arc-20160816; b=jNPP0UB1Ox10MoW7q1Yqn37Ly6XVIS4TLbVy6Wev/vxf8utA6BKCTHhZXXUQJBXRwX AJ3HMfeSajcOJxBacBoe28SdWFoMt5CWmpxv9EV2pBeq1As66QzHZMu102CbMP0pFz5n GsSGsnjZ9r2CJJKuorlrz0C8MwLyknSYqwa8xqPAsAvKzqpsCfzlQYHkC4rId9ffKPIi yER2pKMeuw/lnmYaiAxB9Cll2J5NmF7XqniBcgrNENhX4KqttVtKUncCSUhexTGSNayc HBwmpwygs8stdpHL/kkPqhS9VUty3fS6GNeWXf5/8ZA4IK7cf1l/kcyU5EKJBNf3teEQ e8xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ESpfFlq/pcO4MRkHdl+PN/p5oDuZdG5gR/E8hYQ+dmE=; b=snb1BflOyUjv5wR3Rb8cYa1p70ttRcpPQ9qu8AqNqbyfCJI9MDdvsRVUFoLbhCiaK8 LHGHXtHaA3vF/wcAEZJ3BCM5Targ7wnNjgvYohkzNn/OyMes1i9Xm3YPNJBRgQNzBvp3 rj44F6Yed+33hTiyBgC7b/plOBN/46IFSTPoZRCaF/pSE4mJWl49Uv+JoLEFRdrUVCar OxgoB7eqJidsQmVD017OaNwziqIT6LEkTZDxXxDueRwhOkN777Rf303y7wC4PQsEJ2jq DbysJw2qqOcDuLg+T5hneYP3NtkpN/wu1Fmblj92NFlpqvSVLggEVokNFfd9+SdV0dRB /2VA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v23si2730488ejw.62.2020.05.11.00.40.21; Mon, 11 May 2020 00:40:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725916AbgEKHim (ORCPT + 99 others); Mon, 11 May 2020 03:38:42 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:51535 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728638AbgEKHii (ORCPT ); Mon, 11 May 2020 03:38:38 -0400 Received: from [192.168.0.3] (ip5f5af07e.dynamic.kabel-deutschland.de [95.90.240.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 350442002EE14; Mon, 11 May 2020 09:38:35 +0200 (CEST) Subject: Re: [PATCH] x86/tsc: Use hard-coded crystal clock for Skylake mobile To: Thomas Gleixner , x86@kernel.org Cc: Radoslaw Biernacki , Ross Zwisler , Daniel Drake , Andy Lutomirski , Borislav Petkov , "H . Peter Anvin" , Peter Zijlstra , Len Brown , linux@endlessm.com, "Rafael J . Wysocki" , Thorsten Leemhuis , LKML References: <20200509113717.9084-1-pmenzel@molgen.mpg.de> <87eerr3ppb.fsf@nanos.tec.linutronix.de> From: Paul Menzel Message-ID: Date: Mon, 11 May 2020 09:38:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87eerr3ppb.fsf@nanos.tec.linutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Thomas, Thank you for the quick reply. Am 11.05.20 um 09:17 schrieb Thomas Gleixner: > Paul Menzel writes: > > please send patches to LKML and not offlist. Sorry about that. From `MAINTAINERS` I thought x86@kernel.org is wanted. Other subsystems list LKML explicitly there. >> From: Radoslaw Biernacki >> >> @@ -636,10 +636,24 @@ unsigned long native_calibrate_tsc(void) >> * Denverton SoCs don't report crystal clock, and also don't support >> * CPUID.0x16 for the calculation below, so hardcode the 25MHz crystal >> * clock. >> + * Also estimation code is not reliable and gives 1.5% difference for >> + * tsc/clock ratio on Skylake mobile. Therefore below is a hardcoded >> + * crystal frequency for Skylake which was removed by upstream commit >> + * "x86/tsc: Use CPUID.0x16 to calculate missing crystal frequency" >> + * This is temporary workaround for bugs: >> + * b/148108096, b/154283905, b/146787525, b/153400677, b/148178929 >> + * chromium/1031054 >> */ >> - if (crystal_khz == 0 && >> - boot_cpu_data.x86_model == INTEL_FAM6_ATOM_GOLDMONT_D) >> - crystal_khz = 25000; >> + if (crystal_khz == 0) { >> + switch (boot_cpu_data.x86_model) { >> + case INTEL_FAM6_SKYLAKE_MOBILE: >> + crystal_khz = 24000; /* 24.0 MHz */ >> + break; >> + case INTEL_FAM6_ATOM_GOLDMONT_X: >> + crystal_khz = 25000; /* 25.0 MHz */ >> + break; >> + } > > Aside of being a workaround for Google issues which are probably caused > by broken BIOSes Even if it was caused by broken firmware, wouldn’t Linux’ no regression policy still consider this a regression as user should be able to the Linux kernel “no matter what”? > that patch is broken. > > INTEL_FAM6_ATOM_GOLDMONT_D != INTEL_FAM6_ATOM_GOLDMONT_X Good catch. The commit didn’t apply cleanly to the master branch, and I missed this. I’ll wait for Radoslaw to comment before proceeding further with this. Kind regards, Paul