From patchwork Wed Nov 29 11:22:27 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: 171273 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp267791vqn; Wed, 29 Nov 2023 03:23:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZbJWKMqlK0L9N4cH3QU4Dikq7pKgSuuE6hSr3wQwFnIwjg5crhuzcbpmKCHaEXWArqQAP X-Received: by 2002:a17:90b:390e:b0:285:da91:69e8 with SMTP id ob14-20020a17090b390e00b00285da9169e8mr10496963pjb.47.1701256989118; Wed, 29 Nov 2023 03:23:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701256989; cv=none; d=google.com; s=arc-20160816; b=p1N/gu8UA2AKQqefhjPrrjh0CcVsZDlKkymvoZplt9sptTV9jsnM0eHe71ivdQGQqK BlOZQpHwZzjM1Xcrxes8BZla7HXl8RqcRVdJjph1w8UGDF1huYKjxxKuk9hyMk9NIvj5 8K1RxoRaXVDVm8lk0YljocmD+ZC2uzqgLdj3Z2hygSyIFwXde/67XtpZBMpKv4a+cZFu KMnvJPi/Z7HFxEqpeR6VH35VbZlbdxN3EDRF/QfYcHL9AX78ASZFGud46P1uvIksRxkr ZoGkF5/RlqM2WxhTQ9j7GNThQwMHokSelXLXv+Ir9sUB+qrLQ/7vawozFVcAWPWJVeHb AUEg== 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=xJAsvTu4hYMz6gfEOwNBjwheJBGxEAwtQOmEW3C2TkA=; fh=UD1ZRCSS/l4PYbuMk1gSsIJwAKOC33PKfkYvw4GUlo4=; b=OnuK2cLQ+/sFPl/kpPlvtztNnkm1KwSwfSG/so3q3JScVFPD++ppE9kN16E7jdLmn5 wH6XgSYJoJ3rop61k+nfpdIaYuG8lLSpNUstNR3Xu8pbQtWWmj96VO7z+NL4wLpz8rTJ NdjMU5ofSuzTwE1ugTVZfXxaUVv66k+xuWYyYpqQgm4+lcKlwgTO1jpoXXjD/lcxTBKu e/RXM95pyEI/i3C2E8wtaIXioex/Ar5jj+/TS/fSFRAa5QntUbdrYjuT1OA7M7BGW0mv P+/JWcVshxqcLFOcgmRCpPo6yg52sbX5K+fzqBRxksq1tZfoMTmX8i06P1SWtYy+/4x4 Uq3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PHPQyUJ4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="oiO/XSD3"; 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 mh17-20020a17090b4ad100b002736ff3cc79si1143135pjb.23.2023.11.29.03.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 03:23:09 -0800 (PST) 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=PHPQyUJ4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="oiO/XSD3"; 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 0AFF78023740; Wed, 29 Nov 2023 03:22:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232415AbjK2LWf (ORCPT + 99 others); Wed, 29 Nov 2023 06:22:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231858AbjK2LWX (ORCPT ); Wed, 29 Nov 2023 06:22:23 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0AB4171D; Wed, 29 Nov 2023 03:22:29 -0800 (PST) Date: Wed, 29 Nov 2023 11:22:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701256948; 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=xJAsvTu4hYMz6gfEOwNBjwheJBGxEAwtQOmEW3C2TkA=; b=PHPQyUJ4oeBoPgDnDLE4PL1akB7Sqb7LNwpLUgFzl0NxWzwpMhfPMPKqZj/lwyxTfk9UFk hK6EZOYBdMZqHwAhy63Of5WErnEK7TbwpJ+yS00G74JXV7VphLYtoW3DH43BXw93MtmhW7 2Seqk08PqYXR363rUIATjsgij1+Rk+VXymXvMIb+MY5e7iNIi5K6vYQajvM7yvjj3lPdcI wEIxleEmwBj0sjkrSR6uKX7RvmKW94vIqMGs0gZBVP4Ih06Sy5xwiYeDpv08QUcaLkRtC2 uGfNQb3GjEfi3iFXP8tA5Hjc+PVLf2+oWdFf7FKCQiF6jSI4+3IPNHjUO1lhkw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701256948; 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=xJAsvTu4hYMz6gfEOwNBjwheJBGxEAwtQOmEW3C2TkA=; b=oiO/XSD3ZOppahwDAnnYsiNxFhtkZDOukYvGL95NFgfKm6AaOBTgGmXRR2Qaqh8C7pVdSc rWkO74vpl5hDsaAA== From: "tip-bot2 for Borislav Petkov (AMD)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/CPU/AMD: Get rid of amd_erratum_1054[] Cc: "Borislav Petkov (AMD)" , Nikolay Borisov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231120104152.13740-10-bp@alien8.de> References: <20231120104152.13740-10-bp@alien8.de> MIME-Version: 1.0 Message-ID: <170125694797.398.10954406504352412833.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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]); Wed, 29 Nov 2023 03:22:57 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783079411818781060 X-GMAIL-MSGID: 1783897248517732567 The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 54c33e23f75d5c9925495231c57d3319336722ef Gitweb: https://git.kernel.org/tip/54c33e23f75d5c9925495231c57d3319336722ef Author: Borislav Petkov (AMD) AuthorDate: Fri, 03 Nov 2023 19:53:49 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 29 Nov 2023 12:12:55 +01:00 x86/CPU/AMD: Get rid of amd_erratum_1054[] No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-10-bp@alien8.de --- arch/x86/kernel/cpu/amd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 13ad44b..219ae7e 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -66,10 +66,6 @@ static const int amd_erratum_400[] = static const int amd_erratum_383[] = AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0, 0, 0xff, 0xf)); -/* #1054: Instructions Retired Performance Counter May Be Inaccurate */ -static const int amd_erratum_1054[] = - AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf)); - static const int amd_erratum_1485[] = AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x19, 0x10, 0x0, 0x1f, 0xf), AMD_MODEL_RANGE(0x19, 0x60, 0x0, 0xaf, 0xf)); @@ -1201,7 +1197,7 @@ static void init_amd(struct cpuinfo_x86 *c) * Counter May Be Inaccurate". */ if (cpu_has(c, X86_FEATURE_IRPERF) && - !cpu_has_amd_erratum(c, amd_erratum_1054)) + (boot_cpu_has(X86_FEATURE_ZEN) && c->x86_model > 0x2f)) msr_set_bit(MSR_K7_HWCR, MSR_K7_HWCR_IRPERF_EN_BIT); check_null_seg_clears_base(c);