Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3248192imm; Sun, 13 May 2018 07:19:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqA/iLxsg+UYdylfhExNVJ9kRVa9iHMTVE/DGU0W972ab/k4GsTqfOVsUBUqb9E+rR27ISc X-Received: by 2002:a62:11dc:: with SMTP id 89-v6mr6765456pfr.18.1526221199254; Sun, 13 May 2018 07:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526221199; cv=none; d=google.com; s=arc-20160816; b=YVDyyDxCji+hkVKLCnCtqQ2g/p70Ys0xWUJ2sMc7PTvf+KNfMDChYcRdXihVNApbNr 0onIEQCjpf1QlUgVNSBImKkQTFUjUg6GqzjCuOcDdghqkJ/uvNXgZrWYKtsmFRmvDnuh tGAQWQM5MsfayTVfUEZ2Sy8pnV4W0pCdIfLS9b9Gi4wt3QWyxZhdvSwhQNq/fzmYypPy YkG1G+FOfThiNCqWhSN/mEaaBfv3VNEG3pqZHMKqg9sxIv7hqMCBwJLSmpUNnh/I/r5w 5MmLAz6bEDj360XxXBJ9Z7xG6lDmEq90inQobkKgbd38SnsBTrfqnOj8duJx7a+oDwno 609g== 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=jYfLAbWr3ZG3vBi+uJxGFkpYfYLvZTQMdnbu8zrqdlI=; b=ZgoVekjvj+5rW9ZrYdRb9E+yEt5OQ14TJzmAp0nvob76iTiM1MXNOS9cVyzhrFZeGq Qcd3yQpYqE6+N5GWT2lWfdbkKKtYpNIeIoo7Qn8PhHzoaZYWdv2eQRb611Pt8ygdUV3S xCYmYDE4/INExaMYQIIbN3PIZGVvnckrnwA/MUeLQGc/bBkLNDKtFnWLDgRqbupjKLbh cC+zu3AWbyZof0Sm3JG31DWGb6l6hXa212eRbcANuu1uZIqcryqBGiDfpHlLef5yTMhi 5A/bObLt3tnPMDGjMxkDtKce4EEZYH5GXfVh/2LNVyHjUVPQTnR9/o23YkEzy+jEFsp1 kyIA== 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 a189-v6si6000490pgc.296.2018.05.13.07.19.44; Sun, 13 May 2018 07:19:59 -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 S1751870AbeEMOTY (ORCPT + 99 others); Sun, 13 May 2018 10:19:24 -0400 Received: from terminus.zytor.com ([198.137.202.136]:36949 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751468AbeEMOTX (ORCPT ); Sun, 13 May 2018 10:19:23 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w4DEJIEo367345 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 13 May 2018 07:19:18 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w4DEJIka367342; Sun, 13 May 2018 07:19:18 -0700 Date: Sun, 13 May 2018 07:19:18 -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: tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, davidwang@zhaoxin.com, mingo@kernel.org Reply-To: tglx@linutronix.de, hpa@zytor.com, davidwang@zhaoxin.com, mingo@kernel.org, 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: a2aa578fec8c29436bce5e6c15e1e31729d539a3 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: a2aa578fec8c29436bce5e6c15e1e31729d539a3 Gitweb: https://git.kernel.org/tip/a2aa578fec8c29436bce5e6c15e1e31729d539a3 Author: David Wang AuthorDate: Thu, 3 May 2018 10:32:46 +0800 Committer: Thomas Gleixner CommitDate: Sun, 13 May 2018 16:14:24 +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);