From patchwork Mon May 8 12:48:58 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: 91126 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2137628vqo; Mon, 8 May 2023 06:03:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5RYcxLbo+2Se+YSl1UDSFTsQFlpLpXvaBQfF5oqFsvFsJHsNj2yCwliQIZJ7yWMNLc2jgf X-Received: by 2002:a05:6a20:4325:b0:100:ac13:9a57 with SMTP id h37-20020a056a20432500b00100ac139a57mr3015884pzk.55.1683551006982; Mon, 08 May 2023 06:03:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683551006; cv=none; d=google.com; s=arc-20160816; b=Yhx1pMlNueGFeKrheYnDT2wTIilYXNFTO4iydmAeBdY522cUDwr+6Kfuerl3n05CLm BTo6ISDcf//u0XCbtEnWn/sj4qC+nh3Lb4BRgXH77cIzd3LolfSpF7aHacz1RT+MSWdi xqrvN0ZiaVA7QZnriL/5pEh47qjm4/PnW0uRsquIPh6BZQG4yBaJT/94YUbEcTNaS/Xo jOplle3LNyHxJHFAxszXHOXideJzE5x+0jSKFQOXhQsYkem9W6Fs1lL467ssupTA8vc+ eNy8VLjlyvc7esNXZRQrEUMQdeJM7mEYtxpEeC6TPB+7qFC7v4cToPxQ+AO/4DCHOFVM dBgw== 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=piMYMo2Ju0wC3n0HNs0uuwqGqcw3lZpEN2IbEw9GZa8=; b=VU2LQEAha7gvWkO6Pk8syXvTFilUa+b6+IHtgiJrwzFlkYJps4x8CRVb0CR0zNN5mj gWNMb8ZREsyCqquvg88+8IM9j2g8qsy9l0J68UhCgAB/I8IsQkvTPIXWckgu1MakH7On 51Lq1LqYEn1xeRGWjb7Nth/qwY48NCUizYNpqNwF8HE3D9W85R7bB+s3KwNtLkNStkKp wY/PWWKGTH5J6xMcHLhEZmXkiW/YbVEC8KHKO0Ujq4bQJDSvciJ8RB3anaOp1xRNuCca ZR6E90r0G65Tc1KAzk4h7Sc7jLu2uaOkH1+dT/JWc3fnwFWLt1oMGXxaDqmPW7i/Wb0B NCbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JGbh4E8T; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=QJDxacT9; 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 b5-20020a63eb45000000b00527d158ec69si8262148pgk.33.2023.05.08.06.03.01; Mon, 08 May 2023 06:03:26 -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=JGbh4E8T; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=QJDxacT9; 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 S234268AbjEHMtF (ORCPT + 99 others); Mon, 8 May 2023 08:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230415AbjEHMtC (ORCPT ); Mon, 8 May 2023 08:49:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9951A31EC0; Mon, 8 May 2023 05:49:01 -0700 (PDT) Date: Mon, 08 May 2023 12:48:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683550139; 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=piMYMo2Ju0wC3n0HNs0uuwqGqcw3lZpEN2IbEw9GZa8=; b=JGbh4E8TG5Fl6qBJuyOfdsdTCX/iozLOJ8Zgqw76KY+XD2vdPvd78+jXc2xtLZy4b8A5PB M0ymBt9tlJoXCUIPARjRKf41QKiXBDTExwbc1hk90SECfhxVSk/NyMU1kksIYDmOJjVuWY RGM3VkP89jFYIcbTga1ngVNu7FCmW2epnQ3HyZgVAhkBm4ukLpG8ukzv9yk3fjYR/zRrrt 4Ty8peEnuwfDWRvI5vZ7bGbPAl8omf6yjqQCeDe1Mp4rxI/6aIXI+f8UjVJDBlhPukNz7F BDrDqxxAaxhUKGUnFfGFSpmow4cIytYb4hjiF7lKQl7Thwmfyc3insslYghGrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683550139; 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=piMYMo2Ju0wC3n0HNs0uuwqGqcw3lZpEN2IbEw9GZa8=; b=QJDxacT9nY03yrlG3saDGvCfQrsZyplDdDcIlcocqRD1FL0lkYkO6BYUMg1v251mcjrmAA 9DWO8a4SaKRMisCg== 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: <168355013878.404.6720675388219891668.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,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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759002277196459653?= X-GMAIL-MSGID: =?utf-8?q?1765331180566342162?= The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 37a19366e10b95380bf33e7a8b02509980399d7e Gitweb: https://git.kernel.org/tip/37a19366e10b95380bf33e7a8b02509980399d7e Author: Borislav Petkov (AMD) AuthorDate: Mon, 27 Feb 2023 17:03:52 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 08 May 2023 14:24:11 +02: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 f5fdeb1..dd33ee8 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;