From patchwork Fri Oct 13 09:38:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 152457 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1768828vqb; Fri, 13 Oct 2023 02:39:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IED1Z8GZ1Pd0SE6jndktWtnP3UjgyKda7NeumzHk3MUaQ9OeM8gL/eRDob9moVWXxeR8Uzy X-Received: by 2002:a17:90b:3a8c:b0:27d:4d4d:3b19 with SMTP id om12-20020a17090b3a8c00b0027d4d4d3b19mr31980pjb.0.1697189968855; Fri, 13 Oct 2023 02:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697189968; cv=none; d=google.com; s=arc-20160816; b=cRKG2O2rkkB+p+KzuCD0c/Wym21MJqNjcvdWGpNn0EtrpuvTI36SNR/fa5bfyYFeoO R7s2vRpQr0btLQYKoBKP5pFRVgT0q1++OuzgSvMeQKFOmBQ7CYUUdG09H3msyaWgNiJ4 djVJtbR4CYSv9KU+zz2DRw/v15f0lvlC2mdClZZcd2Wtk2FclLUwCvZhlbt18AKtZL8j obg5ZQrOouvnpkzn475ffK+QyvgF0qyFaAmPVhGFxrqlNZwxWZI4vfKKa3YXroJ2gOpb RJ554sDBi7TJ9qCKie7vwKR/Y2Al6HcY76VpK2mDfFmWqneH7pjZH9wW9cw8taCjbbot m+yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=yiCRTOM5demFgKTmq9X6OyvEhW+xoW8NeDS5lAX1ZC8=; fh=0+UPLPNzUC2ByrAHKUZuTVx5U+vPcsu9FF72jvWmJM8=; b=iruLZpVjeTkKjEcD2q+3TOncLnQC83e772My3m4J9UepmoxXveTFrdsWLyhPz/t/hL 7/SG6snE6mCW/t/y9YBkbzUPwLQakllxWwPDGpN1vhMVjITZU7bBALl7cGEhmlHiuzAM eZHKObTuhfAtJWmk3qwND6Eu+XhPFUQZv//pvPR5Z/Z0YsKhBsbJ2KzBZA91Sixt/K8Z FHz+NwFlpjttRV3wz2lLZzJG5Dc1omMflWq5f8tIwZhRshmrbyW+JVlCa58fThPBBw4v zwT1dSPohm3RckIcPX7gbFs39v3bWFrsf/CCcxVlVc7crBO1MhCsYq8W1Seg6YY+bxQF nhDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=B4TxUZhF; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id 28-20020a17090a001c00b00274a5edad0csi4213501pja.139.2023.10.13.02.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 02:39:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=B4TxUZhF; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5A39A82276C9; Fri, 13 Oct 2023 02:39:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231338AbjJMJiv (ORCPT + 19 others); Fri, 13 Oct 2023 05:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231237AbjJMJiN (ORCPT ); Fri, 13 Oct 2023 05:38:13 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8A1ABE; Fri, 13 Oct 2023 02:38:10 -0700 (PDT) Date: Fri, 13 Oct 2023 09:38:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697189889; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yiCRTOM5demFgKTmq9X6OyvEhW+xoW8NeDS5lAX1ZC8=; b=B4TxUZhFgn3d8R9v0n23nZkl2xHSOF4MBY0JDIerWiZIqfkPoIrgVYgV56REH7dneMb9nD H0K3p/aO41YStXqJJlrWgOTovaPh9e0EMkM/elL9Ho9ATmLxPr0L7BpHQu3Uw7cf6ME/Kq TqqPcDA4FXZ0ibfT5LD0PayJkIEEFuY0+epISPiaOV/Lt0F1oHal/Ymjpt2OMB/wxJtM5F q6KaWQ4qKEGxwBZ+d8a9qLtkPunw3jJgOQyF4RNrc1QYtCYfWmvJ9We9LiSsyJZAe1z8NA FDL9zb2wgccAHzBw+qF+xxaMsoFznrorM4rWFUaJjTs4kNkOX8zDfahNkuDEfQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697189889; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yiCRTOM5demFgKTmq9X6OyvEhW+xoW8NeDS5lAX1ZC8=; b=Ftvag4werfWiJJYLXBUwH2mwr88lQ2ZBPXtZElVVY0w8/yWDu9KT4OoMvdq7iLo1XNhvtM tXGr6You9+UQ2DBw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/cpu: Remove pointless evaluation of x86_coreid_bits Cc: Thomas Gleixner , Juergen Gross , Sohil Mehta , Michael Kelley , "Peter Zijlstra (Intel)" , Zhang Rui , Arjan van de Ven , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230814085112.687588373@linutronix.de> References: <20230814085112.687588373@linutronix.de> MIME-Version: 1.0 Message-ID: <169718988888.3135.7116915738142139742.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 13 Oct 2023 02:39:21 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774202188475859229 X-GMAIL-MSGID: 1779632668628164848 The following commit has been merged into the x86/core branch of tip: Commit-ID: 594957d723a0674ca15bfefb755b3403624b8239 Gitweb: https://git.kernel.org/tip/594957d723a0674ca15bfefb755b3403624b8239 Author: Thomas Gleixner AuthorDate: Mon, 14 Aug 2023 10:18:36 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 10 Oct 2023 14:38:18 +02:00 x86/cpu: Remove pointless evaluation of x86_coreid_bits cpuinfo_x86::x86_coreid_bits is only used by the AMD numa topology code. No point in evaluating it on non AMD systems. No functional change. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Sohil Mehta Tested-by: Michael Kelley Tested-by: Peter Zijlstra (Intel) Tested-by: Zhang Rui Reviewed-by: Arjan van de Ven Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230814085112.687588373@linutronix.de --- arch/x86/kernel/cpu/intel.c | 13 ------------- arch/x86/kernel/cpu/zhaoxin.c | 14 -------------- 2 files changed, 27 deletions(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index be40456..55efadb 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -314,19 +314,6 @@ static void early_init_intel(struct cpuinfo_x86 *c) setup_clear_cpu_cap(X86_FEATURE_PGE); } - if (c->cpuid_level >= 0x00000001) { - u32 eax, ebx, ecx, edx; - - cpuid(0x00000001, &eax, &ebx, &ecx, &edx); - /* - * If HTT (EDX[28]) is set EBX[16:23] contain the number of - * apicids which are reserved per package. Store the resulting - * shift value for the package management code. - */ - if (edx & (1U << 28)) - c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff); - } - check_memory_type_self_snoop_errata(c); /* diff --git a/arch/x86/kernel/cpu/zhaoxin.c b/arch/x86/kernel/cpu/zhaoxin.c index 05fa4ef..415564a 100644 --- a/arch/x86/kernel/cpu/zhaoxin.c +++ b/arch/x86/kernel/cpu/zhaoxin.c @@ -65,20 +65,6 @@ static void early_init_zhaoxin(struct cpuinfo_x86 *c) set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC); } - - if (c->cpuid_level >= 0x00000001) { - u32 eax, ebx, ecx, edx; - - cpuid(0x00000001, &eax, &ebx, &ecx, &edx); - /* - * If HTT (EDX[28]) is set EBX[16:23] contain the number of - * apicids which are reserved per package. Store the resulting - * shift value for the package management code. - */ - if (edx & (1U << 28)) - c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff); - } - } static void init_zhaoxin(struct cpuinfo_x86 *c)