Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1871626pxa; Mon, 3 Aug 2020 00:57:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPc0q6orYD4xDbRF8u9ogrsnzcOV4JRRIRwYM1gUR5xuuqHZ0hRBTtTStJHSwQBeApupEk X-Received: by 2002:a17:906:e50:: with SMTP id q16mr3980146eji.155.1596441468213; Mon, 03 Aug 2020 00:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596441468; cv=none; d=google.com; s=arc-20160816; b=HbiuiB36G5wqMrwoKMtkDyQtKiB71HwHQENubp7u8sdQdQGv+NJaU2KTc7ek0jfOz1 P3ZFW4nggNn6Y5UcQZlinhfuaTXo1lYO+cjSG14Ojvjurr3ho56aQlbLBvMaRXY6DE91 XI1Fc/NQgliLgQe1l4svftJugdB/B/YLKrqEQV4Samvo0bRMTtZ26tBkSqaXhkcmqiNX idjmenxlXOl9SMZDZaqbjFfOhXz/k/lofx9P6ig3/FxQEHR6hYAcP/Tz69ItFksfOoyu D5acih0ZEMY8qwCKIlxD19PKCBDmJe55A6byipOZQqX0do1LsQ3wVHtqd36GlckXf0sP QrQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=NPpRxpMKSVRaG21iZmqm9Dmo79fUCuoBzhFMavOM5Vk=; b=B5SzCxmTac4rL+3rV9YKO9+hvFIAnFL4oVG/Jo5KFAUvVDsrhWcmy06wge1VaaE7Ai OkIc3i3NoGupUx784u8TdSSiUE/qSbedd5YlDlvUWynaqb7WXZYko4nD9WVvbmZ6pvhH 5dp6jB7N7WHUMhWQyCbqtTHr5b+ut5q0HyhPYMeHbYNhuP7cOeXfMxHmU6tdgFgE7+u0 wtQCR+vCY310F45obar4X979v711mWDC1lR2KaEsyQPa4huaLa8lS7YWHNWDE30475DN hsK/Uxkxrk08XRKufhb+YoV1fTg4d+jGY0aVB32Q6IMKTJVBWyikQuhg4EUzm4G1LF07 iU7A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m23si5161790edq.564.2020.08.03.00.57.25; Mon, 03 Aug 2020 00:57:48 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725884AbgHCH5U (ORCPT + 99 others); Mon, 3 Aug 2020 03:57:20 -0400 Received: from mga11.intel.com ([192.55.52.93]:57296 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbgHCH5T (ORCPT ); Mon, 3 Aug 2020 03:57:19 -0400 IronPort-SDR: uv1LacBmTNYdKe4aHvKxVA5aRFRAFwGnspnqR+P7qDwDltt/O/LVJhu+YZGqlAc557pUF3zhcg CqRRMWfmmXdw== X-IronPort-AV: E=McAfee;i="6000,8403,9701"; a="149860482" X-IronPort-AV: E=Sophos;i="5.75,429,1589266800"; d="scan'208";a="149860482" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2020 00:57:19 -0700 IronPort-SDR: UofXxyXTJjPFG6h3gnRb6Y63QeecTBqZy7k53xZisVLBiJMHcEq02Ky6icbFcRx0vbSSmPz3bA GA1cWQzrvp5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,429,1589266800"; d="scan'208";a="314579642" Received: from sgsxdev003.isng.intel.com (HELO localhost) ([10.226.88.14]) by fmsmga004.fm.intel.com with ESMTP; 03 Aug 2020 00:57:16 -0700 From: Dilip Kota To: x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, rahul.tanwar@linux.intel.com Cc: tony.luck@intel.com, hdegoede@redhat.com, linux-kernel@vger.kernel.org, andy@infradead.org, cheol.yong.kim@intel.com, chuanhua.lei@linux.intel.com, qi-ming.wu@intel.com, Dilip Kota Subject: [PATCH v3 1/1] x86/tsr: Fix tsc frequency enumeration failure on Lightning Mountain SoC Date: Mon, 3 Aug 2020 15:56:36 +0800 Message-Id: <211c643ae217604b46cbec43a2c0423946dc7d2d.1596440057.git.eswara.kota@linux.intel.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Frequency descriptor of Lightning Mountain SoC doesn't have all the frequency entries so resulting in the below failure causing kernel hang. [ 0.000000] Error MSR_FSB_FREQ index 15 is unknown [ 0.000000] tsc: Fast TSC calibration failed So, add all the frequency entries in the Lightning Mountain SoC frequency descriptor. Fixes: 0cc5359d8fd45 ("x86/cpu: Update init data for new Airmont CPU model") Fixes: 812c2d7506fd ("x86/tsc_msr: Use named struct initializers") Signed-off-by: Dilip Kota Reviewed-by: Andy Shevchenko --- Changes on v3: Fix the nit pick pointed by Andy Add Reviewed-by: Andy Shevchenko Changes on v2: Add description in the comments explaining about frequency entries. arch/x86/kernel/tsc_msr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/tsc_msr.c b/arch/x86/kernel/tsc_msr.c index 4fec6f3a1858b2..a654a9b4b77c07 100644 --- a/arch/x86/kernel/tsc_msr.c +++ b/arch/x86/kernel/tsc_msr.c @@ -133,10 +133,15 @@ static const struct freq_desc freq_desc_ann = { .mask = 0x0f, }; -/* 24 MHz crystal? : 24 * 13 / 4 = 78 MHz */ +/* + * 24 MHz crystal? : 24 * 13 / 4 = 78 MHz + * Frequency step for Lightning Mountain SoC is fixed to 78 MHz, + * so all the frequency entries are 78000. + */ static const struct freq_desc freq_desc_lgm = { .use_msr_plat = true, - .freqs = { 78000, 78000, 78000, 78000, 78000, 78000, 78000, 78000 }, + .freqs = { 78000, 78000, 78000, 78000, 78000, 78000, 78000, 78000, + 78000, 78000, 78000, 78000, 78000, 78000, 78000, 78000 }, .mask = 0x0f, }; -- 2.11.0