From patchwork Sun Mar 12 19:32:50 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: 68555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp858197wrd; Sun, 12 Mar 2023 13:08:01 -0700 (PDT) X-Google-Smtp-Source: AK7set8FOeNpKicnTXe2ccJeMrwOMKAzz0n298MvwHjIVuA4Dll00mVUYiWIsv7/SkcRD5uauNmJ X-Received: by 2002:a62:8445:0:b0:5e0:a86:a76f with SMTP id k66-20020a628445000000b005e00a86a76fmr32760751pfd.0.1678651681575; Sun, 12 Mar 2023 13:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678651681; cv=none; d=google.com; s=arc-20160816; b=Jg0iWDXwOmQLZm7E17xzfw1aVH21p05bMqEE2nu3BccfIO+OuE2hgLzrlO/GiPzod5 jv2rio/FWArE0JrRJEjU5RgZYYBRGkod8GWPzEfc6NfLOXT4D4A+qqt9RWaYvfnOBRBi ylRl7eBEUbjOW2pd/qlEal+LSAG5pqBiroHuBBT3hqyeMiRz3jWX6etJLYbiMyOaPK7u 72jS8k16x5KbfF7g2maOJpQTxQnlG5hYJurpSxu4YuyIuEHFFnxm3yNyN3C3y7cZnC91 0aCTbuPeCw8G7lm0uMVjxWTfCAZ+yQgJKYaUPFV4/RAFXCzNrdMamy3VvOxyDqqb7JjO 7CyA== 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=CKIRktVYI9ydybMvRx3yc+RM+KVutJMeX+5vggZ8T4s=; b=xRSN7/J1u8e+POLFjObB9EkTd/RZdpeqSmMGFnXlH/BUvqC+mq3/qvzTOTx3HQcHuH ZJo804qql7tV69xrFUPKPBPDPOJdOknIaSgKjoj3ixz5Hl8WO/nanlZD2kfqd/vK/5Mu ueWi32kWJKQ45yB2d2YAJlRJSJx2Y24SSBRc4LHpMbMV6BNDvl/l9gERfDJUNEixd0io y+ZNNtQ39hkOp7f6BB1qjEFvGuKTLymQC/2dL7v+/ben8Q2sacyTQO/wZvzQs10IUV3L bu9cVmDwlgi9iO6MH5o/PYARkgXSMST4tewwFKA71ZTxjIc+hK6m7UJJd51Ea3IWdMSA WMPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wZ91N7yE; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a63db45000000b00502e22fa78csi4779866pgi.314.2023.03.12.13.07.46; Sun, 12 Mar 2023 13:08:01 -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=wZ91N7yE; 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 S230212AbjCLTdD (ORCPT + 99 others); Sun, 12 Mar 2023 15:33:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbjCLTc7 (ORCPT ); Sun, 12 Mar 2023 15:32:59 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01456392A3; Sun, 12 Mar 2023 12:32:53 -0700 (PDT) Date: Sun, 12 Mar 2023 19:32:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1678649571; 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=CKIRktVYI9ydybMvRx3yc+RM+KVutJMeX+5vggZ8T4s=; b=wZ91N7yE8eLvD70UHmSspI///tlJIVrXZXYl+Uc3wVtOgKBo8djFkjCOl+zM9ViUlbyhfu bTeqyzRLtpS1Z1TSYnJd5oOM+MZLBge57LvFxmRU2BJdTTqjQZFbyoKNk0p7ygAHYVvAgG YyqNhQ+IQk+0XgBpqjNSXndHz1iRgcilEqlA2G+IBOpCCF/HyO8d2O/6PjKgCAmnMoyk9+ TZ6yNzaoKEQLT1yibJk4xDoZPnNBe52TBW19Vy6yGZvOAcyaAZ/x6nJCCa3wfnogJnz2+K nYacaXRN79hWeH2Bd53FbVUwZKMpITQTZtAXRCsN7hkIANVGnKaJAxZ3rili0w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1678649571; 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=CKIRktVYI9ydybMvRx3yc+RM+KVutJMeX+5vggZ8T4s=; b=Mk6wuFuwiz3aYg7LrVD3puyktCrXlVJeGbKKnXNlBiF7/AT6s6CBKNzTl0E52Ly3/5nBA+ zqhtLOAx+L+3uMBQ== 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/microcode] x86/microcode/AMD: Get rid of __find_equiv_id() Cc: "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230227160352.7260-1-bp@alien8.de> References: <20230227160352.7260-1-bp@alien8.de> MIME-Version: 1.0 Message-ID: <167864957031.5837.1116812221182540208.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759002277196459653?= X-GMAIL-MSGID: =?utf-8?q?1760193865656435903?= The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 9652df50cd444d0e6c26906ec9dfa894f2d4d6bc Gitweb: https://git.kernel.org/tip/9652df50cd444d0e6c26906ec9dfa894f2d4d6bc Author: Borislav Petkov (AMD) AuthorDate: Mon, 27 Feb 2023 17:03:52 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Sun, 12 Mar 2023 20:14:38 +01:00 x86/microcode/AMD: Get rid of __find_equiv_id() Merge it into its only call site. No functional changes. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230227160352.7260-1-bp@alien8.de --- arch/x86/kernel/cpu/microcode/amd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index 9eb457b..394a9e1 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -596,11 +596,6 @@ void reload_ucode_amd(unsigned int cpu) } } } -static u16 __find_equiv_id(unsigned int cpu) -{ - struct ucode_cpu_info *uci = ucode_cpu_info + cpu; - return find_equiv_id(&equiv_table, uci->cpu_sig.sig); -} /* * a small, trivial cache of per-family ucode patches @@ -651,9 +646,11 @@ static void free_cache(void) static struct ucode_patch *find_patch(unsigned int cpu) { + struct ucode_cpu_info *uci = ucode_cpu_info + cpu; u16 equiv_id; - equiv_id = __find_equiv_id(cpu); + + equiv_id = find_equiv_id(&equiv_table, uci->cpu_sig.sig); if (!equiv_id) return NULL;