From patchwork Mon Jul 24 17:44:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 125152 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1981129vqg; Mon, 24 Jul 2023 11:36:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlF4mIg0kYOvmKZbGQr8cXlAS2nAHJjT3KsoKnmghVv0hu6O+IVGRtopCmG/FlR1rCOzoGFR X-Received: by 2002:a17:907:7810:b0:993:f2b4:13c9 with SMTP id la16-20020a170907781000b00993f2b413c9mr11258967ejc.21.1690223770051; Mon, 24 Jul 2023 11:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690223770; cv=none; d=google.com; s=arc-20160816; b=I4CTsHXH0S2g0RAtEV02f1vaykZL0KvY0BNyWVQuXjT/BW7DVoOPWCIYDP0Cg5kJHz MT73AtYiKKKYBLvSPf4vFqoEBfbuL24/zAZzIWhCHFOGLsIVrWiyjeEhNrKU4vr8FlsQ Ecq8olRLNsNX14h2ZsmAKDMYQWPkqp1ZLOgstZ2csqnFWTpEAQZAMy1hMF+osAR+gJct P/E+fI+6F6sXN9CroWSGPHQ6Mmu6bo6WZy8cKyDVUnMtcBbfOr6pzadKlfK7Pt+FkWHl hdYKMH6+EU/16VJA/ig8UNglQ/8NzTxwR3M2tUoyhCBdULJCGtvrc3LI0PMV+q02F1om Wihw== 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=t8GxhNF6HGOaqAPuRwkda5YYxZL4VSRyQt8u47FAxec=; fh=cDlgSYzM/IiVZ/EC06yL1+GD3+pSK8bXSWGje/Xzf2k=; b=lmcO07PrEL1JAkX6TQbioFacX7xMfvIYmO9PJD+RCVdBAbKXL57dGbVXEbt7Hk9RGj gF2J5xi3kN2fgnecMoSWdo8HRX3E5df0eUgSG0p1GQjSxWUhkybkQoB/4pcZVN64pZ9Z fitmppP/4rd3HEJsUJ90aO/uHktK2+xkcfG3LlsVAzRiKOzGapFBRSQNRb/XscKBLuZW rhnC70iL5oLF2ToeEfw5Z9Sf+2lBDYTav0/Fqid29WRLxhiS3D//s+78GNkABL72zoqE JCDqbDmt9msFbuI2OZFcD78Q+rfea0sDDQYIZ2Dlnzwhi+9e/7IQGODk4g4uUMOay1Dd UYcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KLyUa8es; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 ka1-20020a170907990100b0098f99532db2si6567441ejc.666.2023.07.24.11.35.46; Mon, 24 Jul 2023 11:36:10 -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=KLyUa8es; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S231681AbjGXRpR (ORCPT + 99 others); Mon, 24 Jul 2023 13:45:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbjGXRoQ (ORCPT ); Mon, 24 Jul 2023 13:44:16 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3377019AE; Mon, 24 Jul 2023 10:44:05 -0700 (PDT) Message-ID: <20230724172844.162323021@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1690220643; 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=t8GxhNF6HGOaqAPuRwkda5YYxZL4VSRyQt8u47FAxec=; b=KLyUa8es+jPzEsXGvwuk6GhbKscCXWyOkBi727AcOJri8bKsD4wGHD3cilBalgIxD+dHnJ 4YNaz6f0ScJ4Jf5AsqaUwXAdwiOp0nPRGCZeyYa53f0xn/xDf+e9tmW1Sy7V5akXzxHNDE 5gGNYbShT8iGnBx29Hr4ivgl4MUU7NvxjBWIcJTjmXXM22OQ17GZmanOaTIsMnR3DPVYnX 5DgWp6e/pdKi1V0b+CLIv1VmKHe6CDm6G5/Iqf0Azxv3twcYRjR06yzRkw13kIkmWnkDRY ArR5hZcl3G8T6Ck/vVUUkz4Xpgxgj7vRdMnhShEuCUSRLEiqVIoo0R8nkZl8ww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1690220643; 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=t8GxhNF6HGOaqAPuRwkda5YYxZL4VSRyQt8u47FAxec=; b=FLpqVGZUu2wwMzA49ziDcbCjKuTqXK5I5ct3PoQWaZaTSyyyAfGcerZ6i249X1t4dDjSg7 p+/81KPNMVfk8qDQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , "James E.J. Bottomley" , Dick Kennedy , James Smart , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-hwmon@vger.kernel.org, Jean Delvare , Huang Rui , Guenter Roeck , Steve Wahl , Mike Travis , Dimitri Sivanich , Russ Anderson Subject: [patch 08/29] x86/cpu: Remove pointless evaluation of x86_coreid_bits References: <20230724155329.474037902@linutronix.de> MIME-Version: 1.0 Date: Mon, 24 Jul 2023 19:44:03 +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 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: INBOX X-GMAIL-THRID: 1772328079614651357 X-GMAIL-MSGID: 1772328079614651357 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 --- arch/x86/kernel/cpu/intel.c | 13 ------------- arch/x86/kernel/cpu/zhaoxin.c | 14 -------------- 2 files changed, 27 deletions(-) --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -488,19 +488,6 @@ static void early_init_intel(struct cpui 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); /* --- a/arch/x86/kernel/cpu/zhaoxin.c +++ b/arch/x86/kernel/cpu/zhaoxin.c @@ -65,20 +65,6 @@ static void early_init_zhaoxin(struct cp 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)