Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2124572rdb; Mon, 20 Nov 2023 02:42:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHv3V8Op79VaFhJljH/Xo3DYtPPNfQb8/UwGsR8zFLenlQ3gqY2nwa7WW/qSRjnlWC9GErX X-Received: by 2002:a17:903:2585:b0:1cc:32df:40e7 with SMTP id jb5-20020a170903258500b001cc32df40e7mr5345584plb.66.1700476965468; Mon, 20 Nov 2023 02:42:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700476965; cv=none; d=google.com; s=arc-20160816; b=yDlRRlM+PHXIYuAMwSslCSlB3JBCok7qryBOydO09igrsQrW7d8kNWyCASFmp1SHlB YDGXMS60jzpHyKrDx9Yf+z9mdbMzPGRwV/S8BHgtAzdY7O0iOv7bpspvpv4TgWdfN5ij d/uYb/1KJIsa/RrkBss0p6yOfR+EI0MpyIW8z6fyzsORPEK4Mzhwghb93H3qP5Yg3fI3 9J5FZ+GTXTdwBIRh++2FM7kIdlopkKJA25bhX8A/GBw5SH0eUKXrtqMceD156kL4CB2D xL9+VKH6u7CiH/jImXB+Ih021R0bM68uZ9G1+kQgWHgKWU0qGJcSVRNP3TzhxR5qwIjC jgTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5Nla2HQFKOetLML5HyqbZJqv3PQPpLAaqQI0ct+oIh8=; fh=yRofEPOsMYSFYi/7/f3tXB782BWAy0107oR1j5aafGk=; b=j0FaQfWHcMjBpgYmwfpyLabs9onsPsbCMM9i+/SsMEnTDSyoQpltDNy8hfsieYZNQy lC4p7OZ6+no7G4WGPzBvYBokDtDMSGeE3aOH5Y+p+MnEHCwLpflFJhv0o/Q4TsSfc/1B zxwW5QOFO4xr/Zocis96+s5/n3eD19K74VPlawz4oMbh+W1m51WxY/p0ppJWRdq/QnId sVmv+AkV1LnkPIYdvTX2cZB9+T6XvEKXiKe8zmOID3/1HZxf883G0RzaTxh3RDcG6xgU Ha9j12r8mNXstEqghcp6WI9MTQbsdURE3MGX3P0XoYGrsTSTpAab0kr46EeBXymQOYiE mhzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=Y2XnooKr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id c10-20020a170902d48a00b001cf5c99f036si2403164plg.90.2023.11.20.02.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:42:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=Y2XnooKr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BAF56809A78D; Mon, 20 Nov 2023 02:42:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232940AbjKTKmM (ORCPT + 99 others); Mon, 20 Nov 2023 05:42:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232305AbjKTKmL (ORCPT ); Mon, 20 Nov 2023 05:42:11 -0500 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB7C1C5 for ; Mon, 20 Nov 2023 02:42:07 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id B352240E0191; Mon, 20 Nov 2023 10:42:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=fail (4096-bit key) reason="fail (body has been altered)" header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id s3Bk66p57ugy; Mon, 20 Nov 2023 10:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1700476921; bh=a498UqCdgqI7n4Pzky75DyfxOL9DOYfatF1tLA69gmE=; h=From:To:Cc:Subject:Date:From; b=Y2XnooKrIU6CgKkGZl1uH6BTm2yeh0H/V46Py3DiJU7skXypcgxzlD8OtlIn2K/sa BP2RIzuGlHZ4yfl0chrqZ23mzR5LV5dPRN8ZJkql67C5aZKjaJ1xdjB7MUjk4MZT60 jWfeK7pMIQraxZe/KKTJo+bcAPHL8obFX5qsCV5zt7rzFBg2mttBegducL7Q7KU73G fHsvZ7zBaqbdmtmHtoGES/0f9Ybk1hc2oHu7P6hmg+Zfkk4PT1cUtFK0iD8ZqrbQ8o yKWyspK8xEzKbTg5PCIphAMSDKIMqW60KO0GDvQ9gR0A8Wpz4R9hMR1Y/rfTFfJbSL g3JWelwH7LyAOsGbAjaxZ8XX45Jp+Ly6zPB7KWL8XqLhUl8YD1985gm8Z3/mYyXqIU v6EuIeCM9EfgvynhqXN1fITsIT2FkCnqLWDe7OshtadImuCWEEpukKXiYsPLiE7Yyc wYvrqFd7A4ReKczogyBCcyAtkw7zPW8JGy4lwWl3ZzJQ/bltjnPrjHb0Y1G76nWRHx wr43nfks35IVL+SeLkrUVREpRvmsWj3u51MQA4pTW4z2/pTckOOhdpgLU4ioYpYMMN lDwad5CXsg5I9dJ9QmUw7Pv4b2bjWy1bbz7VTZF8Roz3c3JA5kJgAe7ncunRpMCOHk DtzcBErIsIh+/yW4HWxAr90c= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 77E9C40E0030; Mon, 20 Nov 2023 10:41:59 +0000 (UTC) From: Borislav Petkov To: X86 ML Cc: LKML Subject: [PATCH 00/13] x86/CPU/AMD: Rework Zen family detection and other fun Date: Mon, 20 Nov 2023 11:41:39 +0100 Message-ID: <20231120104152.13740-1-bp@alien8.de> X-Mailer: git-send-email 2.42.0.rc0.25.ga82fb66fed25 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:42:33 -0800 (PST) From: "Borislav Petkov (AMD)" Add Zen generation flags which will be used to check on what type of Zen the kernel runs. Distribute the per-generation init work into the respective functions and cleanup amd.c properly. As a result, drop the errata checking gunk which is not needed anymore. There should be no functionality change resulting from these changes. Borislav Petkov (AMD) (13): x86/CPU/AMD: Add ZenX generations flags x86/CPU/AMD: Carve out the erratum 1386 fix x86/CPU/AMD: Move the Zen3 BTC_NO detection to the Zen3 init function x86/CPU/AMD: Move erratum 1076 fix into the Zen1 init function x86/CPU/AMD: Call the spectral chicken in the Zen2 init function x86/CPU/AMD: Rename init_amd_zn() to init_amd_zen_common() x86/CPU/AMD: Move Zenbleed check to the Zen2 init function x86/CPU/AMD: Move the DIV0 bug detection to the Zen1 init function x86/CPU/AMD: Get rid of amd_erratum_1054[] x86/CPU/AMD: Get rid of amd_erratum_383[] x86/CPU/AMD: Get rid of amd_erratum_400[] x86/CPU/AMD: Get rid of amd_erratum_1485[] x86/CPU/AMD: Drop now unused CPU erratum checking function arch/x86/include/asm/cpufeatures.h | 6 +- arch/x86/kernel/cpu/amd.c | 266 ++++++++++++++--------------- 2 files changed, 135 insertions(+), 137 deletions(-) --=20 2.42.0.rc0.25.ga82fb66fed25