Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3132317imm; Sun, 13 May 2018 05:03:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoK9fkgrkVN1UYaoDpMX3+RVV2u1i9TgZQ4nILkgxQYfJUAMZDnUFyv/7/8E0mV5mOlraB1 X-Received: by 2002:a63:7c43:: with SMTP id l3-v6mr5366370pgn.0.1526212985326; Sun, 13 May 2018 05:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526212985; cv=none; d=google.com; s=arc-20160816; b=J1wGDo7BirH4GCI2+3ojCynAaQRD85opeIsqgEtjZ9y9Fo/WaKKqJMBD1yhb5Ig4Vf oKII77XYmID9UBsyHUy+V73qA/G12VipBQgNHBeqVul3QYrei2bbnA6J4urdJVCv5kVG u/3cy83BbChChTtSDclHvD/8aaIBlbTvnl3Za8LNO97KyXbjuA+6jgs1Qp7p3u8olzXY diwu3rOFCcESfFhsN/+D1rJgi1dej347pEJkO7qZKz4RMrg3QOOnpfjC5Ez/fWJBOOlh CQ9nVpI596zvgpkyWkylUUNWIIjXwXfBPkR7QTuqlZm/lL0L626KSp0VI+nw87bOpUK8 AYKA== 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=Xm3VY9lNeSw6ECVgA125TaXAUlR6HNUoV2WGB1/CjnE=; b=v7IuDPxEDDn05KO4Qe+3QcTzQvWOQzcO5Pri/nKjWuuNE6c15ROOy82gnKt2krLh7x 2PLWxVgendEsC6/CWhJCQin6MX8PGkcsAEQrO0c4WQCnkuORnY/U4y4O9mJReFlxi6jC Z+FJm+h05oLHpzUo4dlfPh1e3W65elXsjFg0A5+ybCfJhitAxDVUmJ/LgsyiMg57EGNL P7ZdhguUUrwqiS7tzDH08ariqEh3dJNv9oqCXIMZofzqdK/YiUUTYJoxQRb95ipdHdqs 9c6fn5UoKscDK+7lVL75wfw8zyKE0HQI35TwwUHoDqIl92t1rZoc1h9DDOCTBJ1apsPB G0FA== 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 b63-v6si1943665plb.566.2018.05.13.05.02.51; Sun, 13 May 2018 05:03:05 -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 S1751850AbeEMMCa (ORCPT + 99 others); Sun, 13 May 2018 08:02:30 -0400 Received: from terminus.zytor.com ([198.137.202.136]:35027 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751247AbeEMMC3 (ORCPT ); Sun, 13 May 2018 08:02:29 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w4DC2OlW330269 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 13 May 2018 05:02:24 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w4DC2Nrq330266; Sun, 13 May 2018 05:02:23 -0700 Date: Sun, 13 May 2018 05:02:23 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for David Wang Message-ID: Cc: mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, davidwang@zhaoxin.com, hpa@zytor.com Reply-To: hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, davidwang@zhaoxin.com, linux-kernel@vger.kernel.org In-Reply-To: <1525314766-18910-4-git-send-email-davidwang@zhaoxin.com> References: <1525314766-18910-4-git-send-email-davidwang@zhaoxin.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cpu] x86/Centaur: Report correct CPU/cache topology Git-Commit-ID: 5a19009043fcffd1591b04a588d53336a66855d5 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, T_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: 5a19009043fcffd1591b04a588d53336a66855d5 Gitweb: https://git.kernel.org/tip/5a19009043fcffd1591b04a588d53336a66855d5 Author: David Wang AuthorDate: Thu, 3 May 2018 10:32:46 +0800 Committer: Thomas Gleixner CommitDate: Sun, 13 May 2018 12:06:13 +0200 x86/Centaur: Report correct CPU/cache topology Centaur CPUs enumerate the cache topology in the same way as Intel CPUs, but the function is unused so for. The Centaur init code also misses to initialize x86_info::max_cores, so the CPU topology can't be described correctly. Initialize x86_info::max_cores and invoke init_cacheinfo() to make CPU and cache topology information available and correct. Signed-off-by: David Wang Signed-off-by: Thomas Gleixner Cc: lukelin@viacpu.com Cc: qiyuanwang@zhaoxin.com Cc: gregkh@linuxfoundation.org Cc: brucechang@via-alliance.com Cc: timguo@zhaoxin.com Cc: cooperyan@zhaoxin.com Cc: hpa@zytor.com Cc: benjaminpan@viatech.com Link: https://lkml.kernel.org/r/1525314766-18910-4-git-send-email-davidwang@zhaoxin.com --- arch/x86/kernel/cpu/centaur.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c index 80d5110481ec..c265494234e6 100644 --- a/arch/x86/kernel/cpu/centaur.c +++ b/arch/x86/kernel/cpu/centaur.c @@ -160,6 +160,11 @@ static void init_centaur(struct cpuinfo_x86 *c) clear_cpu_cap(c, 0*32+31); #endif early_init_centaur(c); + init_intel_cacheinfo(c); + c->x86_max_cores = detect_num_cpu_cores(c); +#ifdef CONFIG_X86_32 + detect_ht(c); +#endif if (c->cpuid_level > 9) { unsigned int eax = cpuid_eax(10);