From patchwork Thu May 4 19:02:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 90193 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp513569rwl; Thu, 4 May 2023 12:07:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oQPc33C+ktDAbDZ/QP5dcTbSPHuWZvnfiZ9R3/kkCGutqZ9YjDE1Kq6DRxufMj7CSkGjd X-Received: by 2002:a05:6a20:6a0a:b0:ef:2389:66ca with SMTP id p10-20020a056a206a0a00b000ef238966camr4041711pzk.7.1683227247975; Thu, 04 May 2023 12:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683227247; cv=none; d=google.com; s=arc-20160816; b=elcEnw5XYLA2QEsbTYuG65lgBncOaICIiclhw1gQia7FP/1aaYLjYDxlbP2pYqSOCx Ip/GNmADy0Ev9VRhfZbJVmNe1Gp7T+v++IWNyjCnZKDqLaUcjzh77PQ1VCT29+wrBG4j Nw6EHmKRtjfBySknbFCYa4/DNpw9z3zFdQ9qE5fhgEw1L6feD8Bw7BERqsZHFnu3dvCU 6uAaVQTVcd8EMGIbsCzDjAlJVq8WQZiusK054xvJZmWiFVChJv+43CcCFuPTovA5Qk3L ek/h077yj1VjWj3bM7b0B4lN59dUpE/ttFoLKqQVexwJGHk1BjcoBzjcUd3nkLPSGqBc HbUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=dh/52GRhLbpp4gh50fAuvfQix7j7Ih1160L/CdLI8l0=; b=POS+Mey+XaLq7gXIoyvXr1sSDWWPdUdBMF+Ft6lb3zX3V8nCiPSxMePDUf4yXEeabs MCrbqnJTj1MfwJOGb0pwE2ziFLxikJDGDMj3yfO1zQfOtVqDnaKuiC5qd+v07lFAZPcR pc6B8fVyl1pu5kgNW5CCN3JMo9HdphAXjzurq/94uNl4Mtr9MUUwLquaHewJp0UZ1SmB ihyA0dyyN7ZNv3OB4u+NQx8t3seS+/vDzBVQCMN4+RAGrpn3azcP2zTNMPQfKtinuOQ3 XBv3mDf+aNEPQgSVUfOpAmTKhfAPe5Rk15F9j07YtrffAFpcGsc0e8XyVSXXTWCM0gHH +61A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=O6cG1HBe; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h185-20020a6383c2000000b0052c587d25e3si147116pge.151.2023.05.04.12.07.11; Thu, 04 May 2023 12:07:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=O6cG1HBe; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230470AbjEDTF7 (ORCPT + 99 others); Thu, 4 May 2023 15:05:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230434AbjEDTF2 (ORCPT ); Thu, 4 May 2023 15:05:28 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B11A8A5F; Thu, 4 May 2023 12:03:45 -0700 (PDT) Message-ID: <20230504185938.179661118@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683226974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=dh/52GRhLbpp4gh50fAuvfQix7j7Ih1160L/CdLI8l0=; b=O6cG1HBehiX74K9JFp369TIKx6mKBR2TPreNtZ0JIxAQi+1KIShpZOLr9yn98NyJ2DVeV2 KoRI+hkYEu5smHES9pGvnLyoWtwb4Bp/4BfVhvbHAfxZcdiWB7o0B0Ira+4IzxwLMlhRJ+ sMHMr6Be0jbWVJhRKWMRzaormlwxyZ+o2EofkewXORpIgLbjVpvUxjCQcSQl+YfTMlHZ9T UE8rmtHne4Y5TmubM7NIWK98QCHj+0F+rqBtOZSFGM77VBpgrVetzsILoS9DByN2vrAczS 5+Uo3R/A6vnceg12D8eqIMTFGAGJV6sRpxtSZ3hp8//m2IPi36uIIWtNhU3PLg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683226974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=dh/52GRhLbpp4gh50fAuvfQix7j7Ih1160L/CdLI8l0=; b=2Mr8xnCCJXQNYK40wYiyDitX1rtgKVSav9FlO5VPGJbI6wVmqI0M9y1M9rUGvQKL9tG1OS lphjzmGYwmWjK5CQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, David Woodhouse , Andrew Cooper , Brian Gerst , Arjan van de Veen , Paolo Bonzini , Paul McKenney , Tom Lendacky , Sean Christopherson , Oleksandr Natalenko , Paul Menzel , "Guilherme G. Piccoli" , Piotr Gorski , Usama Arif , Juergen Gross , Boris Ostrovsky , xen-devel@lists.xenproject.org, Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Guo Ren , linux-csky@vger.kernel.org, Thomas Bogendoerfer , linux-mips@vger.kernel.org, "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Mark Rutland , Sabin Rapan , "Michael Kelley (LINUX)" Subject: [patch V2 34/38] x86/cpu/amd; Invoke detect_extended_topology_early() on boot CPU References: <20230504185733.126511787@linutronix.de> MIME-Version: 1.0 Date: Thu, 4 May 2023 21:02:53 +0200 (CEST) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764991694602427798?= X-GMAIL-MSGID: =?utf-8?q?1764991694602427798?= From: Thomas Gleixner The early detection stores the extended topology leaf number which is required for parallel hotplug. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/cpu/amd.c | 2 ++ 1 file changed, 2 insertions(+) --- --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -692,6 +692,8 @@ static void early_init_amd(struct cpuinf } } + detect_extended_topology_early(c); + if (cpu_has(c, X86_FEATURE_TOPOEXT)) smp_num_siblings = ((cpuid_ebx(0x8000001e) >> 8) & 0xff) + 1; }