Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3476233rwo; Mon, 24 Jul 2023 11:34:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlE8u8lmlICx7xu2Wo931Cu+dRJ1QrMm3X2+uE2FspH6yDmX99B+gGeuzYx6Mo241K+r+S86 X-Received: by 2002:a50:fb82:0:b0:521:872f:f49 with SMTP id e2-20020a50fb82000000b00521872f0f49mr9441495edq.22.1690223670247; Mon, 24 Jul 2023 11:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690223670; cv=none; d=google.com; s=arc-20160816; b=fZrUK9khqhwW8W/zHiVeNezfSGT5YccIpB9np3pBSAYqoQQ4jjti5l6v7pq3SPbJpu GZ+atF8nntvNuLuaRxBLfHaOtJ5xAHqGl6zRv4hnoOTpZuVxbphmQAamtAUWeiC5bzCo igO2N4Jy510gwlZk8apoCVWm6+8H9OASW7zejd6td4OZHpW4RstAa4vHDolvIMB/ocm/ aWoRJ5uTOKlRCCKvamANFaNk27DvNOPDAuTGzm3Qt21YYVA3pC1eo5sKvM/8pkmMwSrT kK6iLt0YrGiG+VzuL6tspXarTzbNLVG4RzpheTxTcg84ggqYgq/PQ2TrCYr9cfMhRRd9 3neQ== 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; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s14-20020aa7c54e000000b00521937f0c53si6803883edr.489.2023.07.24.11.34.05; Mon, 24 Jul 2023 11:34:30 -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; 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 S231516AbjGXRpQ (ORCPT + 99 others); Mon, 24 Jul 2023 13:45:16 -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 Content-Type: text/plain; charset=UTF-8 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 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)